Chromium Code Reviews| Index: Source/core/rendering/svg/RenderSVGResource.h |
| diff --git a/Source/core/rendering/svg/RenderSVGResource.h b/Source/core/rendering/svg/RenderSVGResource.h |
| index 2b822e0305d69e07ce5c110c90dd8c89bd2fae9d..72662d5c407aee5306a811efca5d0b49b0b862c4 100644 |
| --- a/Source/core/rendering/svg/RenderSVGResource.h |
| +++ b/Source/core/rendering/svg/RenderSVGResource.h |
| @@ -32,7 +32,6 @@ enum RenderSVGResourceType { |
| PatternResourceType, |
| LinearGradientResourceType, |
| RadialGradientResourceType, |
| - SolidColorResourceType, |
| FilterResourceType, |
| ClipperResourceType |
| }; |
| @@ -46,7 +45,6 @@ class GraphicsContext; |
| class GraphicsContextStateSaver; |
| class RenderObject; |
| class RenderStyle; |
| -class RenderSVGResourceSolidColor; |
| class SVGPaintServer { |
| public: |
| @@ -79,10 +77,21 @@ public: |
| virtual RenderSVGResourceType resourceType() const = 0; |
| - // Helper utilities used in the render tree to access resources used for painting shapes/text (gradients & patterns & solid colors only) |
| - // If hasFallback gets set to true, the sharedSolidPaintingResource is set to a fallback color. |
| - static RenderSVGResource* requestPaintingResource(RenderSVGResourceMode, const RenderObject&, const RenderStyle*, bool& hasFallback); |
| - static RenderSVGResourceSolidColor* sharedSolidPaintingResource(); |
| + // Helper utilities used in the render tree to access resources used for |
| + // painting shapes/text (gradients & patterns & solid colors only). |
| + // If |PaintDescription::hasFallback| is true, |PaintDescription::color| is set to a fallback color. |
| + struct PaintDescription { |
|
f(malita)
2014/10/20 14:51:06
This smells close enough to a paint server to make
fs
2014/10/20 15:20:20
It's the case you mention and the DRT code. For DR
fs
2014/10/20 15:52:24
Oh, and it'll not be possible to tell a fallback c
|
| + PaintDescription() : resource(nullptr), isValid(false), hasFallback(false) { } |
| + PaintDescription(Color color) : resource(nullptr), color(color), isValid(true), hasFallback(false) { } |
| + PaintDescription(RenderSVGResource* resource) : resource(resource), isValid(true), hasFallback(false) { ASSERT(resource); } |
| + PaintDescription(RenderSVGResource* resource, Color fallbackColor) : resource(resource), color(fallbackColor), isValid(true), hasFallback(true) { ASSERT(resource); } |
| + |
| + RenderSVGResource* resource; |
| + Color color; |
| + bool isValid; |
| + bool hasFallback; |
| + }; |
| + static PaintDescription requestPaint(RenderSVGResourceMode, const RenderObject&, const RenderStyle*); |
| static void markForLayoutAndParentResourceInvalidation(RenderObject*, bool needsLayout = true); |
| }; |