| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 SVGClipPainter_h | 5 #ifndef SVGClipPainter_h |
| 6 #define SVGClipPainter_h | 6 #define SVGClipPainter_h |
| 7 | 7 |
| 8 #include "platform/geometry/FloatRect.h" | 8 #include "platform/geometry/FloatRect.h" |
| 9 #include "platform/graphics/paint/DisplayItemClient.h" | 9 #include "platform/graphics/paint/DisplayItemClient.h" |
| 10 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 ClipperNotApplied, | 23 ClipperNotApplied, |
| 24 ClipperAppliedPath, | 24 ClipperAppliedPath, |
| 25 ClipperAppliedMask | 25 ClipperAppliedMask |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 SVGClipPainter(LayoutSVGResourceClipper& clip) : m_clip(clip) { } | 28 SVGClipPainter(LayoutSVGResourceClipper& clip) : m_clip(clip) { } |
| 29 | 29 |
| 30 // FIXME: Filters are also stateful resources that could benefit from having
their state managed | 30 // FIXME: Filters are also stateful resources that could benefit from having
their state managed |
| 31 // on the caller stack instead of the current hashmap. We should look
at refactoring these | 31 // on the caller stack instead of the current hashmap. We should look
at refactoring these |
| 32 // into a general interface that can be shared. | 32 // into a general interface that can be shared. |
| 33 bool prepareEffect(const LayoutObject&, const FloatRect&, const FloatRect&,
GraphicsContext&, ClipperState&); | 33 bool prepareEffect(const LayoutObject&, const FloatRect&, const FloatRect&,
const FloatPoint&, GraphicsContext&, ClipperState&); |
| 34 void finishEffect(const LayoutObject&, GraphicsContext&, ClipperState&); | 34 void finishEffect(const LayoutObject&, GraphicsContext&, ClipperState&); |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 // Return false if there is a problem drawing the mask. | 37 // Return false if there is a problem drawing the mask. |
| 38 bool drawClipAsMask(GraphicsContext&, const LayoutObject&, const FloatRect&
targetBoundingBox, const FloatRect& targetPaintInvalidationRect, const AffineTra
nsform&); | 38 bool drawClipAsMask(GraphicsContext&, const LayoutObject&, const FloatRect&
targetBoundingBox, |
| 39 const FloatRect& targetPaintInvalidationRect, const AffineTransform&, co
nst FloatPoint&); |
| 39 | 40 |
| 40 LayoutSVGResourceClipper& m_clip; | 41 LayoutSVGResourceClipper& m_clip; |
| 41 }; | 42 }; |
| 42 | 43 |
| 43 } // namespace blink | 44 } // namespace blink |
| 44 | 45 |
| 45 #endif // SVGClipPainter_h | 46 #endif // SVGClipPainter_h |
| OLD | NEW |