| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef SVGShapePainter_h | 5 #ifndef SVGShapePainter_h |
| 6 #define SVGShapePainter_h | 6 #define SVGShapePainter_h |
| 7 | 7 |
| 8 #include "platform/graphics/paint/PaintFlags.h" |
| 8 #include "third_party/skia/include/core/SkPath.h" | 9 #include "third_party/skia/include/core/SkPath.h" |
| 9 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
| 10 | 11 |
| 11 class SkPaint; | |
| 12 | |
| 13 namespace blink { | 12 namespace blink { |
| 14 | 13 |
| 15 class FloatRect; | 14 class FloatRect; |
| 16 class GraphicsContext; | 15 class GraphicsContext; |
| 17 class LayoutSVGResourceMarker; | 16 class LayoutSVGResourceMarker; |
| 18 class LayoutSVGShape; | 17 class LayoutSVGShape; |
| 19 struct MarkerPosition; | 18 struct MarkerPosition; |
| 20 struct PaintInfo; | 19 struct PaintInfo; |
| 21 | 20 |
| 22 class SVGShapePainter { | 21 class SVGShapePainter { |
| 23 STACK_ALLOCATED(); | 22 STACK_ALLOCATED(); |
| 24 | 23 |
| 25 public: | 24 public: |
| 26 SVGShapePainter(const LayoutSVGShape& layoutSVGShape) | 25 SVGShapePainter(const LayoutSVGShape& layoutSVGShape) |
| 27 : m_layoutSVGShape(layoutSVGShape) {} | 26 : m_layoutSVGShape(layoutSVGShape) {} |
| 28 | 27 |
| 29 void paint(const PaintInfo&); | 28 void paint(const PaintInfo&); |
| 30 | 29 |
| 31 private: | 30 private: |
| 32 void fillShape(GraphicsContext&, const SkPaint&, SkPath::FillType); | 31 void fillShape(GraphicsContext&, const PaintFlags&, SkPath::FillType); |
| 33 void strokeShape(GraphicsContext&, const SkPaint&); | 32 void strokeShape(GraphicsContext&, const PaintFlags&); |
| 34 | 33 |
| 35 void paintMarkers(const PaintInfo&, const FloatRect& boundingBox); | 34 void paintMarkers(const PaintInfo&, const FloatRect& boundingBox); |
| 36 void paintMarker(const PaintInfo&, | 35 void paintMarker(const PaintInfo&, |
| 37 const LayoutSVGResourceMarker&, | 36 const LayoutSVGResourceMarker&, |
| 38 const MarkerPosition&, | 37 const MarkerPosition&, |
| 39 float); | 38 float); |
| 40 | 39 |
| 41 const LayoutSVGShape& m_layoutSVGShape; | 40 const LayoutSVGShape& m_layoutSVGShape; |
| 42 }; | 41 }; |
| 43 | 42 |
| 44 } // namespace blink | 43 } // namespace blink |
| 45 | 44 |
| 46 #endif // SVGShapePainter_h | 45 #endif // SVGShapePainter_h |
| OLD | NEW |