| 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 ClipRecorder_h | 5 #ifndef ClipRecorder_h |
| 6 #define ClipRecorder_h | 6 #define ClipRecorder_h |
| 7 | 7 |
| 8 #include "SkRegion.h" |
| 8 #include "core/rendering/RenderLayerModelObject.h" | 9 #include "core/rendering/RenderLayerModelObject.h" |
| 9 #include "platform/geometry/LayoutRect.h" | 10 #include "platform/geometry/LayoutRect.h" |
| 10 #include "platform/graphics/paint/DisplayItem.h" | 11 #include "platform/graphics/paint/DisplayItem.h" |
| 11 | 12 |
| 12 namespace blink { | 13 namespace blink { |
| 13 | 14 |
| 14 class RenderLayer; | 15 class RenderLayer; |
| 15 class RoundedRect; | 16 class RoundedRect; |
| 16 struct PaintInfo; | 17 struct PaintInfo; |
| 17 | 18 |
| 18 class ClipRecorder { | 19 class ClipRecorder { |
| 19 public: | 20 public: |
| 20 ClipRecorder(RenderLayerModelObject&, const PaintInfo&, const LayoutRect& cl
ipRect); | 21 ClipRecorder(RenderLayerModelObject&, const PaintInfo&, const LayoutRect& cl
ipRect, SkRegion::Op = SkRegion::kIntersect_Op); |
| 21 ~ClipRecorder(); | 22 ~ClipRecorder(); |
| 22 | 23 |
| 23 static DisplayItem::Type paintPhaseToClipType(PaintPhase); | 24 static DisplayItem::Type paintPhaseToClipType(PaintPhase); |
| 24 private: | 25 private: |
| 25 LayoutRect m_clipRect; | 26 LayoutRect m_clipRect; |
| 26 const PaintInfo& m_paintInfo; | 27 const PaintInfo& m_paintInfo; |
| 27 RenderLayerModelObject& m_canvas; | 28 RenderLayerModelObject& m_canvas; |
| 28 }; | 29 }; |
| 29 | 30 |
| 30 } // namespace blink | 31 } // namespace blink |
| 31 | 32 |
| 32 #endif // ClipRecorder_h | 33 #endif // ClipRecorder_h |
| OLD | NEW |