| Index: Source/core/paint/SVGPaintServer.h
|
| diff --git a/Source/core/paint/SVGPaintServer.h b/Source/core/paint/SVGPaintServer.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..40d9b7ba419d79102556928f3a69a8c10a2a47e4
|
| --- /dev/null
|
| +++ b/Source/core/paint/SVGPaintServer.h
|
| @@ -0,0 +1,41 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef SVGPaintServer_h
|
| +#define SVGPaintServer_h
|
| +
|
| +#include "core/rendering/svg/RenderSVGResource.h"
|
| +#include "platform/graphics/Gradient.h"
|
| +#include "platform/graphics/Pattern.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class GraphicsContext;
|
| +class GraphicsContextStateSaver;
|
| +
|
| +class SVGPaintServer {
|
| + WTF_MAKE_FAST_ALLOCATED;
|
| +public:
|
| + SVGPaintServer(Color);
|
| + SVGPaintServer(PassRefPtr<Gradient>);
|
| + SVGPaintServer(PassRefPtr<Pattern>);
|
| +
|
| + // Update the GC state (on |stateSaver.context()|) for painting |renderer|
|
| + // using |style|. |resourceModeFlags| is used to decide between fill/stroke.
|
| + // Previous state will be saved (if needed) using |stateSaver|.
|
| + static bool updateGraphicsContext(GraphicsContextStateSaver&, RenderStyle*, RenderObject&, RenderSVGResourceModeFlags);
|
| +
|
| + void apply(GraphicsContext&, RenderSVGResourceMode, GraphicsContextStateSaver* = 0);
|
| +
|
| +private:
|
| + static PassOwnPtr<SVGPaintServer> requestForRenderer(RenderObject&, RenderStyle*, RenderSVGResourceModeFlags);
|
| +
|
| + RefPtr<Gradient> m_gradient;
|
| + RefPtr<Pattern> m_pattern;
|
| + Color m_color;
|
| +};
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // SVGPaintServer_h
|
|
|