Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(13)

Issue 1179723002: Store glyph bounds in WordMeasurement to avoid slow path width calc (Closed)

Created:
4 years, 10 months ago by Xianzhu
Modified:
4 years, 10 months ago
Reviewers:
chrishtr, eae
CC:
blink-reviews, pdr+renderingwatchlist_chromium.org, zoltan1, szager+layoutwatch_chromium.org, eae+blinkwatch, leviw+renderwatch, blink-reviews-rendering, jchaffraix+rendering
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Store glyph bounds in WordMeasurement to avoid slow path width calc This CL brings back the fast path of setLogicalWidthForTextRun (in LayoutBlockFlowLine.cpp) which is 10+x faster than the slow path based on my performance measurement. Store glyph bounds of words in WordMeasurement to avoid recomputation. The stored glyph bounds will be used to compute the glyph bounds of RootLineBoxs in the fast path. Let Font::width() etc. output glyph bounds (as FloatRect) instead of GlyphOverflow so that the callers can accumulate them to form bigger glyph bounds. This CL is to fix the performance regression caused by https://codereview.chromium.org/1153173011 which removed the fast path when it didn't support computation of glyph overflow. BUG=498625 R=eae@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=196978

Patch Set 1 : Restore original LayoutBlockFlowLine.cpp before https://codereview.chromium.org/1153173011 for comparison #

Patch Set 2 : For review #

Total comments: 7

Patch Set 3 : NeedsRebaseline; GlyphOverflow.h copyright #

Patch Set 4 : NeedsRebaseline; GlyphOverflow.h copyright #

Patch Set 5 : Rebase #

Patch Set 6 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+237 lines, -140 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 3 chunks +30 lines, -2 lines 0 comments Download
M Source/core/core.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/layout/LayoutBR.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutBlock.cpp View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/layout/LayoutBlockFlowLine.cpp View 1 2 3 4 2 chunks +53 lines, -3 lines 0 comments Download
M Source/core/layout/LayoutText.h View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M Source/core/layout/LayoutText.cpp View 1 16 chunks +41 lines, -39 lines 0 comments Download
M Source/core/layout/LayoutTextCombine.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutTextCombine.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/layout/line/BreakingContextInlineHeaders.h View 1 4 chunks +8 lines, -12 lines 0 comments Download
A Source/core/layout/line/GlyphOverflow.h View 1 2 1 chunk +69 lines, -0 lines 0 comments Download
M Source/core/layout/line/InlineFlowBox.cpp View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/layout/line/RootInlineBox.cpp View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/layout/line/WordMeasurement.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/platform/fonts/Font.h View 1 3 chunks +5 lines, -29 lines 0 comments Download
M Source/platform/fonts/Font.cpp View 1 4 chunks +16 lines, -45 lines 0 comments Download
M Source/platform/fonts/WidthCache.h View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 19 (12 generated)
Xianzhu
Notes about the changes: https://codereview.chromium.org/1179723002/diff/120001/Source/core/layout/LayoutBlockFlowLine.cpp File Source/core/layout/LayoutBlockFlowLine.cpp (right): https://codereview.chromium.org/1179723002/diff/120001/Source/core/layout/LayoutBlockFlowLine.cpp#newcode383 Source/core/layout/LayoutBlockFlowLine.cpp:383: Line 384 to line 432 ...
4 years, 10 months ago (2015-06-11 18:22:48 UTC) #7
eae
LGTM, nice, I like this! https://codereview.chromium.org/1179723002/diff/120001/Source/core/layout/line/GlyphOverflow.h File Source/core/layout/line/GlyphOverflow.h (right): https://codereview.chromium.org/1179723002/diff/120001/Source/core/layout/line/GlyphOverflow.h#newcode1 Source/core/layout/line/GlyphOverflow.h:1: // Copyright 2015 The ...
4 years, 10 months ago (2015-06-11 18:33:38 UTC) #8
Xianzhu
https://codereview.chromium.org/1179723002/diff/120001/Source/core/layout/line/GlyphOverflow.h File Source/core/layout/line/GlyphOverflow.h (right): https://codereview.chromium.org/1179723002/diff/120001/Source/core/layout/line/GlyphOverflow.h#newcode1 Source/core/layout/line/GlyphOverflow.h:1: // Copyright 2015 The Chromium Authors. All rights reserved. ...
4 years, 10 months ago (2015-06-11 20:40:09 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1179723002/160001
4 years, 10 months ago (2015-06-11 20:40:30 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: mac_blink_compile_dbg on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/mac_blink_compile_dbg/builds/47254)
4 years, 10 months ago (2015-06-11 20:43:35 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1179723002/180001
4 years, 10 months ago (2015-06-11 20:59:53 UTC) #17
Xianzhu
4 years, 10 months ago (2015-06-11 22:45:06 UTC) #19
Message was sent while issue was closed.
Committed patchset #6 (id:200001) manually as 196978 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698