Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef SVGPaintServer_h | |
| 6 #define SVGPaintServer_h | |
| 7 | |
| 8 #include "core/rendering/svg/RenderSVGResource.h" | |
| 9 #include "platform/graphics/Gradient.h" | |
| 10 #include "platform/graphics/Pattern.h" | |
| 11 | |
| 12 namespace blink { | |
| 13 | |
| 14 class GraphicsContext; | |
| 15 class GraphicsContextStateSaver; | |
| 16 | |
| 17 class SVGPaintServer { | |
| 18 public: | |
| 19 SVGPaintServer(); | |
|
pdr.
2014/10/09 01:00:50
This can be private.
| |
| 20 | |
| 21 static bool existsForRenderer(RenderObject&, const RenderStyle*, RenderSVGRe sourceMode); | |
| 22 | |
| 23 // Update the GC state (on |context|) for painting |renderer| | |
| 24 // using |style|. |resourceModeFlags| is used to decide between fill/stroke. | |
| 25 // Previous state will be saved (if needed) using |stateSaver|. | |
| 26 static bool updateGraphicsContext(GraphicsContext*, RenderStyle*, RenderObje ct&, RenderSVGResourceModeFlags, GraphicsContextStateSaver&); | |
|
pdr.
2014/10/09 01:00:50
Passing in both a context and a statesaver that ho
fs
2014/10/09 07:23:08
It's already exposed, I just don't find it particu
fs
2014/10/10 13:08:59
Dropped GC*, moved GCSS in the argument list. (I h
| |
| 27 | |
| 28 void setColor(Color); | |
| 29 void setGradient(const PassRefPtr<Gradient>); | |
| 30 void setPattern(const PassRefPtr<Pattern>); | |
| 31 | |
| 32 void apply(GraphicsContext&, RenderSVGResourceMode, GraphicsContextStateSave r* = 0); | |
| 33 | |
| 34 private: | |
| 35 static bool requestForRenderer(RenderObject&, RenderStyle*, RenderSVGResourc eModeFlags, SVGPaintServer&); | |
| 36 | |
| 37 RefPtr<Gradient> m_gradient; | |
| 38 RefPtr<Pattern> m_pattern; | |
| 39 Color m_color; | |
|
pdr.
2014/10/09 01:00:50
This makes me a little sad because a paint server
fs
2014/10/09 07:23:08
I'm glad you asked =). It'd be possible to add a c
fs
2014/10/10 13:08:58
I haven't done anything about this. If "people" fi
| |
| 40 }; | |
| 41 | |
| 42 } // namespace blink | |
| 43 | |
| 44 #endif // SVGPaintServer_h | |
| OLD | NEW |