| 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 #include "core/paint/RoundedInnerRectClipper.h" | 5 #include "core/paint/RoundedInnerRectClipper.h" |
| 6 | 6 |
| 7 #include "core/layout/LayoutBox.h" | 7 #include "core/layout/LayoutObject.h" |
| 8 #include "core/paint/PaintInfo.h" | 8 #include "core/paint/PaintInfo.h" |
| 9 #include "platform/graphics/paint/ClipDisplayItem.h" | 9 #include "platform/graphics/paint/ClipDisplayItem.h" |
| 10 #include "platform/graphics/paint/PaintController.h" | 10 #include "platform/graphics/paint/PaintController.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 RoundedInnerRectClipper::RoundedInnerRectClipper(const LayoutObject& layoutObjec
t, const PaintInfo& paintInfo, const LayoutRect& rect, const FloatRoundedRect& c
lipRect, RoundedInnerRectClipperBehavior behavior) | 14 RoundedInnerRectClipper::RoundedInnerRectClipper(const LayoutObject& layoutObjec
t, const PaintInfo& paintInfo, const LayoutRect& rect, const FloatRoundedRect& c
lipRect, RoundedInnerRectClipperBehavior behavior) |
| 15 : m_layoutObject(layoutObject) | 15 : m_layoutObject(layoutObject) |
| 16 , m_paintInfo(paintInfo) | 16 , m_paintInfo(paintInfo) |
| 17 , m_usePaintController(behavior == ApplyToDisplayList) | 17 , m_usePaintController(behavior == ApplyToDisplayList) |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 DisplayItem::Type endType = DisplayItem::clipTypeToEndClipType(m_clipType); | 60 DisplayItem::Type endType = DisplayItem::clipTypeToEndClipType(m_clipType); |
| 61 if (m_usePaintController) { | 61 if (m_usePaintController) { |
| 62 m_paintInfo.context.getPaintController().endItem<EndClipDisplayItem>(m_l
ayoutObject, endType); | 62 m_paintInfo.context.getPaintController().endItem<EndClipDisplayItem>(m_l
ayoutObject, endType); |
| 63 } else { | 63 } else { |
| 64 EndClipDisplayItem endClipDisplayItem(m_layoutObject, endType); | 64 EndClipDisplayItem endClipDisplayItem(m_layoutObject, endType); |
| 65 endClipDisplayItem.replay(m_paintInfo.context); | 65 endClipDisplayItem.replay(m_paintInfo.context); |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 | 68 |
| 69 } // namespace blink | 69 } // namespace blink |
| OLD | NEW |