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

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

Powered by Google App Engine
This is Rietveld 408576698