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

Issue 802833003: Remove the SVG paint culling optimization (Closed)

Created:
6 years ago by pdr.
Modified:
6 years ago
Reviewers:
chrishtr, f(malita), fs
CC:
blink-reviews, blink-reviews-paint_chromium.org, blink-reviews-rendering, Dominik Röttsches, krit, eae+blinkwatch, ed+blinkwatch_opera.com, f(malita), fs, gyuyoung.kim_webkit.org, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, slimming-paint-reviews_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Remove the SVG paint culling optimization This patch removes the paint culling optimization added in [1] which is not as useful as it once was. We now use Skia which culls internally and the overhead of checking for culling in SVG makes this optimization a small loss in terms of performance on our microbenchmarks [2]. The primary change in this patch is to remove the updating and checking of PaintInfo.rect within the SVG painting code. For ForeignObject and Text, an adjustment of the PaintInfo rect is required to avoid clipping in the text painting code. This adjustment is implemented by caching the paint invalidation transform. For filters in SVG, this patch replaces the PaintInfo rect adjustment with an infinite rect. [1] http://trac.webkit.org/changeset/52900 [2] http://pr.gg/svgperfresults.png BUG=442008 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=187567

Patch Set 1 #

Patch Set 2 : Update PaintInfo rect when leaving SVG #

Total comments: 14

Patch Set 3 : Cache from the paint invalidation phase #

Patch Set 4 : Remove isInvertible check #

Patch Set 5 : Fix a couple regressions #

Patch Set 6 : Remove spurious lines #

Total comments: 7

Patch Set 7 : Fix for non cached transform, small cleanups #

Patch Set 8 : Remove unused field #

Total comments: 4

Patch Set 9 : Address reviewer comments #

Patch Set 10 : Fix test for the moon lander. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -46 lines) Patch
A LayoutTests/svg/foreignObject/transformed-text-invalidation.html View 1 2 3 4 5 6 7 8 9 1 chunk +18 lines, -0 lines 0 comments Download
A LayoutTests/svg/foreignObject/transformed-text-invalidation-expected.html View 1 2 3 4 5 6 1 chunk +14 lines, -0 lines 0 comments Download
M Source/core/paint/SVGContainerPainter.cpp View 2 chunks +1 line, -5 lines 0 comments Download
M Source/core/paint/SVGForeignObjectPainter.cpp View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/paint/SVGImagePainter.cpp View 2 chunks +1 line, -5 lines 0 comments Download
M Source/core/paint/SVGRootPainter.cpp View 1 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/paint/SVGShapePainter.cpp View 2 chunks +1 line, -5 lines 0 comments Download
M Source/core/paint/SVGTextPainter.cpp View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/rendering/PaintInfo.h View 2 chunks +0 lines, -10 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGBlock.h View 1 2 3 4 5 6 2 chunks +5 lines, -0 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGBlock.cpp View 1 2 3 4 5 6 7 8 1 chunk +21 lines, -0 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGResourceFilter.h View 1 2 3 4 5 6 7 2 chunks +0 lines, -2 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGResourceFilter.cpp View 1 2 3 4 2 chunks +3 lines, -11 lines 0 comments Download
M Source/core/rendering/svg/SVGRenderSupport.h View 2 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/rendering/svg/SVGRenderSupport.cpp View 2 1 chunk +0 lines, -5 lines 0 comments Download
M Source/core/rendering/svg/SVGRenderingContext.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 18 (4 generated)
pdr.
https://codereview.chromium.org/802833003/diff/20001/Source/core/paint/SVGForeignObjectPainter.cpp File Source/core/paint/SVGForeignObjectPainter.cpp (right): https://codereview.chromium.org/802833003/diff/20001/Source/core/paint/SVGForeignObjectPainter.cpp#newcode29 Source/core/paint/SVGForeignObjectPainter.cpp:29: const AffineTransform& transform = SVGRenderSupport::transformToRootBorderBox(m_renderSVGForeignObject, m_renderSVGForeignObject.localTransform()); How can we ...
6 years ago (2014-12-15 05:02:21 UTC) #2
fs
So... removal of paintInvalidationRectInLocalCoordinates draws nigh ;-) https://codereview.chromium.org/802833003/diff/20001/Source/core/paint/SVGForeignObjectPainter.cpp File Source/core/paint/SVGForeignObjectPainter.cpp (right): https://codereview.chromium.org/802833003/diff/20001/Source/core/paint/SVGForeignObjectPainter.cpp#newcode29 Source/core/paint/SVGForeignObjectPainter.cpp:29: const AffineTransform& ...
6 years ago (2014-12-15 10:28:16 UTC) #3
chrishtr
https://codereview.chromium.org/802833003/diff/20001/Source/core/paint/SVGForeignObjectPainter.cpp File Source/core/paint/SVGForeignObjectPainter.cpp (right): https://codereview.chromium.org/802833003/diff/20001/Source/core/paint/SVGForeignObjectPainter.cpp#newcode31 Source/core/paint/SVGForeignObjectPainter.cpp:31: Maybe just use an infinite rect here to turn ...
6 years ago (2014-12-15 16:36:25 UTC) #4
pdr.
Thanks for the reviews! Fredrick's paint invalidation idea works but there are a few failures ...
6 years ago (2014-12-16 06:29:56 UTC) #5
fs
https://codereview.chromium.org/802833003/diff/20001/Source/core/paint/SVGForeignObjectPainter.cpp File Source/core/paint/SVGForeignObjectPainter.cpp (right): https://codereview.chromium.org/802833003/diff/20001/Source/core/paint/SVGForeignObjectPainter.cpp#newcode29 Source/core/paint/SVGForeignObjectPainter.cpp:29: const AffineTransform& transform = SVGRenderSupport::transformToRootBorderBox(m_renderSVGForeignObject, m_renderSVGForeignObject.localTransform()); On 2014/12/16 06:29:56, ...
6 years ago (2014-12-16 09:43:55 UTC) #6
pdr.
Issues fixed! I think we're getting close now. PTAL
6 years ago (2014-12-17 08:09:21 UTC) #7
fs
Almost there... https://codereview.chromium.org/802833003/diff/100001/Source/core/paint/SVGForeignObjectPainter.cpp File Source/core/paint/SVGForeignObjectPainter.cpp (right): https://codereview.chromium.org/802833003/diff/100001/Source/core/paint/SVGForeignObjectPainter.cpp#newcode28 Source/core/paint/SVGForeignObjectPainter.cpp:28: AffineTransform transformToRoot = m_renderSVGForeignObject.cachedPaintInvalidationTransform() * m_renderSVGForeignObject.localTransform(); Nit: ...
6 years ago (2014-12-17 10:16:11 UTC) #8
pdr.
PTAL https://codereview.chromium.org/802833003/diff/20001/Source/core/rendering/svg/SVGRenderSupport.cpp File Source/core/rendering/svg/SVGRenderSupport.cpp (right): https://codereview.chromium.org/802833003/diff/20001/Source/core/rendering/svg/SVGRenderSupport.cpp#newcode152 Source/core/rendering/svg/SVGRenderSupport.cpp:152: while (next && !next->isSVGRoot()) { On 2014/12/15 at ...
6 years ago (2014-12-18 22:22:41 UTC) #9
fs
LGTM w/ the issue in RenderSVGBlock addressed. (I'll be OOO for a while after today, ...
6 years ago (2014-12-19 11:46:01 UTC) #10
pdr.
Thanks for the excellent reviews--saved us from several tricky regressions. Off to the CQ! https://codereview.chromium.org/802833003/diff/140001/LayoutTests/svg/foreignObject/transformed-text-invalidation.html ...
6 years ago (2014-12-19 18:39:15 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/802833003/160001
6 years ago (2014-12-19 18:40:25 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/42838)
6 years ago (2014-12-19 21:18:57 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/802833003/180001
6 years ago (2014-12-19 21:38:09 UTC) #17
commit-bot: I haz the power
6 years ago (2014-12-19 22:59:23 UTC) #18
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=187567

Powered by Google App Engine
This is Rietveld 408576698