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

Unified Diff: Source/core/rendering/svg/RenderSVGResourceGradient.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: Move updateGraphicsContext. 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/RenderSVGResourceGradient.cpp
diff --git a/Source/core/rendering/svg/RenderSVGResourceGradient.cpp b/Source/core/rendering/svg/RenderSVGResourceGradient.cpp
index d3a514b1aa7c8487dd03a1486719e5071853fc71..d1a3363ab40d9043c3be3731beb672ac421c6559 100644
--- a/Source/core/rendering/svg/RenderSVGResourceGradient.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceGradient.cpp
@@ -111,19 +111,12 @@ bool RenderSVGResourceGradient::applyResource(RenderObject* object, RenderStyle*
// Draw gradient
context->save();
- if (resourceMode & ApplyToTextMode)
- context->setTextDrawingMode(resourceMode & ApplyToFillMode ? TextModeFill : TextModeStroke);
-
- if (resourceMode & ApplyToFillMode) {
- context->setAlphaAsFloat(svgStyle.fillOpacity());
+ if (resourceMode & ApplyToFillMode)
context->setFillGradient(gradientData->gradient);
- context->setFillRule(svgStyle.fillRule());
- } else if (resourceMode & ApplyToStrokeMode) {
- context->setAlphaAsFloat(svgStyle.strokeOpacity());
+ else if (resourceMode & ApplyToStrokeMode)
context->setStrokeGradient(gradientData->gradient);
- SVGRenderSupport::applyStrokeStyleToContext(context, style, object);
- }
+ updateGraphicsContext(context, style, *object, resourceMode);
return true;
}
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResource.cpp ('k') | Source/core/rendering/svg/RenderSVGResourcePattern.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698