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

Issue 638933002: Introduce SVGPaintServer (Closed)

Created:
6 years, 2 months ago by fs
Modified:
6 years, 2 months ago
CC:
blink-reviews, blink-reviews-rendering, krit, eae+blinkwatch, ed+blinkwatch_opera.com, 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

Introduce SVGPaintServer Fetch the actual fill from the various paint-server RenderSVGResources into a new "data blob" SVGPaintServer. This makes said resources independent of the GC, and means that GC-state can be managed more directly by the caller. Since this makes postApplyResource useless, it's removed, and applyResource is renamed to preparePaintServer. Some functions residing on RenderSVGResource is moved to SVGPaintServer. Paint-server fetch+application is moved to updateGraphicsContext, which is also changed to return a bool indicating if a paint-server is available. Handling of clip-path-as-mask is also moved here. BUG=420022 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183619

Patch Set 1 #

Patch Set 2 : Extra sure about manual shadow-restore. #

Total comments: 10

Patch Set 3 : Pass SVGPaintServer around using OwnPtr; Use more RAII; Drop rendering -> paint deps. #

Patch Set 4 : Pass GCSS only - not GCSS and GC. #

Total comments: 5

Patch Set 5 : Remove manual state-restore. #

Patch Set 6 : Explicit constructors. #

Patch Set 7 : Add isValid() predicate; allocate on stack (again). #

Patch Set 8 : Clean away stuff again. #

Total comments: 2

Patch Set 9 : Move SVGPaintServer out of paint/; uGC -> SVGRenderSupport. #

Patch Set 10 : Disambiguate. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -229 lines) Patch
M Source/core/paint/SVGInlineTextBoxPainter.cpp View 1 2 3 4 5 6 7 8 4 chunks +22 lines, -72 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGResource.h View 1 2 3 4 5 6 7 8 9 3 chunks +25 lines, -6 lines 1 comment Download
M Source/core/rendering/svg/RenderSVGResource.cpp View 1 2 3 4 5 6 7 8 4 chunks +63 lines, -39 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGResourceGradient.h View 1 2 3 4 5 6 2 chunks +1 line, -3 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGResourceGradient.cpp View 1 2 3 4 5 6 7 8 5 chunks +6 lines, -27 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGResourcePattern.h View 1 2 3 4 5 6 1 chunk +1 line, -2 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGResourcePattern.cpp View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -23 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGResourceSolidColor.h View 1 2 3 4 5 6 2 chunks +1 line, -2 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -15 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGShape.h View 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGShape.cpp View 1 2 3 4 5 6 7 8 4 chunks +9 lines, -38 lines 0 comments Download
M Source/core/rendering/svg/SVGRenderSupport.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download
M Source/core/rendering/svg/SVGRenderSupport.cpp View 1 2 3 4 5 6 7 8 1 chunk +33 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (3 generated)
fs
6 years, 2 months ago (2014-10-08 14:23:13 UTC) #2
pdr.
+cc chrishtr, because this is our first non-*Painter classes in painting. This is a fantastic ...
6 years, 2 months ago (2014-10-09 01:00:50 UTC) #4
fs
On 2014/10/09 01:00:50, pdr wrote: > +cc chrishtr, because this is our first non-*Painter classes ...
6 years, 2 months ago (2014-10-09 07:23:08 UTC) #5
chrishtr
The parts of PaintServer that are for paint should be separate from the ones that ...
6 years, 2 months ago (2014-10-09 17:41:56 UTC) #6
fs
On 2014/10/09 17:41:56, chrishtr wrote: > The parts of PaintServer that are for paint should ...
6 years, 2 months ago (2014-10-10 08:17:10 UTC) #7
fs
Stuff happened. PTAL. https://codereview.chromium.org/638933002/diff/20001/Source/core/paint/SVGPaintServer.cpp File Source/core/paint/SVGPaintServer.cpp (right): https://codereview.chromium.org/638933002/diff/20001/Source/core/paint/SVGPaintServer.cpp#newcode66 Source/core/paint/SVGPaintServer.cpp:66: bool SVGPaintServer::requestForRenderer(RenderObject& renderer, RenderStyle* style, RenderSVGResourceModeFlags ...
6 years, 2 months ago (2014-10-10 13:08:59 UTC) #8
f(malita)
https://codereview.chromium.org/638933002/diff/170001/Source/core/paint/SVGInlineTextBoxPainter.cpp File Source/core/paint/SVGInlineTextBoxPainter.cpp (right): https://codereview.chromium.org/638933002/diff/170001/Source/core/paint/SVGInlineTextBoxPainter.cpp#newcode339 Source/core/paint/SVGInlineTextBoxPainter.cpp:339: if (hasShadow && !stateSaver.saved()) Could we saveIfNeeded in the ...
6 years, 2 months ago (2014-10-10 15:49:07 UTC) #9
fs
https://codereview.chromium.org/638933002/diff/170001/Source/core/paint/SVGInlineTextBoxPainter.cpp File Source/core/paint/SVGInlineTextBoxPainter.cpp (right): https://codereview.chromium.org/638933002/diff/170001/Source/core/paint/SVGInlineTextBoxPainter.cpp#newcode339 Source/core/paint/SVGInlineTextBoxPainter.cpp:339: if (hasShadow && !stateSaver.saved()) On 2014/10/10 15:49:07, Florin Malita ...
6 years, 2 months ago (2014-10-10 16:10:23 UTC) #10
f(malita)
On 2014/10/10 16:10:23, fs wrote: > https://codereview.chromium.org/638933002/diff/170001/Source/core/paint/SVGPaintServer.cpp#newcode92 > Source/core/paint/SVGPaintServer.cpp:92: OwnPtr<SVGPaintServer> paintServer = > requestForRenderer(renderer, style, ...
6 years, 2 months ago (2014-10-10 16:44:20 UTC) #11
fs
https://codereview.chromium.org/638933002/diff/170001/Source/core/paint/SVGPaintServer.cpp File Source/core/paint/SVGPaintServer.cpp (right): https://codereview.chromium.org/638933002/diff/170001/Source/core/paint/SVGPaintServer.cpp#newcode92 Source/core/paint/SVGPaintServer.cpp:92: OwnPtr<SVGPaintServer> paintServer = requestForRenderer(renderer, style, resourceModeFlags); On 2014/10/10 16:10:23, ...
6 years, 2 months ago (2014-10-10 16:44:42 UTC) #12
chrishtr
https://codereview.chromium.org/638933002/diff/690001/Source/core/rendering/svg/RenderSVGResourcePattern.cpp File Source/core/rendering/svg/RenderSVGResourcePattern.cpp (right): https://codereview.chromium.org/638933002/diff/690001/Source/core/rendering/svg/RenderSVGResourcePattern.cpp#newcode148 Source/core/rendering/svg/RenderSVGResourcePattern.cpp:148: return SVGPaintServer(patternData->pattern); Why not just have a method that ...
6 years, 2 months ago (2014-10-10 16:59:20 UTC) #13
f(malita)
On 2014/10/10 16:44:42, fs wrote: > https://codereview.chromium.org/638933002/diff/170001/Source/core/paint/SVGPaintServer.cpp > File Source/core/paint/SVGPaintServer.cpp (right): > > I'll upload ...
6 years, 2 months ago (2014-10-10 17:33:08 UTC) #14
fs
https://codereview.chromium.org/638933002/diff/690001/Source/core/rendering/svg/RenderSVGResourcePattern.cpp File Source/core/rendering/svg/RenderSVGResourcePattern.cpp (right): https://codereview.chromium.org/638933002/diff/690001/Source/core/rendering/svg/RenderSVGResourcePattern.cpp#newcode148 Source/core/rendering/svg/RenderSVGResourcePattern.cpp:148: return SVGPaintServer(patternData->pattern); On 2014/10/10 16:59:20, chrishtr wrote: > Why ...
6 years, 2 months ago (2014-10-11 12:05:51 UTC) #15
pdr.
On 2014/10/11 at 12:05:51, fs wrote: > https://codereview.chromium.org/638933002/diff/690001/Source/core/rendering/svg/RenderSVGResourcePattern.cpp > File Source/core/rendering/svg/RenderSVGResourcePattern.cpp (right): > > https://codereview.chromium.org/638933002/diff/690001/Source/core/rendering/svg/RenderSVGResourcePattern.cpp#newcode148 ...
6 years, 2 months ago (2014-10-11 21:32:40 UTC) #16
fs
Code shuffled. On 2014/10/11 21:32:40, pdr wrote: > On 2014/10/11 at 12:05:51, fs wrote: > ...
6 years, 2 months ago (2014-10-13 11:38:33 UTC) #17
chrishtr
Thanks for the updates. I'll defer to pdr@ for the final approval since he knows ...
6 years, 2 months ago (2014-10-13 15:54:23 UTC) #18
pdr.
LGTM https://codereview.chromium.org/638933002/diff/920001/Source/core/rendering/svg/RenderSVGResource.h File Source/core/rendering/svg/RenderSVGResource.h (right): https://codereview.chromium.org/638933002/diff/920001/Source/core/rendering/svg/RenderSVGResource.h#newcode65 Source/core/rendering/svg/RenderSVGResource.h:65: bool isValid() const { return m_color != Color::transparent; ...
6 years, 2 months ago (2014-10-13 17:08:57 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/638933002/920001
6 years, 2 months ago (2014-10-13 17:09:22 UTC) #21
commit-bot: I haz the power
6 years, 2 months ago (2014-10-13 17:13:50 UTC) #22
Message was sent while issue was closed.
Committed patchset #10 (id:920001) as 183619

Powered by Google App Engine
This is Rietveld 408576698