summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorSeigo Nonaka <nona@google.com>2017-11-27 22:09:49 -0800
committerSeigo Nonaka <nona@google.com>2017-12-05 14:49:53 -0800
commitf1644f735de3a940d429c42ec920348e96a4d14e (patch)
tree0e5cde0ac9a52cd0860acff65c96731a6e2ad617 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent2ad16ddbf7d6b24b1c471b93b53be96742559b84 (diff)
Refactor MeasuredText
This is 2nd attempt of I58d3020a3fa560d05576e18888fbfe46e2975e8f The root cause of the crash is passing end offset instead of passing length. This CL contains that fix and also has a test case for that. This refactoring contains: - Add lots of comments. - Mark private the internal fields and introduce accessors and helper methods. - Factor out the auto grow array implementation to another class. - Use SynchronizedPool for pool implementation. - Introduce three build methods for each use case. - Hide addStyleRun and compute all necessary informations in build method. Locally verified that this doesn't cause performance regressions. Here is a raw performance test result on walleye-userdebug. StaticLayoutPerfTest (median, N=100): createRandom: 7,846,449 -> 8,003,903 (+2.01%) createRandom Balanced: 7,810,436 -> 7,919,200 (+1.40%) TextViewOnMeasurePerfTest (median, N=100): measure_AtMost: 94,276,376 -> 94,124,658 (-0.16%) measure_Exactly: 91,629,352 -> 91,617,639 (-0.01%) measure_Unspecified: 151,006,181 -> 150,957,598 (-0.03%) Test: bit CtsTextTestCases:* Test: bit CtsGraphicsTestCases:* Test: bit CtsWidgetTestCases:* Test: bit FrameworksCoreTests:android.text.StaticLayoutTest Bug: 65024629 Bug: 70146381 Change-Id: I772f60444d0fe87f59609977af5ef712cab3eb37
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions