summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorSeigo Nonaka <nona@google.com>2017-12-01 16:24:19 -0800
committerSeigo Nonaka <nona@google.com>2017-12-05 14:56:06 -0800
commit6f1868b8136239bcaa67d717606e1d020f3c2f16 (patch)
treea118479187a77a71fb866bc94364622f5c1e260d /tools/aapt2/java/JavaClassGenerator.cpp
parentf1644f735de3a940d429c42ec920348e96a4d14e (diff)
Associate native MeasuredText with Java one.
To measure text beforehand, remove static layout dependency from MeasuredText. Now MeasuredText can compute native measured text by itself and StaticLayout use it for line breaking. This CL introduce one additional JNI method call per paragraph during line breaking but looks negligible cost. Here is a raw performance test result on walleye-userdebug. StaticLayoutPerfTest (median, N=100): createRandom: 7,879,440 -> 7,964,789 (+1.08%) createRandom Balanced: 7,835,192 -> 7,848,151 (+0.17%) TextViewOnMeasurePerfTest (median, N=100): measure_AtMost: 92,599,175 -> 93,027,121 (+0.47%) measure_Exactly: 89,949,922 -> 90,439,886 (+0.54%) measure_Unspecified: 148,645,916 -> 150,047,694 (+0.94%) Bug: 67504091 Test: bit CtsTextTestCases:* Test: bit CtsWidgetTestCases:* Test: bit CtsGraphicsTestCases:* Test: bit FrameworksCoreTests:android.text.StaticLayoutTest Change-Id: Ie932903845645e50cfa0cb428babb31a44babc47
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions