Introduce NativeLineBreaker.Builder and ParagraphConstraint
To make NativeLineBreaker public API, introduce
NativeLineBreaker.Builder and ParagraphConstraint.
Here is a performance differences:
android.text.StaticLayoutPerfTest:
PrecomputedText Balanced Hyphenation : 635 -> 684: ( +49, +7.7%)
PrecomputedText Balanced NoHyphenation: 477 -> 523: ( +46, +9.6%)
PrecomputedText Greedy Hyphenation : 413 -> 463: ( +50, +12.1%)
PrecomputedText Greedy NoHyphenation : 413 -> 463: ( +50, +12.1%)
RandomText Balanced Hyphenation : 18,030 -> 18,157: (+127, +0.7%)
RandomText Balanced NoHyphenation : 7,390 -> 7,388: ( -2, -0.0%)
RandomText Greedy Hyphenation : 7,319 -> 7,331: ( +12, +0.2%)
RandomText Greedy NoHyphenation : 7,316 -> 7,375: ( +59, +0.8%)
draw
PrecomputedText NoStyle : 631 -> 627: ( -4, -0.6%)
PrecomputedText Style : 842 -> 847: ( +5, +0.6%)
RandomText NoStyle : 531 -> 547: ( +16, +3.0%)
RandomText Style : 754 -> 758: ( +4, +0.5%)
Bug: 112327179
Test: atest CtsWidgetTestCases:EditTextTest
CtsWidgetTestCases:TextViewFadingEdgeTest
FrameworksCoreTests:TextViewFallbackLineSpacingTest
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
CtsTextTestCases FrameworksCoreTests:android.text
CtsWidgetTestCases:TextViewPrecomputedTextTest
CtsGraphicsTestCases:android.graphics.fonts
Change-Id: I5b817bbc9f00e5806efa98f239ee20ff3d688c50
4 files changed