Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(482)

Issue 1939203002: Reland: Move glyph lookup to hb-ot-font and remove glyph cache in HarfBuzzFace (Closed)

Created:
4 years, 7 months ago by drott
Modified:
4 years, 7 months ago
Reviewers:
eae
CC:
chromium-reviews, krit, pdr+graphicswatchlist_chromium.org, drott+blinkwatch_chromium.org, blink-reviews-platform-graphics_chromium.org, dshwang, jbroman, Justin Novosad, Rik, Stephen Chennney, blink-reviews, f(malita), danakj+watch_chromium.org, kinuko+watch, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland: 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -81 lines) Patch
M third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.h View 2 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.cpp View 11 chunks +25 lines, -72 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 10 (4 generated)
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1939203002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1939203002/1
4 years, 7 months ago (2016-05-02 17:43:45 UTC) #2
eae
LGTM
4 years, 7 months ago (2016-05-02 18:00:16 UTC) #3
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/214858)
4 years, 7 months ago (2016-05-02 20:56:50 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1939203002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1939203002/1
4 years, 7 months ago (2016-05-02 22:13:55 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 7 months ago (2016-05-03 01:37:54 UTC) #8
commit-bot: I haz the power
4 years, 7 months ago (2016-05-03 01:39:45 UTC) #10
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/4d16ac208962784ddd8744e7a5d4e43b7e24e8ff
Cr-Commit-Position: refs/heads/master@{#391149}

Powered by Google App Engine
This is Rietveld 408576698