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

Issue 900463002: Make SVG painting independent of GraphicsContext's alpha state (Closed)

Created:
5 years, 10 months ago by pdr.
Modified:
5 years, 10 months ago
CC:
blink-reviews, blink-reviews-paint_chromium.org, blink-reviews-rendering, Rik, danakj, Dominik Röttsches, dshwang, krit, eae+blinkwatch, ed+blinkwatch_opera.com, f(malita), fs, gyuyoung.kim_webkit.org, jbroman, jchaffraix+rendering, Justin Novosad, kouhei+svg_chromium.org, leviw+renderwatch, pdr+graphicswatchlist_chromium.org, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, slimming-paint-reviews_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Make SVG painting independent of GraphicsContext's alpha state SVG painting relied on GraphicsContext's alpha state which caused a painting regression when GraphicsContextStateSavers were removed in [1]. This patch switches SVG rendering to apply the alpha to the color passed into fill/stroke on the context, removing the need to call context->setAlphaAsFloat. SVG was one of two users of this state (the other being canvas) so this patch gets us one step closer to removing GraphicsContextState::m_alpha. BUG=453225 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=189465

Patch Set 1 #

Total comments: 12

Patch Set 2 : Address reviewer comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -68 lines) Patch
M Source/core/paint/SVGInlineFlowBoxPainter.cpp View 2 chunks +0 lines, -5 lines 0 comments Download
M Source/core/paint/SVGRootInlineBoxPainter.cpp View 2 chunks +0 lines, -5 lines 0 comments Download
M Source/core/paint/SVGShapePainter.cpp View 1 1 chunk +0 lines, -4 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGResourcePaintServer.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/svg/RenderSVGResourcePaintServer.cpp View 1 1 chunk +10 lines, -9 lines 0 comments Download
M Source/core/rendering/svg/SVGRenderSupport.cpp View 1 2 chunks +5 lines, -8 lines 0 comments Download
M Source/platform/graphics/GraphicsContext.h View 1 2 chunks +4 lines, -4 lines 0 comments Download
M Source/platform/graphics/GraphicsContext.cpp View 1 5 chunks +8 lines, -8 lines 0 comments Download
M Source/platform/graphics/GraphicsContextState.h View 1 4 chunks +7 lines, -7 lines 0 comments Download
M Source/platform/graphics/GraphicsContextState.cpp View 1 6 chunks +9 lines, -17 lines 0 comments Download
M Source/platform/graphics/skia/SkiaUtils.h View 1 1 chunk +11 lines, -0 lines 0 comments Download
M Source/platform/graphics/skia/SkiaUtils.cpp View 1 1 chunk +21 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (4 generated)
pdr.
5 years, 10 months ago (2015-02-02 21:38:31 UTC) #2
chrishtr
https://codereview.chromium.org/900463002/diff/1/Source/platform/graphics/GraphicsContextState.cpp File Source/platform/graphics/GraphicsContextState.cpp (right): https://codereview.chromium.org/900463002/diff/1/Source/platform/graphics/GraphicsContextState.cpp#newcode220 Source/platform/graphics/GraphicsContextState.cpp:220: m_alpha = clampedAlphaForBlending(alpha); This is the one place that ...
5 years, 10 months ago (2015-02-02 23:14:54 UTC) #3
pdr.
https://codereview.chromium.org/900463002/diff/1/Source/platform/graphics/GraphicsContextState.cpp File Source/platform/graphics/GraphicsContextState.cpp (right): https://codereview.chromium.org/900463002/diff/1/Source/platform/graphics/GraphicsContextState.cpp#newcode220 Source/platform/graphics/GraphicsContextState.cpp:220: m_alpha = clampedAlphaForBlending(alpha); On 2015/02/02 at 23:14:54, chrishtr wrote: ...
5 years, 10 months ago (2015-02-03 00:09:48 UTC) #4
f(malita)
+1000 for getting rid of global alpha. (nit: [1] reference missing in description) https://codereview.chromium.org/900463002/diff/1/Source/core/rendering/svg/RenderSVGResourcePaintServer.cpp File ...
5 years, 10 months ago (2015-02-03 00:33:28 UTC) #5
chrishtr
lgtm https://codereview.chromium.org/900463002/diff/1/Source/platform/graphics/GraphicsContext.cpp File Source/platform/graphics/GraphicsContext.cpp (right): https://codereview.chromium.org/900463002/diff/1/Source/platform/graphics/GraphicsContext.cpp#newcode283 Source/platform/graphics/GraphicsContext.cpp:283: void GraphicsContext::setFillGradient(PassRefPtr<Gradient> gradient, float additionalAlpha) Why "additional" alpha?
5 years, 10 months ago (2015-02-03 00:34:16 UTC) #6
fs
https://codereview.chromium.org/900463002/diff/1/Source/core/rendering/svg/RenderSVGResourcePaintServer.cpp File Source/core/rendering/svg/RenderSVGResourcePaintServer.cpp (right): https://codereview.chromium.org/900463002/diff/1/Source/core/rendering/svg/RenderSVGResourcePaintServer.cpp#newcode51 Source/core/rendering/svg/RenderSVGResourcePaintServer.cpp:51: void SVGPaintServer::apply(GraphicsContext& context, RenderSVGResourceMode resourceMode, const SVGRenderStyle& svgStyle, GraphicsContextStateSaver& ...
5 years, 10 months ago (2015-02-03 10:08:49 UTC) #7
pdr.
Thanks for the reivews https://codereview.chromium.org/900463002/diff/1/Source/core/rendering/svg/RenderSVGResourcePaintServer.cpp File Source/core/rendering/svg/RenderSVGResourcePaintServer.cpp (right): https://codereview.chromium.org/900463002/diff/1/Source/core/rendering/svg/RenderSVGResourcePaintServer.cpp#newcode51 Source/core/rendering/svg/RenderSVGResourcePaintServer.cpp:51: void SVGPaintServer::apply(GraphicsContext& context, RenderSVGResourceMode resourceMode, ...
5 years, 10 months ago (2015-02-04 04:04:31 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/900463002/20001
5 years, 10 months ago (2015-02-04 04:04:59 UTC) #10
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/49166)
5 years, 10 months ago (2015-02-04 05:53:03 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/900463002/20001
5 years, 10 months ago (2015-02-04 05:55:37 UTC) #14
commit-bot: I haz the power
5 years, 10 months ago (2015-02-04 07:55:33 UTC) #15
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=189465

Powered by Google App Engine
This is Rietveld 408576698