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

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

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

Description

Move 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 #

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

Messages

Total messages: 28 (9 generated)
drott
4 years, 10 months ago (2016-02-25 07:03:27 UTC) #1
kojii
I understand much better now, thanks for doing this. So we used to create a ...
4 years, 10 months ago (2016-02-25 07:55:17 UTC) #2
kojii
On 2016/02/25 at 07:55:17, kojii wrote: > I would split out... ah, never mind this. ...
4 years, 10 months ago (2016-02-25 08:11:34 UTC) #3
drott
Use OwnPtr instead of ScopedPtr
4 years, 10 months ago (2016-02-25 09:03:51 UTC) #4
drott
https://codereview.chromium.org/1733193002/diff/1/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.cpp File third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.cpp (right): https://codereview.chromium.org/1733193002/diff/1/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.cpp#newcode296 third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.cpp:296: HarfBuzzScopedPtr<hb_font_t> otFont(hb_font_create(m_face), hb_font_destroy); Thanks, good point, updated accordingly.
4 years, 10 months ago (2016-02-25 09:06:00 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1733193002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1733193002/20001
4 years, 10 months ago (2016-02-25 09:09:33 UTC) #7
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/186761)
4 years, 10 months ago (2016-02-25 10:12:08 UTC) #9
eae
Very nice! LGTM
4 years, 10 months ago (2016-02-25 18:02:38 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1733193002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1733193002/20001
4 years, 10 months ago (2016-02-26 00:54:28 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/122032)
4 years, 10 months ago (2016-02-26 02:42:39 UTC) #14
drott
updated memory management, no more ref'ing, OwnPtr in HarfBuzzFace
4 years, 10 months ago (2016-02-26 03:48:06 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1733193002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1733193002/40001
4 years, 10 months ago (2016-02-26 03:49:58 UTC) #17
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-26 05:04:49 UTC) #19
kojii
lgtm!!
4 years, 10 months ago (2016-02-26 06:57:57 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1733193002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1733193002/40001
4 years, 10 months ago (2016-02-26 07:51:04 UTC) #23
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 10 months ago (2016-02-26 08:16:05 UTC) #24
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/85a2c1c0597a31b043e58fe4a4ce00a88ebc0684 Cr-Commit-Position: refs/heads/master@{#377849}
4 years, 10 months ago (2016-02-26 08:18:35 UTC) #26
achuithb
This breaks my compile: ../../third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.cpp:296:5: error: use of undeclared identifier 'hb_ot_font_set_funcs' hb_ot_font_set_funcs(otFont.get()); ^ 1 error ...
4 years, 10 months ago (2016-02-26 10:29:53 UTC) #27
drott
4 years, 10 months ago (2016-02-26 11:12:23 UTC) #28
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:40001) has been created in
https://codereview.chromium.org/1742593003/ by drott@chromium.org.

The reason for reverting is: It seems to break chromeos=1, not only buildtype
official. Reverting and will start discussing an agreeable solution on
chrome-dev..

Powered by Google App Engine
This is Rietveld 408576698