| 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 RoundedInnerRectClipper_h | 5 #ifndef RoundedInnerRectClipper_h |
| 6 #define RoundedInnerRectClipper_h | 6 #define RoundedInnerRectClipper_h |
| 7 | 7 |
| 8 #include "platform/graphics/paint/DisplayItem.h" | 8 #include "platform/graphics/paint/DisplayItem.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 class FloatRoundedRect; | 12 class FloatRoundedRect; |
| 13 class LayoutRect; | 13 class LayoutRect; |
| 14 class LayoutObject; | 14 class LayoutObject; |
| 15 struct PaintInfo; | 15 struct PaintInfo; |
| 16 | 16 |
| 17 enum RoundedInnerRectClipperBehavior { | 17 enum RoundedInnerRectClipperBehavior { |
| 18 ApplyToDisplayListIfEnabled, | 18 ApplyToDisplayListIfEnabled, |
| 19 ApplyToContext | 19 ApplyToContext |
| 20 }; | 20 }; |
| 21 | 21 |
| 22 class RoundedInnerRectClipper { | 22 class RoundedInnerRectClipper { |
| 23 public: | 23 public: |
| 24 RoundedInnerRectClipper(LayoutObject&, const PaintInfo&); |
| 24 RoundedInnerRectClipper(LayoutObject&, const PaintInfo&, const LayoutRect&,
const FloatRoundedRect& clipRect, RoundedInnerRectClipperBehavior); | 25 RoundedInnerRectClipper(LayoutObject&, const PaintInfo&, const LayoutRect&,
const FloatRoundedRect& clipRect, RoundedInnerRectClipperBehavior); |
| 25 ~RoundedInnerRectClipper(); | 26 ~RoundedInnerRectClipper(); |
| 26 | 27 |
| 28 void begin(const LayoutRect&, const FloatRoundedRect& clipRect, RoundedInner
RectClipperBehavior); |
| 29 |
| 27 private: | 30 private: |
| 28 LayoutObject& m_layoutObject; | 31 LayoutObject& m_layoutObject; |
| 29 const PaintInfo& m_paintInfo; | 32 const PaintInfo& m_paintInfo; |
| 33 |
| 34 // Valid only if |m_engaged| is true. |
| 30 bool m_useDisplayItemList; | 35 bool m_useDisplayItemList; |
| 31 DisplayItem::Type m_clipType; | 36 DisplayItem::Type m_clipType; |
| 37 |
| 38 bool m_engaged; |
| 32 }; | 39 }; |
| 33 | 40 |
| 34 } // namespace blink | 41 } // namespace blink |
| 35 | 42 |
| 36 #endif // RoundedInnerRectClipper_h | 43 #endif // RoundedInnerRectClipper_h |
| OLD | NEW |