History log of /frameworks/minikin/tests/util/FreeTypeMinikinFontForTest.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a22996e31226e3dcbfb0c57d03ca9ac54028fc28 01-Feb-2018 Seigo Nonaka <nona@google.com> Remove HbFontCache

This is 2nd attempt of the If86840fcf9.

HbFontCache was introduced for saving hb_font_t creation cost, but it
turned out that creating hb_font_t from another hb_font_t is cheap.

Instead of computing hb_font_t from buffer, compute hb_font_t in Zygote
process and store it in Font class.

By this change, mutex lock is no longer necessary for all HarfBuzz
related function calls.

StaticLayout creation time (w/o -> w/ patch, N=10, walleye-userdebug):
MeasuredText Balanced Hyphenation : 712,896 -> 705,864: (-1.0%)
MeasuredText Balanced NoHyphenation: 548,745 -> 535,891: (-2.3%)
MeasuredText Greedy Hyphenation : 486,093 -> 479,541: (-1.3%)
MeasuredText Greedy NoHyphenation : 491,053 -> 480,571: (-2.1%)
RandomText Balanced Hyphenation : 17,749,025 -> 17,426,362: (-1.8%)
RandomText Balanced NoHyphenation : 7,433,576 -> 7,401,203: (-0.4%)
RandomText Greedy Hyphenation : 7,388,658 -> 7,327,291: (-0.8%)
RandomText Greedy NoHyphenation : 7,375,390 -> 7,381,066: (+0.1%)

MeasuredText creation time (w/o -> w/ patch, N=10, walleye-userdebug)
Styled Hyphenation : 14,364,510 -> 14,430,830: (+0.5%)
Styled Hyphenation WidthOnly : 13,629,489 -> 13,446,345: (-1.3%)
Styled NoHyphenation : 14,104,669 -> 13,873,049: (-1.6%)
Styled NoHyphenation WidthOnly : 13,304,362 -> 13,091,473: (-1.6%)
NoStyled Hyphenation : 17,512,424 -> 17,368,559: (-0.8%)
NoStyled Hyphenation WidthOnly : 17,095,872 -> 16,985,377: (-0.6%)
NoStyled NoHyphenation : 7,371,994 -> 7,344,223: (-0.4%)
NoStyled NoHyphenation WidthOnly : 6,932,519 -> 6,950,149: (+0.3%)

StaticLayout draw time (w/o -> w/ patch, N=10, walleye-userdebug)
MeasuredText NoStyled : 661,017 -> 657,547: (-0.5%)
MeasuredText NoStyled WithoutCache : 660,506 -> 651,035: (-1.4%)
MeasuredText Styled : 868,116 -> 854,418: (-1.6%)
MeasuredText Styled WithoutCache : 916,078 -> 880,388: (-3.9%)
RandomText NoStyled : 561,192 -> 547,528: (-2.4%)
RandomText NoStyled WithoutCache : 6,758,025 -> 6,695,065: (-0.9%)
RandomText Styled : 2,886,462 -> 2,843,580: (-1.5%)
RandomText Styled WithoutCache : 3,319,513 -> 3,276,261: (-1.3%)

Bug: 37567215
Test: minikin_tests
Test: hwui_unit_tests
Test: atest CtsTextTestCases \
CtsWidgetTestCases:EditTextTest \
CtsWidgetTestCases:TextViewFadingEdgeTest \
FrameworksCoreTests:TextViewFallbackLineSpacingTest \
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest \
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
Test: bit FrameworksCoreTests:android.text.

Change-Id: If523fce5ce3747b03a1d3bad8c5938a4e2901792
/frameworks/minikin/tests/util/FreeTypeMinikinFontForTest.h
4de86391218f9fa2d1ba15d78cd80514fb5ce43d 07-Feb-2018 Seigo Nonaka <nona@google.com> Revert "Remove HbFontCache"

This causes a regression for some characters.

This reverts commit 6c6954b40f7a6bd6dcf8a3d01c78600437c2e011.

Bug: 73054061
Change-Id: I010754474eebd55e43666893c4f7af9de12b22f3
/frameworks/minikin/tests/util/FreeTypeMinikinFontForTest.h
6c6954b40f7a6bd6dcf8a3d01c78600437c2e011 01-Feb-2018 Seigo Nonaka <nona@google.com> Remove HbFontCache

HbFontCache was introduced for saving hb_font_t creation cost, but it
turned out that creating hb_font_t from another hb_font_t is cheap.

Instead of computing hb_font_t from buffer, compute hb_font_t in Zygote
process and store it in Font class.

By this change, mutex lock is no longer necessary for all HarfBuzz
related function calls.

StaticLayout creation time (w/o -> w/ patch, N=10, walleye-userdebug):
MeasuredText Balanced Hyphenation : 712,896 -> 705,864: (-1.0%)
MeasuredText Balanced NoHyphenation: 548,745 -> 535,891: (-2.3%)
MeasuredText Greedy Hyphenation : 486,093 -> 479,541: (-1.3%)
MeasuredText Greedy NoHyphenation : 491,053 -> 480,571: (-2.1%)
RandomText Balanced Hyphenation : 17,749,025 -> 17,426,362: (-1.8%)
RandomText Balanced NoHyphenation : 7,433,576 -> 7,401,203: (-0.4%)
RandomText Greedy Hyphenation : 7,388,658 -> 7,327,291: (-0.8%)
RandomText Greedy NoHyphenation : 7,375,390 -> 7,381,066: (+0.1%)

MeasuredText creation time (w/o -> w/ patch, N=10, walleye-userdebug)
Styled Hyphenation : 14,364,510 -> 14,430,830: (+0.5%)
Styled Hyphenation WidthOnly : 13,629,489 -> 13,446,345: (-1.3%)
Styled NoHyphenation : 14,104,669 -> 13,873,049: (-1.6%)
Styled NoHyphenation WidthOnly : 13,304,362 -> 13,091,473: (-1.6%)
NoStyled Hyphenation : 17,512,424 -> 17,368,559: (-0.8%)
NoStyled Hyphenation WidthOnly : 17,095,872 -> 16,985,377: (-0.6%)
NoStyled NoHyphenation : 7,371,994 -> 7,344,223: (-0.4%)
NoStyled NoHyphenation WidthOnly : 6,932,519 -> 6,950,149: (+0.3%)

StaticLayout draw time (w/o -> w/ patch, N=10, walleye-userdebug)
MeasuredText NoStyled : 661,017 -> 657,547: (-0.5%)
MeasuredText NoStyled WithoutCache : 660,506 -> 651,035: (-1.4%)
MeasuredText Styled : 868,116 -> 854,418: (-1.6%)
MeasuredText Styled WithoutCache : 916,078 -> 880,388: (-3.9%)
RandomText NoStyled : 561,192 -> 547,528: (-2.4%)
RandomText NoStyled WithoutCache : 6,758,025 -> 6,695,065: (-0.9%)
RandomText Styled : 2,886,462 -> 2,843,580: (-1.5%)
RandomText Styled WithoutCache : 3,319,513 -> 3,276,261: (-1.3%)

Bug: 37567215
Test: minikin_tests
Test: hwui_unit_tests
Test: atest CtsTextTestCases \
CtsWidgetTestCases:EditTextTest \
CtsWidgetTestCases:TextViewFadingEdgeTest \
FrameworksCoreTests:TextViewFallbackLineSpacingTest \
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest \
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
Test: bit FrameworksCoreTests:android.text.

Change-Id: If86840fcf957ca16e3a821204b79156fc23f1596
/frameworks/minikin/tests/util/FreeTypeMinikinFontForTest.h
9dffc23bd79a82e75181e33974af05da62dc6306 23-Jan-2018 Seigo Nonaka <nona@google.com> Introduce FreeType implementation of MinikinFont for testing purposes

Bug: 72342140
Test: minikin_tests
Change-Id: I91b6ade75e709f0105208a1fb595e901ac4e65d6
/frameworks/minikin/tests/util/FreeTypeMinikinFontForTest.h