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

Issue 1980913002: Unify glyph metrics to use the same Skia API (Closed)

Created:
4 years, 7 months ago by drott
Modified:
4 years, 4 months ago
Reviewers:
f(malita), pdr., kojii, eae, tzik
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, wkorman
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Unify glyph metrics to use the same Skia API Use identical glyph metrics based bounds in HarfBuzz callbacks as well as ShapeResult's glyph bounds calculation, except on Mac, due to Skia bug https://bugs.chromium.org/p/skia/issues/detail?id=5328 * Using the same glyph bounds callback in HarfBuzz shaping and in ShapeResult's glyph bounds calculation enables reusing of the same cache in Skia, as opposed to using the cached glyph metrics based cache vs. using a second cache for path based metrics before. Local benchmarking of the blink_perf.layout shows 12.44% improvements for the character_fallback test and 1.8-5% improvements on chapter-reflow-once, line-layout and latin-complex-test. There are also some hits on flexbox-lots of data and flexbox-row-nowrap. I am not 100% convinced that the local benchmarks are accurate enough and would like to observe the results on the bot. Overall, we should see a layout speed improvement, perhaps even in the page cyclers. BUG=610313 R=kojii,tzik Committed: https://crrev.com/9e47ba024f0061ea667565451c2842f66813fee7 Cr-Commit-Position: refs/heads/master@{#407755}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Try addressing Mac failures by removing xHeight sanitization #

Patch Set 3 : Alternative xHeight fixup attempt on Mac #

Patch Set 4 : new idea for mac fixup #

Patch Set 5 : keep path based metric for mac os, move encoding setting to constructor #

Patch Set 6 : bounds argument -> nullptr, copyright year #

Patch Set 7 : Rebased #

Patch Set 8 : Keep path based metrics on Mac #

Patch Set 9 : Rebaseline SVG text, avoid overflow bounds in unit test, use roundOut consistently #

Patch Set 10 : rebaseline remaining failures, minor bounding box changes #

Patch Set 11 : Rebaseline more win failures #

Total comments: 2

Patch Set 12 : Don't remove glyphToBoundsMap yet #

Total comments: 4

Patch Set 13 : Addressed Koji's review comments #

Patch Set 14 : Removed a spurious header line #

Unified diffs Side-by-side diffs Delta from patch set Stats (+552 lines, -91 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +391 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMappingTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/blink_platform.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/SimpleFontData.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +21 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +11 lines, -46 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.cpp View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +4 lines, -33 lines 0 comments Download
A third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +30 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +88 lines, -0 lines 0 comments Download

Messages

Total messages: 104 (54 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1980913002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1980913002/1
4 years, 7 months ago (2016-05-16 14:47:25 UTC) #2
drott
One possible attempt for addressing tzik's findings in the bug.
4 years, 7 months ago (2016-05-16 14:47:37 UTC) #3
tzik
On 2016/05/16 at 14:47:37, drott wrote: > One possible attempt for addressing tzik's findings in ...
4 years, 7 months ago (2016-05-16 15:08:14 UTC) #5
f(malita)
(drive-by nits) This is great, I've been trying to get rid of the path-based glyph ...
4 years, 7 months ago (2016-05-16 15:08:41 UTC) #6
tzik
https://codereview.chromium.org/1980913002/diff/1/third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.cpp File third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.cpp (right): https://codereview.chromium.org/1980913002/diff/1/third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.cpp#newcode1 third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.cpp:1: // Copyright 2015 The Chromium Authors. All rights reserved. ...
4 years, 7 months ago (2016-05-16 15:12:24 UTC) #7
drott
On 2016/05/16 at 15:08:14, tzik wrote: > On 2016/05/16 at 14:47:37, drott wrote: > > ...
4 years, 7 months ago (2016-05-16 15:18:50 UTC) #9
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/229478)
4 years, 7 months ago (2016-05-16 15:55:17 UTC) #11
tzik
On 2016/05/16 at 15:18:50, drott wrote: > On 2016/05/16 at 15:08:14, tzik wrote: > > ...
4 years, 7 months ago (2016-05-16 18:53:40 UTC) #12
drott
https://codereview.chromium.org/1980913002/diff/1/third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.cpp File third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.cpp (right): https://codereview.chromium.org/1980913002/diff/1/third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.cpp#newcode56 third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.cpp:56: m_paint->getTextWidths(&glyph, sizeof(glyph), &skWidth, bounds); > Since this CL doesn't ...
4 years, 7 months ago (2016-05-16 19:46:31 UTC) #13
kojii
On 2016/05/16 at 19:46:31, drott wrote: > > Since this CL doesn't change the situation, ...
4 years, 7 months ago (2016-05-16 23:29:31 UTC) #14
tzik
On 2016/05/16 at 23:29:31, kojii wrote: > On 2016/05/16 at 19:46:31, drott wrote: > > ...
4 years, 7 months ago (2016-05-17 03:15:34 UTC) #15
tzik
On 2016/05/17 03:15:34, tzik wrote: > On 2016/05/16 at 23:29:31, kojii wrote: > > On ...
4 years, 7 months ago (2016-05-17 07:32:33 UTC) #16
drott
On 2016/05/16 at 15:08:41, fmalita wrote: > (drive-by nits) > > This is great, I've ...
4 years, 7 months ago (2016-05-17 08:46:59 UTC) #17
kojii
On 2016/05/17 at 08:46:59, drott wrote: > On 2016/05/16 at 15:08:41, fmalita wrote: > > ...
4 years, 7 months ago (2016-05-17 10:22:26 UTC) #18
drott
Try addressing Mac failures by removing xHeight sanitization
4 years, 7 months ago (2016-05-19 09:09:11 UTC) #19
drott
Alternative xHeight fixup attempt on Mac
4 years, 7 months ago (2016-05-19 12:56:58 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1980913002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1980913002/40001
4 years, 7 months ago (2016-05-19 12:57:06 UTC) #22
commit-bot: I haz the power
Dry run: 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/224835)
4 years, 7 months ago (2016-05-19 14:13:19 UTC) #24
drott
Turns out that the path-based xHeight and the getTextWidths based glyph height return rather different ...
4 years, 7 months ago (2016-05-19 17:35:27 UTC) #25
drott
new idea for mac fixup
4 years, 7 months ago (2016-05-20 09:38:31 UTC) #27
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1980913002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1980913002/60001
4 years, 7 months ago (2016-05-20 09:38:42 UTC) #28
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/232841)
4 years, 7 months ago (2016-05-20 10:49:53 UTC) #30
drott
keep path based metric for mac os, move encoding setting to constructor
4 years, 7 months ago (2016-05-20 14:12:14 UTC) #32
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1980913002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1980913002/80001
4 years, 7 months ago (2016-05-20 14:12:22 UTC) #33
drott
bounds argument -> nullptr, copyright year
4 years, 7 months ago (2016-05-20 14:24:32 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1980913002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1980913002/100001
4 years, 7 months ago (2016-05-20 14:24:45 UTC) #36
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/217421)
4 years, 7 months ago (2016-05-20 15:22:57 UTC) #38
drott
Rebased
4 years, 5 months ago (2016-07-06 12:01:19 UTC) #39
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1980913002/120001
4 years, 5 months ago (2016-07-06 12:01:35 UTC) #41
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/240433)
4 years, 5 months ago (2016-07-06 12:55:27 UTC) #43
drott
Keep path based metrics on Mac
4 years, 5 months ago (2016-07-06 13:19:42 UTC) #44
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1980913002/140001
4 years, 5 months ago (2016-07-06 13:19:57 UTC) #46
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/255371)
4 years, 5 months ago (2016-07-06 14:12:51 UTC) #49
drott
pdr@, the SVG failures look like 1-2 pixel changes to element bounding boxes. What do ...
4 years, 5 months ago (2016-07-18 15:21:38 UTC) #51
pdr.
On 2016/07/18 at 15:21:38, drott wrote: > pdr@, the SVG failures look like 1-2 pixel ...
4 years, 5 months ago (2016-07-20 23:16:55 UTC) #52
drott
On 2016/07/20 at 23:16:55, pdr wrote: > The pixel changes look good to me to ...
4 years, 5 months ago (2016-07-21 09:00:22 UTC) #55
eae
This is great! One question however. LGTM w/nit https://codereview.chromium.org/1980913002/diff/200001/third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.cpp File third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.cpp (right): https://codereview.chromium.org/1980913002/diff/200001/third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.cpp#newcode35 third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.cpp:35: if ...
4 years, 5 months ago (2016-07-21 17:56:02 UTC) #70
drott
Thanks for the review. https://codereview.chromium.org/1980913002/diff/200001/third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.cpp File third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.cpp (right): https://codereview.chromium.org/1980913002/diff/200001/third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.cpp#newcode35 third_party/WebKit/Source/platform/fonts/skia/SkiaTextMetrics.cpp:35: if (width) { On 2016/07/21 ...
4 years, 5 months ago (2016-07-21 18:00:24 UTC) #72
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1980913002/200001
4 years, 5 months ago (2016-07-21 18:03:25 UTC) #75
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/264088)
4 years, 5 months ago (2016-07-21 20:24:55 UTC) #77
drott
Not landing this yet. I am investigating a performance issue on the failing mac test: ...
4 years, 5 months ago (2016-07-22 14:30:18 UTC) #79
drott
Updated the CL description and not removing glyph to bounds map yet. I don't fully ...
4 years, 5 months ago (2016-07-25 14:21:36 UTC) #83
kojii
That's really a great finding for editing/selection to improve. https://codereview.chromium.org/1980913002/diff/220001/third_party/WebKit/Source/platform/blink_platform.gypi File third_party/WebKit/Source/platform/blink_platform.gypi (left): https://codereview.chromium.org/1980913002/diff/220001/third_party/WebKit/Source/platform/blink_platform.gypi#oldcode421 third_party/WebKit/Source/platform/blink_platform.gypi:421: ...
4 years, 5 months ago (2016-07-25 16:36:28 UTC) #86
drott
Addressed Koji's review comments
4 years, 4 months ago (2016-07-26 07:48:37 UTC) #87
drott
Thanks for the review, updated. https://codereview.chromium.org/1980913002/diff/220001/third_party/WebKit/Source/platform/blink_platform.gypi File third_party/WebKit/Source/platform/blink_platform.gypi (left): https://codereview.chromium.org/1980913002/diff/220001/third_party/WebKit/Source/platform/blink_platform.gypi#oldcode421 third_party/WebKit/Source/platform/blink_platform.gypi:421: 'fonts/GlyphMetricsMap.h', On 2016/07/25 at ...
4 years, 4 months ago (2016-07-26 07:49:36 UTC) #90
drott
Removed a spurious header line
4 years, 4 months ago (2016-07-26 08:02:31 UTC) #93
kojii
lgtm
4 years, 4 months ago (2016-07-26 09:07:32 UTC) #96
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1980913002/260001
4 years, 4 months ago (2016-07-26 09:54:25 UTC) #101
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 4 months ago (2016-07-26 09:57:56 UTC) #102
commit-bot: I haz the power
4 years, 4 months ago (2016-07-26 09:59:46 UTC) #104
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/9e47ba024f0061ea667565451c2842f66813fee7
Cr-Commit-Position: refs/heads/master@{#407755}

Powered by Google App Engine
This is Rietveld 408576698