Chromium Code Reviews
DescriptionReland: Move glyph lookup to hb-ot-font and remove glyph cache in HarfBuzzFace
Reland after previous revert in r386473 because the CL caused memory
regressions. Now that HarfBuzz has rolled to 1.2.7 in r390911, which
loads the glyf table lazily, we believe this memory regression is
addressed.
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
Committed: https://crrev.com/4d16ac208962784ddd8744e7a5d4e43b7e24e8ff
Cr-Commit-Position: refs/heads/master@{#391149}
Patch Set 1 #
Messages
Total messages: 10 (4 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||