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

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

Issue 169283008: Maintain SkPaint in GraphicsContextState. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Improved based on review Created 6 years, 10 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 b72bc72c0bbb38dbec76060bef2911976fded7ca..fac2a846c9ac6dd70f20d40f90e9e3542c8fea70 100644
--- a/Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp
@@ -56,9 +56,9 @@ bool RenderSVGResourceSolidColor::applyResource(RenderObject* object, RenderStyl
if (resourceMode & ApplyToFillMode) {
if (!isRenderingMask && svgStyle)
- context->setAlpha(svgStyle->fillOpacity());
+ context->setAlphaAsFloat(svgStyle->fillOpacity());
else
- context->setAlpha(1);
+ context->setAlphaAsFloat(1);
context->setFillColor(m_color);
if (!isRenderingMask)
context->setFillRule(svgStyle ? svgStyle->fillRule() : RULE_NONZERO);
@@ -68,7 +68,7 @@ bool RenderSVGResourceSolidColor::applyResource(RenderObject* object, RenderStyl
} else if (resourceMode & ApplyToStrokeMode) {
// When rendering the mask for a RenderSVGResourceClipper, the stroke code path is never hit.
ASSERT(!isRenderingMask);
- context->setAlpha(svgStyle ? svgStyle->strokeOpacity() : 1);
+ context->setAlphaAsFloat(svgStyle ? svgStyle->strokeOpacity() : 1);
context->setStrokeColor(m_color);
if (style)

Powered by Google App Engine
This is Rietveld 408576698