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

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

Issue 638933002: Introduce SVGPaintServer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Disambiguate. 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 305a07866ae3f49de3691f41ceb14ee4f1599176..8ac7d005b22f21e71eb284cfff8436b1d4ed71d7 100644
--- a/Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp
+++ b/Source/core/rendering/svg/RenderSVGResourceSolidColor.cpp
@@ -18,14 +18,8 @@
*/
#include "config.h"
-
#include "core/rendering/svg/RenderSVGResourceSolidColor.h"
-#include "core/rendering/style/RenderStyle.h"
-#include "core/rendering/svg/RenderSVGShape.h"
-#include "core/rendering/svg/SVGRenderSupport.h"
-#include "platform/graphics/GraphicsContext.h"
-
namespace blink {
const RenderSVGResourceType RenderSVGResourceSolidColor::s_resourceType = SolidColorResourceType;
@@ -38,20 +32,13 @@ RenderSVGResourceSolidColor::~RenderSVGResourceSolidColor()
{
}
-bool RenderSVGResourceSolidColor::applyResource(RenderObject* object, RenderStyle* style, GraphicsContext* context, RenderSVGResourceModeFlags resourceMode)
+SVGPaintServer RenderSVGResourceSolidColor::preparePaintServer(RenderObject* object, RenderStyle* style, RenderSVGResourceModeFlags resourceMode)
{
ASSERT_UNUSED(object, object);
ASSERT_UNUSED(style, style);
- ASSERT(context);
ASSERT_UNUSED(resourceMode, resourceMode);
- if (resourceMode & ApplyToFillMode)
- context->setFillColor(m_color);
- else if (resourceMode & ApplyToStrokeMode)
- context->setStrokeColor(m_color);
-
- updateGraphicsContext(context, style, *object, resourceMode);
- return true;
+ return SVGPaintServer(m_color);
}
}

Powered by Google App Engine
This is Rietveld 408576698