0385197086b0f08a39e7f6c9cee6f178ecb2746f |
|
08-Mar-2018 |
Seigo Nonaka <nona@google.com> |
Fix infinity loop due to negative width Due to combination of large indents and small width, the resulting width constraints may be negative. The previous implementation handles negative width but new implementation doesn't. It is good to put this non-negative regulation to getAt() interface rather than supporting negative width case in line breaker since negative width doesn't make sense. Bug: 74053423 Test: minikin_tests Test: atest CtsTextTestCases:StaticLayoutTest#testNegativeWidth Change-Id: Ie608dcdd560b3f81b48538a5706ff48344e027aa
/frameworks/minikin/include/minikin/AndroidLineBreakerHelper.h
|
0948fbb63636111c193365e01dbe952defd700f3 |
|
07-Dec-2017 |
Seigo Nonaka <nona@google.com> |
Move LineBreaker class definition to private This is preparation of LineBreaker refactoring. Bug: 65024629 Test: minikin_tests Change-Id: Idba5b4678687c39ca6566c9f343f977a8b2edb0b
/frameworks/minikin/include/minikin/AndroidLineBreakerHelper.h
|
26ef1697ea9f110d58f99eb64118f15ae9c6f785 |
|
02-Dec-2017 |
Seigo Nonaka <nona@google.com> |
Move MeasuredText to its own file and store runs in it. This lays the ground work for precomputed layout. This also changes the MeasuredText in LineBreaker from member variables to method argument. Bug: 67504091 Test: minikin_tests Change-Id: Ia5797aa918dd050feb96bcde30a1eb8112708113
/frameworks/minikin/include/minikin/AndroidLineBreakerHelper.h
|
6c8722e217ff5238f0b849152d7936959a728103 |
|
30-Nov-2017 |
Seigo Nonaka <nona@google.com> |
Apply clang-format Bug: 65125938 Test: m Change-Id: I4a4319cc34c186aa0a3ce1d0301af1cd4e0feb81
/frameworks/minikin/include/minikin/AndroidLineBreakerHelper.h
|
0dcb27d502afcb34f59ac85c886ec13a5fdaa0dd |
|
22-Nov-2017 |
Seigo Nonaka <nona@google.com> |
Measure the text before starting line break. To measure the text width before line breaking, extract measuring logic from LineBreaker and accept measured text result as the argument of LineBreaker. LineBreaker still needs style information for hyphenation. Technically we can measure all possible hyphenation patterns in measure part, but that's too complex to do at the same time in this CL. Locally verified this doesn't cause any performance regressions. Here is a raw performance test result on marlin userdebug. StaticLayoutPerfTest (median, N=100): createRandom: 6,189,897 -> 6,121,704 (-1.10%) createRandom Balanced: 6,183,420 -> 6,038,833 (-2.34%) TextViewOnMeasurePerfTest (median, N=100): measure_AtMost: 57,640,596 -> 56,786,386 (-1.48%) measure_Exactly: 55,566,211 -> 55,305,721 (-0.47%) measure_Unspecified: 96,236,366 -> 96,088,572 (-0.15%) Bug: 65024629 Test: atest CtsTextTestCases Test: atest CtsWidgetTestCases Test: atest CtsGraphicsTestCases Test: minikin_tests Change-Id: Ib0ae50f173a805130d8622164b1b72dc10f5c49e
/frameworks/minikin/include/minikin/AndroidLineBreakerHelper.h
|
b27a39233e1cc2d1230b02fe859969c9811095aa |
|
15-Nov-2017 |
Seigo Nonaka <nona@google.com> |
Decouple the text measurement from the LineBreaker This lays the groundwork for precomputed layout. By extracting measureText call from LineBreaker to JNI, JNI will be able to fill the precomputed layout result if possible. Locally verified this doesn't regresses the performance. This is the 2nd attempt of Ic26c2a8d526c05f3a38ee6a200221543fbb33713 The previous CL writes width into wrong address in ReplacementRun. This CL fixes this issue with adding unit tests. Also collected new performance scores. The result shows slight improvement but there is no reason of improvement, so the difference is likely noise. Here is a raw performance test result on marlin. StaticLayoutPerfTest (median, N=100): createRandom: 6,247,032 -> 6,025,044 (-3.55%) createRandom Balanced: 6,152,070 -> 5,959,571 (-3.13%) TextViewOnMeasurePerfTest (median, N=100): measure_AtMost: 57,639,794 -> 56,190,042 (-2.52%) measure_Exactly: 56,124,250 -> 54,377,276 (-3.11%) measure_Unspecified: 97,224,965 -> 94,837,311 (-2.46%) Bug: 65024629 Bug: 69592296 Test: bit CtsTextTestCases:* Test: bit CtsWidgetTestCases:* Test: bit CtsGraphicsTestCases:* Test: minikin_tests Change-Id: I9b61434bdcba162698dcbedf968f6ee3a4680375
/frameworks/minikin/include/minikin/AndroidLineBreakerHelper.h
|
652814b0012a2a5d55e076a1023af41714e1640b |
|
21-Nov-2017 |
Seigo Nonaka <nona@google.com> |
Revert "Decouple the text measurement from the LineBreaker" Looks like this causes native crash. Bug: 69592296 Test: N/A This reverts commit ad63f0eb8e968bab5bf999b916f718a4437ca65b. Change-Id: Id7da6492c4c232dd3b7a6d9e25a492264bb35d34
/frameworks/minikin/include/minikin/AndroidLineBreakerHelper.h
|
ad63f0eb8e968bab5bf999b916f718a4437ca65b |
|
15-Nov-2017 |
Seigo Nonaka <nona@google.com> |
Decouple the text measurement from the LineBreaker This lays the groundwork for precomputed layout. By extracting measureText call from LineBreaker to JNI, JNI will be able to fill the precomputed layout result if possible. Locally verified this doesn't regresses the performance. Here is a raw performance test result on marlin. StaticLayoutPerfTest (median): createRandom: 6,714,256 -> 6,644,276 (-1.04%) createRandom Balanced: 6,675,482 -> 6,562,508 (-1.69%) TextViewOnMeasurePerfTest (median): measure_AtMost: 59,225,636 -> 60,388,310 (+1.96%) measure_Exactly: 59,145,734 -> 58,801,274 (-0.58%) measure_Unspecified: 99,063,403 -> 99,739,018 (+0.68%) Bug: 65024629 Test: bit CtsTextTestCases:* Test: bit CtsWidgetTestCases:* Test: bit CtsGraphicsTestCases:* Test: minikin_tests Change-Id: Ic26c2a8d526c05f3a38ee6a200221543fbb33713
/frameworks/minikin/include/minikin/AndroidLineBreakerHelper.h
|