OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 ClipPathClipper_h | 5 #ifndef ClipPathClipper_h |
6 #define ClipPathClipper_h | 6 #define ClipPathClipper_h |
7 | 7 |
8 #include "core/paint/SVGClipPainter.h" | 8 #include "core/paint/SVGClipPainter.h" |
9 #include "platform/graphics/paint/ClipPathRecorder.h" | 9 #include "platform/graphics/paint/ClipPathRecorder.h" |
10 #include "wtf/Optional.h" | 10 #include "wtf/Optional.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 class FloatPoint; | 14 class FloatPoint; |
15 class FloatRect; | 15 class FloatRect; |
16 class GraphicsContext; | 16 class GraphicsContext; |
17 class LayoutSVGResourceClipper; | 17 class LayoutSVGResourceClipper; |
18 class LayoutObject; | 18 class LayoutObject; |
19 | 19 |
20 class ClipPathClipper { | 20 class ClipPathClipper { |
21 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 21 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
22 public: | 22 public: |
23 ClipPathClipper( | 23 ClipPathClipper( |
24 GraphicsContext&, | 24 GraphicsContext&, |
25 const LayoutObject&, | 25 const LayoutObject&, |
26 const FloatRect& referenceBox, | 26 const FloatRect& referenceBox, |
27 const FloatRect& visualOverflowRect, | |
28 const FloatPoint& origin); | 27 const FloatPoint& origin); |
29 ~ClipPathClipper(); | 28 ~ClipPathClipper(); |
30 | 29 |
31 private: | 30 private: |
32 LayoutSVGResourceClipper* m_resourceClipper; | 31 LayoutSVGResourceClipper* m_resourceClipper; |
33 Optional<ClipPathRecorder> m_clipPathRecorder; | 32 Optional<ClipPathRecorder> m_clipPathRecorder; |
34 SVGClipPainter::ClipperState m_clipperState; | 33 SVGClipPainter::ClipperState m_clipperState; |
35 const LayoutObject& m_layoutObject; | 34 const LayoutObject& m_layoutObject; |
36 GraphicsContext& m_context; | 35 GraphicsContext& m_context; |
37 }; | 36 }; |
38 | 37 |
39 } // namespace blink | 38 } // namespace blink |
40 | 39 |
41 #endif // ClipPathClipper_h | 40 #endif // ClipPathClipper_h |
OLD | NEW |