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

Issue 601093002: Move SVG container paint code to SVGContainerPainter (Closed)

Created:
6 years, 3 months ago by pdr.
Modified:
6 years, 2 months ago
Reviewers:
chrishtr, f(malita), fs
CC:
blink-reviews, blink-reviews-rendering, chrome-slimming-paint_google.com, krit, eae+blinkwatch, ed+blinkwatch_opera.com, fs, gyuyoung.kim_webkit.org, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, rune+blink, Stephen Chennney, zoltan1
Project:
blink
Visibility:
Public.

Description

Move SVG container paint code to SVGContainerPainter This patch moves the direct painting code (through paint(...)) to the new SVGContainerPainter. The resource container subclasses of RenderSVGContainer have a second painting codepath through draw() functions which will be moved to a painter class in a separate patch. This patch is primarily a straight code move but contains the following non-trivial changes: 1) RenderSVGViewport::applyViewportClip was not implemented directly but RenderSVGViewportContainer and RenderSVGResourceMarker override it for clipping. Instead of using applyViewportClip, SVGContainerPainter::paint now directly handles the clipping of RenderSVGViewportContainer. RenderSVGResourceMarker's viewport clip function has been moved in RenderSVGResourceMarker::draw. 2) paintInvalidationRectInLocalCoordinates and selfWillPaint have been made public on RenderSVGViewport. BUG=412088 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183488

Patch Set 1 #

Total comments: 6

Patch Set 2 : Rebase #

Total comments: 5

Patch Set 3 : Address reviewer comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -80 lines) Patch
M Source/core/core.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A Source/core/paint/SVGContainerPainter.h View 1 chunk +25 lines, -0 lines 0 comments Download
A Source/core/paint/SVGContainerPainter.cpp View 1 1 chunk +77 lines, -0 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGContainer.h View 1 2 chunks +7 lines, -8 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGContainer.cpp View 3 chunks +2 lines, -52 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGResourceMarker.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/rendering/svg/RenderSVGResourceMarker.cpp View 1 2 2 chunks +6 lines, -6 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGViewportContainer.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/rendering/svg/RenderSVGViewportContainer.cpp View 1 3 chunks +2 lines, -12 lines 0 comments Download

Messages

Total messages: 18 (4 generated)
pdr.
6 years, 3 months ago (2014-09-25 05:43:51 UTC) #2
fs
https://codereview.chromium.org/601093002/diff/1/Source/core/rendering/svg/RenderSVGResourceMarker.cpp File Source/core/rendering/svg/RenderSVGResourceMarker.cpp (right): https://codereview.chromium.org/601093002/diff/1/Source/core/rendering/svg/RenderSVGResourceMarker.cpp#newcode145 Source/core/rendering/svg/RenderSVGResourceMarker.cpp:145: info.context->clip(m_viewport); If transform.isIdentity(), this clip could now "leak" AFAICS.
6 years, 2 months ago (2014-09-25 11:00:45 UTC) #4
f(malita)
I would prefer to keep any functional changes out of these move-paint-code-to-painter CLs, they are ...
6 years, 2 months ago (2014-09-25 12:54:00 UTC) #5
f(malita)
On 2014/09/25 12:54:00, Florin Malita wrote: > I would prefer to keep any functional changes ...
6 years, 2 months ago (2014-09-25 12:55:53 UTC) #6
f(malita)
https://codereview.chromium.org/601093002/diff/1/Source/core/paint/SVGContainerPainter.cpp File Source/core/paint/SVGContainerPainter.cpp (right): https://codereview.chromium.org/601093002/diff/1/Source/core/paint/SVGContainerPainter.cpp#newcode43 Source/core/paint/SVGContainerPainter.cpp:43: if (m_renderSVGContainer.isSVGViewportContainer() && SVGRenderSupport::isOverflowHidden(&m_renderSVGContainer)) If we're going to do ...
6 years, 2 months ago (2014-09-25 13:42:51 UTC) #8
pdr.
Thank you for the reviews! I finally got a chance to revisit this patch. PTAL ...
6 years, 2 months ago (2014-10-08 20:45:31 UTC) #9
chrishtr
https://codereview.chromium.org/601093002/diff/20001/Source/core/paint/SVGContainerPainter.cpp File Source/core/paint/SVGContainerPainter.cpp (right): https://codereview.chromium.org/601093002/diff/20001/Source/core/paint/SVGContainerPainter.cpp#newcode36 Source/core/paint/SVGContainerPainter.cpp:36: if (isSVGSVGElement(*m_renderSVGContainer.element()) && toSVGSVGElement(*m_renderSVGContainer.element()).hasEmptyViewBox()) Are you sure adding this ...
6 years, 2 months ago (2014-10-08 21:56:38 UTC) #10
pdr.
https://codereview.chromium.org/601093002/diff/20001/Source/core/paint/SVGContainerPainter.cpp File Source/core/paint/SVGContainerPainter.cpp (right): https://codereview.chromium.org/601093002/diff/20001/Source/core/paint/SVGContainerPainter.cpp#newcode36 Source/core/paint/SVGContainerPainter.cpp:36: if (isSVGSVGElement(*m_renderSVGContainer.element()) && toSVGSVGElement(*m_renderSVGContainer.element()).hasEmptyViewBox()) On 2014/10/08 at 21:56:38, chrishtr ...
6 years, 2 months ago (2014-10-08 23:12:28 UTC) #11
chrishtr
lgtm https://codereview.chromium.org/601093002/diff/20001/Source/core/paint/SVGContainerPainter.cpp File Source/core/paint/SVGContainerPainter.cpp (right): https://codereview.chromium.org/601093002/diff/20001/Source/core/paint/SVGContainerPainter.cpp#newcode43 Source/core/paint/SVGContainerPainter.cpp:43: if (m_renderSVGContainer.isSVGViewportContainer() && SVGRenderSupport::isOverflowHidden(&m_renderSVGContainer)) On 2014/10/08 at 23:12:28, ...
6 years, 2 months ago (2014-10-08 23:23:16 UTC) #12
pdr.
Lets hold off on committing this until tomorrow to give fs and fmalita a chance ...
6 years, 2 months ago (2014-10-09 02:39:42 UTC) #13
fs
LGTM, but I expect to see the issue below taken care of (in one way ...
6 years, 2 months ago (2014-10-09 07:02:03 UTC) #14
pdr.
Thanks for the reivews!
6 years, 2 months ago (2014-10-09 17:31:53 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/601093002/40001
6 years, 2 months ago (2014-10-09 17:32:53 UTC) #17
commit-bot: I haz the power
6 years, 2 months ago (2014-10-09 19:32:00 UTC) #18
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as 183488

Powered by Google App Engine
This is Rietveld 408576698