Improve TextView.onMeasure() for multiline text.
Previously, measures all paragraph for deciding view width. However, in case AT_MOST measurment, we can stop calculating measure if the measured paragraph already exceeds the upper limit. Bug: 64389125 Test: bit CtsWidgetTestCases:* Test: CorePerfTest. Here is a result before and after this patch. Before: INSTRUMENTATION_STATUS: measure_AtMost_median=50332114 INSTRUMENTATION_STATUS: measure_Exactly_median=28276317 INSTRUMENTATION_STATUS: measure_Unspecified_median=50193036 After: INSTRUMENTATION_STATUS: measure_AtMost_median=28475187 INSTRUMENTATION_STATUS: measure_Exactly_median=26944710 INSTRUMENTATION_STATUS: measure_Unspecified_median=50880088 Change-Id: I2a39eb39817a8f845c4fa2e174a905a2d057096e
Loading
Please register or sign in to comment