Chromium Code Reviews
DescriptionReland: Move glyph lookup to hb-ot-font and remove glyph cache in HarfBuzzFace
Relanding after previously reverted because it caused linkage issues
for chromeos=1 developer builds in Linux. These should be addressed
now through dpranke@'s fixes in issue 589342.
Together with Behdad we identified several ways to optimize and cleanup
HarfBuzzFace:
* We moved the glyph lookup completely to the built-in HarfBuzz
implementation in hb-ot-font.
* This allows us to remove the unbounded glyph cache we kept around in
HarfBuzzFace.
* We also moved instantantion and ownership of HarfBuzzFontData to
HarfBuzzFace. We only update the size and unicode-range on each call
to getScaledFont(), saving us as the allocation and setup costs of
this object for each shaping call.
* We removed the unneeded callback for retrieving the horizontal origin,
which was implemented as a noop.
In local measurements on Mac this leads to large improvements in the
blink_perf.layout tests, especially in
chapter-reflow-once-random (>130%), flexbox-lots-of-data (>58%) and
ArabicLineLayout (>26%) with only a few of the microbenchmarks being
slightly slower: So this is an improvement for layout cases that do not
profit much from the word cache.
TBR'ing since this has previously been LGTMed in
https://codereview.chromium.org/1733193002
BUG=589340
TBR=eae,behdad,kojii
Committed: https://crrev.com/b2a8582e83ef3022ac1cc65648348dfd168b77cd
Cr-Commit-Position: refs/heads/master@{#385631}
Patch Set 1 #
Messages
Total messages: 11 (5 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||