Chromium Code Reviews
DescriptionMove glyph lookup to hb-ot-font and remove glyph cache in HarfBuzzFace
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.
Note to ChromeOS developers: If this change breaks your workflow linking
release builds with system HarfBuzz because of an old version of
HarfBuzz on the host system, we recommend to install and apt-pin the
same version of the HarfBuzz library on your host system that ChromeOS
uses. Please see bug 589342.
BUG=589340
R=eae,behdad,kojii
Committed: https://crrev.com/85a2c1c0597a31b043e58fe4a4ce00a88ebc0684
Cr-Commit-Position: refs/heads/master@{#377849}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Use OwnPtr instead of ScopedPtr #Patch Set 3 : updated memory management, no more ref'ing, OwnPtr in HarfBuzzFace #
Messages
Total messages: 28 (9 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||