3da4269e6097e0dafdb438c760dafdde13feda95 |
|
03-Apr-2018 |
Seigo Nonaka <nona@google.com> |
Include MinikinPaint into cache key MeasruedText::buildLayout can not be used for acquiring bounding box since the input range can across the style boundary. To make things correctly, include MinikinPaint as the key of the LayoutPiece. This is totally same as the LayoutCacheKey in LayoutCache, so reuses LayoutCacheKey instead of self defined key class in LayoutPiece. This increases the memory usage and ideally run index can be used for layout cache key instead of full MinikinPaint, but let me make thing correct first. Here is a raw performance result. android.text.PrecomputedTextMemoryUsageTest: MemoryUsage Hyphenation : 50,873 -> 59,721: (+17.4%) Hyphenation WidthOnly : 8,856 -> 8,856: (+0.0%) NoHyphenation : 26,386 -> 29,242: (+10.8%) NoHyphenation WidthOnly : 8,000 -> 8,000: (+0.0%) android.text.PrecomputedTextPerfTest: create NoStyle Hyphenation : 18,378,988 -> 18,332,327: (-0.3%) NoStyle Hyphenation WidthOnly : 18,332,392 -> 18,397,337: (+0.4%) NoStyle NoHyphenation : 7,385,258 -> 7,390,699: (+0.1%) NoStyle NoHyphenation WidthOnly : 7,403,445 -> 7,388,476: (-0.2%) Style Hyphenation : 12,637,464 -> 12,624,799: (-0.1%) Style Hyphenation WidthOnly : 12,667,559 -> 12,642,056: (-0.2%) Style NoHyphenation : 12,348,519 -> 12,241,291: (-0.9%) Style NoHyphenation WidthOnly : 12,325,515 -> 12,317,746: (-0.1%) android.text.StaticLayoutPerfTest: create PrecomputedText Balanced Hyphenation : 691,388 -> 680,137: (-1.6%) Balanced NoHyphenation : 502,038 -> 495,980: (-1.2%) Greedy Hyphenation : 451,619 -> 446,380: (-1.2%) Greedy NoHyphenation : 449,011 -> 444,621: (-1.0%) RandomText Balanced Hyphenation : 17,639,029 -> 17,609,190: (-0.2%) Balanced NoHyphenation : 7,295,497 -> 7,251,221: (-0.6%) Greedy Hyphenation : 7,268,452 -> 7,201,506: (-0.9%) Greedy NoHyphenation : 7,215,397 -> 7,225,217: (+0.1%) draw PrecomputedText NoStyle : 588,349 -> 620,041: (+5.4%) NoStyle WithoutCache : 613,312 -> 645,161: (+5.2%) Style : 911,309 -> 938,200: (+3.0%) Style WithoutCache : 920,240 -> 955,410: (+3.8%) RandomText NoStyle : 542,517 -> 555,951: (+2.5%) NoStyle WithoutCache : 6,747,436 -> 6,723,770: (-0.4%) Style : 1,022,591 -> 1,034,170: (+1.1%) Style WithoutCache : 2,862,071 -> 2,835,226: (-0.9%) android.widget.TextViewPrecomputedTextPerfTest: newLayout PrecomputedText : 791,018 -> 785,320: (-0.7%) PrecomputedText Selectable : 1,569,428 -> 1,190,267: (-24.2%) RandomText : 17,146,396 -> 17,064,908: (-0.5%) RandomText Selectable : 18,239,348 -> 18,225,575: (-0.1%) onDraw PrecomputedText : 1,263,842 -> 1,286,294: (+1.8%) PrecomputedText Selectable : 1,380,186 -> 1,303,995: (-5.5%) RandomText : 17,734,725 -> 17,823,735: (+0.5%) RandomText Selectable : 18,549,828 -> 18,610,101: (+0.3%) onMeasure PrecomputedText : 799,962 -> 809,164: (+1.2%) PrecomputedText Selectable : 1,747,993 -> 1,358,504: (-22.3%) RandomText : 17,155,624 -> 17,087,524: (-0.4%) RandomText Selectable : 18,435,408 -> 18,515,944: (+0.4%) setText PrecomputedText : 136,250 -> 133,602: (-1.9%) PrecomputedText Selectable : 213,980 -> 205,610: (-3.9%) RandomText : 16,512 -> 16,599: (+0.5%) RandomText Selectable : 56,143 -> 56,239: (+0.2%) Bug: 77495049 Test: atest CtsWidgetTestCases:EditTextTest CtsWidgetTestCases:TextViewFadingEdgeTest FrameworksCoreTests:TextViewFallbackLineSpacingTest FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest CtsTextTestCases FrameworksCoreTests:android.text CtsWidgetTestCases:TextViewPrecomputedTextTest Change-Id: I20d7cdd2f11960e334a1f2cd816679bb8f84e6cb
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
43a52c5ee653e75ce3ccf2477a9dcdec6f8d7fa3 |
|
14-Mar-2018 |
Seigo Nonaka <nona@google.com> |
Precompute full hyphenation layout The previous offset based computation doesn't work well for some cases, e.g. the final text for drawing may be a substring of the original string. The offset based matching doesn't work well for such case. This CL changes - Store the layout results during measuring hyphenation pieces. - Change the LayoutPiece key from offset to string. - This CL increases the heap usage about 23kb for 500 characters text. This changes the performance behaviors. android.text.PrecomputedTextMemoryUsageTest: MemoryUsage_Hyphenation : 28,448 -> 51,836: (+82.2%) MemoryUsage_Hyphenation_WidthOnly : 8,856 -> 8,856: (+0.0%) MemoryUsage_NoHyphenation : 27,592 -> 26,386: (-4.4%) MemoryUsage_NoHyphenation_WidthOnly : 8,000 -> 8,000: (+0.0%) android.text.PrecomputedTextPerfTest: create_NoStyled_Hyphenation : 17,162,475 -> 17,695,377: (+3.1%) create_NoStyled_Hyphenation_WidthOnly : 17,044,784 -> 17,677,423: (+3.7%) create_NoStyled_NoHyphenation : 7,108,911 -> 7,021,486: (-1.2%) create_NoStyled_NoHyphenation_WidthOnly : 7,102,481 -> 7,045,453: (-0.8%) create_Styled_Hyphenation : 12,394,607 -> 12,090,933: (-2.5%) create_Styled_Hyphenation_WidthOnly : 12,297,095 -> 12,105,491: (-1.6%) create_Styled_NoHyphenation : 11,886,364 -> 11,835,249: (-0.4%) create_Styled_NoHyphenation_WidthOnly : 12,018,548 -> 11,871,765: (-1.2%) android.text.StaticLayoutMultithreadPerfTest: create_RandomText_Thread_1 : 7,051,921 -> 6,998,143: (-0.8%) create_RandomText_Thread_2 : 7,112,819 -> 7,032,146: (-1.1%) create_RandomText_Thread_4 : 7,843,295 -> 7,860,874: (+0.2%) android.text.StaticLayoutPerfTest: create_PrecomputedText_Balanced_Hyphenation : 703,563 -> 709,839: (+0.9%) create_PrecomputedText_Balanced_NoHyphenation: 523,437 -> 527,671: (+0.8%) create_PrecomputedText_Greedy_Hyphenation : 470,881 -> 477,259: (+1.4%) create_PrecomputedText_Greedy_NoHyphenation : 471,487 -> 479,772: (+1.8%) create_RandomText_Balanced_Hyphenation : 17,166,857 -> 17,123,681: (-0.3%) create_RandomText_Balanced_NoHyphenation : 7,107,289 -> 7,040,572: (-0.9%) create_RandomText_Greedy_Hyphenation : 7,055,902 -> 7,000,681: (-0.8%) create_RandomText_Greedy_NoHyphenation : 7,032,325 -> 6,997,115: (-0.5%) draw_PrecomputedText_NoStyled : 527,505 -> 543,623: (+3.1%) draw_PrecomputedText_NoStyled_WithoutCache : 526,084 -> 564,742: (+7.3%) draw_PrecomputedText_Styled : 880,951 -> 838,581: (-4.8%) draw_PrecomputedText_Styled_WithoutCache : 874,259 -> 826,775: (-5.4%) draw_RandomText_NoStyled : 549,637 -> 538,162: (-2.1%) draw_RandomText_NoStyled_WithoutCache : 6,449,481 -> 6,401,486: (-0.7%) draw_RandomText_Styled : 1,001,350 -> 1,024,683: (+2.3%) draw_RandomText_Styled_WithoutCache : 2,759,161 -> 2,733,204: (-0.9%) android.widget.TextViewPrecomputedTextPerfTest: newLayout_PrecomputedText : 738,105 -> 736,130: (-0.3%) newLayout_PrecomputedText_Selectable : 17,410,426 -> 17,379,765: (-0.2%) newLayout_RandomText : 16,565,334 -> 16,495,200: (-0.4%) newLayout_RandomText_Selectable : 17,607,671 -> 17,482,439: (-0.7%) onDraw_PrecomputedText : 2,371,858 -> 1,274,921: (-46.2%) onDraw_PrecomputedText_Selectable : 17,493,221 -> 17,367,238: (-0.7%) onDraw_RandomText : 17,349,102 -> 17,224,949: (-0.7%) onDraw_RandomText_Selectable : 18,107,851 -> 18,067,397: (-0.2%) onMeasure_PrecomputedText : 756,229 -> 752,875: (-0.4%) onMeasure_PrecomputedText_Selectable : 17,725,005 -> 17,647,842: (-0.4%) onMeasure_RandomText : 16,636,892 -> 16,435,649: (-1.2%) onMeasure_RandomText_Selectable : 17,866,544 -> 17,724,819: (-0.8%) setText_PrecomputedText : 90,499 -> 92,894: (+2.6%) setText_PrecomputedText_Selectable : 146,906 -> 145,134: (-1.2%) setText_RandomText : 11,251 -> 11,130: (-1.1%) setText_RandomText_Selectable : 48,745 -> 48,900: (+0.3%) Bug: 72998298 Test: atest CtsWidgetTestCases:EditTextTest CtsWidgetTestCases:TextViewFadingEdgeTest FrameworksCoreTests:TextViewFallbackLineSpacingTest FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest CtsTextTestCases FrameworksCoreTests:android.text CtsWidgetTestCases:TextViewPrecomputedTextTest Test: minikin_tests Change-Id: I2290d7e06d9e2f4bc13f60246ce66ba1c1785cdd
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
54e248ac7fa00d430092a8e993c83fccd4f72df5 |
|
20-Feb-2018 |
Seigo Nonaka <nona@google.com> |
Remove kTestFontDir and remove /system/fonts dependency from unit tests Bug: N/A Test: minikin_tests Test: minikin_stress_tests Change-Id: I01c8b885ce196f2f628d347c187691805a4d9c71
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
e1cfa7d7a17f9e24a27132032ec2f77a63e99913 |
|
30-Jan-2018 |
Seigo Nonaka <nona@google.com> |
Clean Up: Make minikin::Font non copy-able This CL contains: - Remove unused constructor of Font. - Make Font not copyable. - Remove MinikinFontForTest and use font with FreeType implementation. Test: minikin_tests Bug: 65024629 Change-Id: I9d06f76b1e724f2aeb1d8dc3e59f15eca2467bcf
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
3fdf60d998ae03ef02e0c53581bca4a06de8321b |
|
29-Jan-2018 |
Seigo Nonaka <nona@google.com> |
Reorganize the arguments of Layout functions Unifies the arguments of the Layout to U16StringPiece, Range and hyphen edits. Verified this doesn't cause any performance regressions: StaticLayout creation time. (w/o -> w/ patch, median, walleye-userdebug) MeasuredText Balanced Hyphenation : 731,739 -> 718,779: (-1.8%) MeasuredText Balanced NoHyphenation: 548,255 -> 537,935: (-1.9%) MeasuredText Greedy Hyphenation : 497,457 -> 486,739: (-2.2%) MeasuredText Greedy NoHyphenation : 499,441 -> 485,704: (-2.8%) RandomText Balanced Hyphenation : 19,248,110 -> 19,223,047: (-0.1%) RandomText Balanced NoHyphenation : 8,015,110 -> 8,019,127: (+0.1%) RandomText Greedy Hyphenation : 7,979,899 -> 7,915,808: (-0.8%) RandomText Greedy NoHyphenation : 7,957,663 -> 7,995,059: (+0.5%) StaticLayout draw time. (w/o -> w/ patch, median, walleye-userdebug) MeasuredText NoStyled : 671,897 -> 660,082: (-1.8%) MeasuredText NoStyled WithoutCache : 657,115 -> 645,904: (-1.7%) MeasuredText Styled : 904,402 -> 887,925: (-1.8%) MeasuredText Styled WithoutCache : 1,130,656 -> 1,102,145: (-2.5%) RandomText NoStyled : 566,494 -> 558,127: (-1.5%) RandomText NoStyled WithoutCache : 9,131,098 -> 9,113,837: (-0.2%) RandomText Styled : 3,059,137 -> 3,033,248: (-0.8%) RandomText Styled WithoutCache : 12,417,799 -> 12,326,487: (-0.7%) Bug: 65024629 Test: minikin_tests Test: bit CtsTextTestCases:* Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest Change-Id: I5a778cc5e26659125aba027c5646934273de81b9
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
37dd6e7493f372fd04dadf94351ca522b56b4119 |
|
28-Jan-2018 |
Seigo Nonaka <nona@google.com> |
Store FontCollection in MinikinPaint This is clean up of the argument of Layout. FontCollection and MinikinPaint are used at the same time, thus good to store FontCollection in MinikinPaint. Verified this doesn't cause any performance regression. Here is a raw perf scores: StaticLayout creation time (w/o -> w/ patch, median, walleye-userdebug): MeasuredText Balanced Hyphenation : 731,739 -> 726,841: (-0.7%) MeasuredText Balanced NoHyphenation: 548,255 -> 546,087: (-0.4%) MeasuredText Greedy Hyphenation : 497,457 -> 498,711: (+0.3%) MeasuredText Greedy NoHyphenation : 499,441 -> 502,785: (+0.7%) RandomText Balanced Hyphenation : 19,248,110 -> 19,183,770: (-0.3%) RandomText Balanced NoHyphenation : 8,015,110 -> 8,036,686: (+0.3%) RandomText Greedy Hyphenation : 7,979,899 -> 7,984,900: (+0.1%) RandomText Greedy NoHyphenation : 7,957,663 -> 7,958,306: (+0.0%) StaticLayout draw time (w/o -> w/ patch, median, walleye-userdebug): MeasuredText NoStyled : 671,897 -> 667,875: (-0.6%) MeasuredText NoStyled WithoutCache : 657,115 -> 652,933: (-0.6%) MeasuredText Styled : 904,402 -> 883,635: (-2.3%) MeasuredText Styled WithoutCache : 1,130,656 -> 1,124,981: (-0.5%) RandomText NoStyled : 566,494 -> 563,629: (-0.5%) RandomText NoStyled WithoutCache : 9,131,098 -> 9,116,869: (-0.2%) RandomText Styled : 3,059,137 -> 3,027,930: (-1.0%) RandomText Styled WithoutCache : 12,417,799 -> 12,374,347: (-0.3%) Bug: 65024629 Test: minikin_tests Change-Id: I03a0bf76a46c91ba16d91e8f7c5f87f26758b4e8
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
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/unittest/LayoutTest.cpp
|
1be4ac71900ca2258491a4d0b72a4bebce19da71 |
|
12-Dec-2017 |
Seigo Nonaka <nona@google.com> |
Initialize ICU only once Looks like ICU can not initialize again even if calls u_cleanup(). Migrate ICU setup from test SetUp/TearDown to global SetUp/TearDown. Bug: 67928956 Test: minikin_tests Change-Id: Iba204ed2b822abfbfa7be41905d88d5f968f1ff7
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
6c8722e217ff5238f0b849152d7936959a728103 |
|
30-Nov-2017 |
Seigo Nonaka <nona@google.com> |
Apply clang-format Bug: 65125938 Test: m Change-Id: I4a4319cc34c186aa0a3ce1d0301af1cd4e0feb81
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
12bf54f4596e4237866ec39ef7c45ed1a8d84fdf |
|
11-Nov-2017 |
Seigo Nonaka <nona@google.com> |
Revert "Store FontCollection in MinikinPaint" This regresses the performance Bug: 69165958 This reverts commit bcc364d35f9993b65f8717842a0b50e7c0d5b2ad. Change-Id: Ic8da6bff67ee23e3d38ee50369126909eab9d9eb
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
bcc364d35f9993b65f8717842a0b50e7c0d5b2ad |
|
09-Nov-2017 |
Seigo Nonaka <nona@google.com> |
Store FontCollection in MinikinPaint Whenever FontCollection is used, MinikinPaint is used at the same time. It would make sense for FontCollection to be a part of MinikinPaint. Bug: 65024629 Test: minikin_tests Test: minikin_stress_tests Change-Id: I8041b8f638d33c67209c0c66f63a0ef7a54471a0
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
b1363f277a872e9b932059b3bd88bc17be1f3577 |
|
02-Nov-2017 |
Seigo Nonaka <nona@google.com> |
Introduce start/end hyphen edit enum and pass separately in most places This CL contains following changes: - Introduce StartHyphenEdit/EndHyphenEdit and use them instead of uint32_t. - MinikinPaint is now immutable. - Stop copying MinikinPaint in LayoutContext. - Make MinikinPaint in addStyleRun argument const. Bug: 65024629 Test: minikin_tests Change-Id: I3b901be3378337611093bad1195dfe33cd0d71bb
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
b47e9b21077d2a0847a64fa713aa9892196b5d2a |
|
27-Oct-2017 |
Seigo Nonaka <nona@google.com> |
Move FontStyle to MinikinPaint member FontStyle is always used with MinikinPaint except for itemization. Also it is populated at the same time from Paint. It would be good for it to be a member of MinikinPaint. On the other hand, LocaleListId was stored in FontStyle is now used everywhere, e.g. Hyphenator, WordBreaker, etc. It would be good for it to be outside of FontStyle. Bug: 65024629 Test: minikin_tests Change-Id: I5199638ed21b0eaf1f426834933f64b603b6302a
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
78aadd58c4500d73f266d34f1f2c1f88309987a6 |
|
26-Oct-2017 |
Seigo Nonaka <nona@google.com> |
Use enum class for Bidi flags This is a mechanical refactoring of changing type definition of bidi flag. Bug: 65024629 Test: checkbuild Change-Id: I9304636899360cd730411e842c8eb432fb23f8e0
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
1d461589869ee5b7102f96271b0ef0a776ab513c |
|
20-Oct-2017 |
Seigo Nonaka <nona@google.com> |
Style cleanup. This CL contains following cleanups: - Rename the following classes and corresponding file names: FontLanguage -> Locale FontLanguages -> LocaleList FontLanguageListCache -> LocaleListCache - Remove unnecessary #include lines. - Define the Minikin's header include ordering and follow that style. See doc/minikin_style.md for details. - Always use std::string and std::vector instead of string and vector with using-declaration. - Replace LOG_ALWAYS_FATAL_IF with MINIKIN_ASSERT so that the assertion is removed on build configuration for user. This CL does not change any behavior. Bug: 65024629 Test: make checkbuild Change-Id: If41bb3c3389303053bbe95e349eb2dd4b619257c
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
73dcaf95147f4d37cc9b1d70dcfa01f0bb52b5ab |
|
21-Aug-2017 |
Roozbeh Pournader <roozbeh@google.com> |
Fix bidi Layout test am: ce9057f804 am: 76ad03b354 Change-Id: Id8fb30d9ce5c6f4f60316d3d34cb981494165c1c
|
ce9057f80423f822e634f5d64979dc12f7b4fbf8 |
|
19-Aug-2017 |
Roozbeh Pournader <roozbeh@google.com> |
Fix bidi Layout test The bidi layout test, introduced in I8824593206ecba74cbc9731e298f045e1ae442a3, was incorrect since it incorrectly passed kBidi_RTL to the Layout, where it should have passed kBidi_Force_RTL. But the error was not caught because Minikin was incorrectly doing bidi calculation on single-run LTR text in RTL paragraphs, so the tests passed. After I2bac7e598d1404170abd543b1659317b397b3d28 fixed that bug, the test started failing. We now correctly kBidi_Force_RTL to Layout. Also add a test for testing the behavior of I2bac7e598d1404170abd543b1659317b397b3d28, by checking the glyph ordering of laid out single-run text in various Test: adb shell /data/nativetest/minikin_tests/minikin_tests Change-Id: I35e72c8aaa74bc3a7adc925ffe3332b9748e5966 Fixes: 64852106 Bug: 64811690
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
33ead53d74e8c8cb5331d7612d4f26d993a4a88b |
|
10-Aug-2017 |
Roozbeh Pournader <roozbeh@google.com> |
Compute vertical extents needed for layout Text laid out in multiple fonts may need more vertical space in order to make sure it doesn't overlap lines above and below it. But the information was previously not available to users of Minikin. Now we allow a parameter in various layout methods that returns the ascent, desent, and line gap based on the maximum values of the fonts actually used in laying out the text. Also, LineBreaker now keeps and returns ascents and descents per line, which callers can use to only allow extra linespacing on lines that have such characters. Finally, font run calculations have been modified to not check support for \n and \r in cmap tables, as they are not needed. This reduces the number of font runs and avoids cases where a fallback font mistakenly gets used and increases the requested ascent and descent. Bug: 28963299 Bug: 29063863 Bug: 32057121 Bug: 37756858 Test: adb shell /data/nativetest/minikin_tests/minikin_tests Test: bit FrameworksCoreTests:android.text. Test: bit CtsTextTestCases:* Change-Id: I959017210f19ced71db05b127148203dcf9a2d42
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
99ef32cef014231c0d544e8d4f97449695d429c0 |
|
14-Mar-2017 |
Seigo Nonaka <nona@google.com> |
Do not keep FontCollection reference in Layout. LayoutCache only keeps result of layout and can live after FontCollection is destructed by GC. This kind of failure will be captured by minikin_stress_tests in the subsequent CL (I1bf4ba43e6e97cd04e7d6dd42d388dd17ce64c7b) Test: ran minikin_tests Bug: 36223724 Change-Id: I639b73c0f1041549158c43212a901c82df4b02db
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
c7ef4000c1e840c3d3b66e85a40ebd34a5a2a8ee |
|
18-Feb-2017 |
Roozbeh Pournader <roozbeh@google.com> |
Correct hyphenation for various complex cases This adds better support for Arabic script languages, Armenian, Catalan, Hebrew, Kannada, Malayalam, Polish, Tamil, and Telugu by adding various hyphenation types and edits appropriate for the locales. For Arabic script languages, soft hyphens act transparently with regard to joining: If a line is broken at a soft hyphen where the two characters around the soft hyphen were joining each other before, they will continue to appear joining if the line is broken at the soft hyphen and a hyphen glyph is inserted. This is needed for Central Asian languages such as Uighur. For Armenian, U+058A ARMENIAN HYPHEN is used for line breaks caused by either automatic hyphenation or soft hyphens. For Catalan, nonstandard line breaks are implemented for "l·l", which hyphenates as "l-/l". For Polish, when there is a line break at a hyphen, the hyphen is repeated at the next line. For the South Indic languages, when breaks happen due to soft breaks or automatic hyphenation, no visible hyphen is inserted, although a penalty is added. For Hebrew, support for using U+05BE HEBREW PUNCTUATION MAQAF has been implemented, but it's turned off pending confirmation of desirability. Also, hard hyphens, which previously had no penalty added for breaking the line after them, now have the same penalty as an automatic or soft break, with the difference that no hyphen is inserted when they break. Finally, some bugs have been fixed with hyphenating multiscript and multi-font words. Bug: 19950445 Bug: 19955011 Bug: 25623243 Bug: 26154469 Bug: 26154471 Bug: 33387871 Bug: 33560754 Bug: 33752592 Bug: 33754204 Test: Unit tests added, plus thorough manual testing Change-Id: Iaccf776ce8d1d434ee8b1c534ff3659d80fdc338
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
dfbc6e374259f9d81940b5195ac013b02429af27 |
|
10-Feb-2017 |
Seigo Nonaka <nona@google.com> |
Remove MinikinRefCounted and use shared_ptr instead Let's use shared_ptr since manual ref counting can be a bug-prone and using the global mutex inside destructor is not useful for some time. To remove raw pointer manipulation, needed to change Layout constructors. Layout is no longer copyable and need to pass FontCollection to constructor. Bug: 28119474 Test: minikin_tests passed Test: hwui_unit_tests passed Test: No performance regression in minikin_perftest. Change-Id: I8824593206ecba74cbc9731e298f045e1ae442a3
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|
acd401d02981af51419f4b740abb2c41e4980fdb |
|
15-Nov-2016 |
Seigo Nonaka <nona@google.com> |
Implement word spacing Add a wordSpacing paint parameter, which will be used for justification. Bug: 31707212 Test: ran minikin_tests Change-Id: I91224ab8ef882ac0c87425c28ab731fead283612
/frameworks/minikin/tests/unittest/LayoutTest.cpp
|