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

Issue 1158583003: Reduce how often LayoutSVGShape::updateShapeFromElement is called (Closed)

Created:
5 years, 6 months ago by pdr.
Modified:
5 years, 6 months ago
Reviewers:
esprehn, fs
CC:
darktears, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-rendering, krit, eae+blinkwatch, Eric Willigers, f(malita), fs, gyuyoung2, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rjwright, rwlbuis, Stephen Chennney, shans, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Reduce how often LayoutSVGShape::updateShapeFromElement is called LayoutSVGShape::updateShapeFromElement is used by path elements to create a Path from the 'd' attribute which is relatively expensive. For non-path subclasses of LayoutSVGShape, updateShapeFromElement is used to update non-path alternatives (e.g., bounds of an ellipse). This patch factors out the shape update code (updateShapeFromElement) from updating the bounding boxes which is now handled in updateStrokeAndFillBoundingBoxes. With shape updating and bounding box updating separated, it is possible to skip the expensive path calculation in updateShapeFromElement when only the bounding boxes need updating [1]. A small change was needed in LayoutSVG{Rect,Ellipse}::styleDidChange where a shape update is forced for shape-dependent properties. [1] http://pr.gg/spinners.html, http://crbug.com/491422 BUG=491422 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197267

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address reviewer comments #

Patch Set 3 : Fix marker regression #

Total comments: 13

Patch Set 4 : Address reviewer comments #

Patch Set 5 : Cleanup for reviewability #

Patch Set 6 : Put selfHasRelativeLengths back #

Unified diffs Side-by-side diffs Delta from patch set Stats (+163 lines, -117 lines) Patch
M Source/core/layout/svg/LayoutSVGEllipse.h View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M Source/core/layout/svg/LayoutSVGEllipse.cpp View 1 2 3 4 3 chunks +59 lines, -28 lines 0 comments Download
M Source/core/layout/svg/LayoutSVGPath.h View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M Source/core/layout/svg/LayoutSVGPath.cpp View 1 2 3 4 2 chunks +16 lines, -19 lines 0 comments Download
M Source/core/layout/svg/LayoutSVGRect.h View 1 2 3 4 1 chunk +4 lines, -2 lines 0 comments Download
M Source/core/layout/svg/LayoutSVGRect.cpp View 1 2 3 4 3 chunks +48 lines, -23 lines 0 comments Download
M Source/core/layout/svg/LayoutSVGShape.h View 1 2 3 3 chunks +5 lines, -4 lines 0 comments Download
M Source/core/layout/svg/LayoutSVGShape.cpp View 1 2 3 3 chunks +24 lines, -36 lines 0 comments Download
M Source/core/paint/SVGShapePainter.cpp View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 20 (7 generated)
pdr.
5 years, 6 months ago (2015-05-31 02:54:02 UTC) #2
fs
https://codereview.chromium.org/1158583003/diff/1/Source/core/layout/svg/LayoutSVGShape.cpp File Source/core/layout/svg/LayoutSVGShape.cpp (right): https://codereview.chromium.org/1158583003/diff/1/Source/core/layout/svg/LayoutSVGShape.cpp#newcode159 Source/core/layout/svg/LayoutSVGShape.cpp:159: updateShapeFromElement(); This also updates m_strokeBoundingBox, so we'll need to ...
5 years, 6 months ago (2015-06-01 09:09:20 UTC) #3
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1158583003/20001
5 years, 6 months ago (2015-06-15 05:53:13 UTC) #5
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/66571)
5 years, 6 months ago (2015-06-15 07:26:17 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1158583003/40001
5 years, 6 months ago (2015-06-15 20:30:28 UTC) #9
pdr.
On 2015/06/01 at 09:09:20, fs wrote: PTAL
5 years, 6 months ago (2015-06-15 20:31:16 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 6 months ago (2015-06-15 21:58:39 UTC) #12
fs
https://codereview.chromium.org/1158583003/diff/40001/Source/core/layout/svg/LayoutSVGEllipse.cpp File Source/core/layout/svg/LayoutSVGEllipse.cpp (right): https://codereview.chromium.org/1158583003/diff/40001/Source/core/layout/svg/LayoutSVGEllipse.cpp#newcode98 Source/core/layout/svg/LayoutSVGEllipse.cpp:98: m_usePathFallback = false; This is a bit unpleasant - ...
5 years, 6 months ago (2015-06-16 10:54:02 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1158583003/60001
5 years, 6 months ago (2015-06-17 00:05:20 UTC) #15
pdr.
Thanks for the detailed review. PTAL https://codereview.chromium.org/1158583003/diff/40001/Source/core/layout/svg/LayoutSVGEllipse.cpp File Source/core/layout/svg/LayoutSVGEllipse.cpp (right): https://codereview.chromium.org/1158583003/diff/40001/Source/core/layout/svg/LayoutSVGEllipse.cpp#newcode98 Source/core/layout/svg/LayoutSVGEllipse.cpp:98: m_usePathFallback = false; ...
5 years, 6 months ago (2015-06-17 03:50:49 UTC) #16
fs
lgtm https://codereview.chromium.org/1158583003/diff/40001/Source/core/layout/svg/LayoutSVGEllipse.cpp File Source/core/layout/svg/LayoutSVGEllipse.cpp (right): https://codereview.chromium.org/1158583003/diff/40001/Source/core/layout/svg/LayoutSVGEllipse.cpp#newcode98 Source/core/layout/svg/LayoutSVGEllipse.cpp:98: m_usePathFallback = false; On 2015/06/17 03:50:49, pdr wrote: ...
5 years, 6 months ago (2015-06-17 11:15:29 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1158583003/100001
5 years, 6 months ago (2015-06-17 14:38:26 UTC) #19
commit-bot: I haz the power
5 years, 6 months ago (2015-06-17 15:55:27 UTC) #20
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=197267

Powered by Google App Engine
This is Rietveld 408576698