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

Unified Diff: Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp

Issue 630903003: Move common GC state update code out of paint-server application (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp
diff --git a/Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp b/Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp
index 50097cf116b90b6b1311e106fff9e40623c54889..1c00130f0683b21de9ff47daf01240b5e2469eed 100644
--- a/Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp
@@ -40,37 +40,16 @@ RenderSVGResourceSolidColor::~RenderSVGResourceSolidColor()
bool RenderSVGResourceSolidColor::applyResource(RenderObject* object, RenderStyle* style, GraphicsContext* context, RenderSVGResourceModeFlags resourceMode)
{
- ASSERT(object);
- ASSERT(style);
+ ASSERT_UNUSED(object, object);
+ ASSERT_UNUSED(style, style);
ASSERT(context);
ASSERT_UNUSED(resourceMode, resourceMode);
- bool isRenderingMask = SVGRenderSupport::isRenderingClipPathAsMaskImage(*object);
- const SVGRenderStyle& svgStyle = style->svgStyle();
-
- if (resourceMode & ApplyToFillMode) {
- if (!isRenderingMask)
- context->setAlphaAsFloat(svgStyle.fillOpacity());
- else
- context->setAlphaAsFloat(1);
+ if (resourceMode & ApplyToFillMode)
context->setFillColor(m_color);
- if (!isRenderingMask)
- context->setFillRule(svgStyle.fillRule());
-
- if (resourceMode & ApplyToTextMode)
- context->setTextDrawingMode(TextModeFill);
- } else if (resourceMode & ApplyToStrokeMode) {
- // When rendering the mask for a RenderSVGResourceClipper, the stroke code path is never hit.
- ASSERT(!isRenderingMask);
- context->setAlphaAsFloat(svgStyle.strokeOpacity());
+ else if (resourceMode & ApplyToStrokeMode)
context->setStrokeColor(m_color);
- SVGRenderSupport::applyStrokeStyleToContext(context, style, object);
-
- if (resourceMode & ApplyToTextMode)
- context->setTextDrawingMode(TextModeStroke);
- }
-
return true;
}

Powered by Google App Engine
This is Rietveld 408576698