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 "config.h" | 5 #include "config.h" |
6 #include "core/paint/RoundedInnerRectClipper.h" | 6 #include "core/paint/RoundedInnerRectClipper.h" |
7 | 7 |
| 8 #include "core/layout/LayoutBox.h" |
8 #include "core/layout/PaintInfo.h" | 9 #include "core/layout/PaintInfo.h" |
9 #include "core/rendering/RenderBox.h" | |
10 #include "platform/graphics/paint/ClipDisplayItem.h" | 10 #include "platform/graphics/paint/ClipDisplayItem.h" |
11 #include "platform/graphics/paint/DisplayItemList.h" | 11 #include "platform/graphics/paint/DisplayItemList.h" |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 RoundedInnerRectClipper::RoundedInnerRectClipper(LayoutObject& renderer, const P
aintInfo& paintInfo, const LayoutRect& rect, const FloatRoundedRect& clipRect, R
oundedInnerRectClipperBehavior behavior) | 15 RoundedInnerRectClipper::RoundedInnerRectClipper(LayoutObject& renderer, const P
aintInfo& paintInfo, const LayoutRect& rect, const FloatRoundedRect& clipRect, R
oundedInnerRectClipperBehavior behavior) |
16 : m_renderer(renderer) | 16 : m_renderer(renderer) |
17 , m_paintInfo(paintInfo) | 17 , m_paintInfo(paintInfo) |
18 , m_useDisplayItemList(RuntimeEnabledFeatures::slimmingPaintEnabled() && beh
avior == ApplyToDisplayListIfEnabled) | 18 , m_useDisplayItemList(RuntimeEnabledFeatures::slimmingPaintEnabled() && beh
avior == ApplyToDisplayListIfEnabled) |
19 , m_clipType(m_useDisplayItemList ? m_paintInfo.displayItemTypeForClipping()
: DisplayItem::ClipBoxPaintPhaseFirst) | 19 , m_clipType(m_useDisplayItemList ? m_paintInfo.displayItemTypeForClipping()
: DisplayItem::ClipBoxPaintPhaseFirst) |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 ASSERT(m_paintInfo.context->displayItemList()); | 64 ASSERT(m_paintInfo.context->displayItemList()); |
65 OwnPtr<EndClipDisplayItem> endClipDisplayItem = EndClipDisplayItem::crea
te(m_renderer.displayItemClient(), endType); | 65 OwnPtr<EndClipDisplayItem> endClipDisplayItem = EndClipDisplayItem::crea
te(m_renderer.displayItemClient(), endType); |
66 m_paintInfo.context->displayItemList()->add(endClipDisplayItem.release()
); | 66 m_paintInfo.context->displayItemList()->add(endClipDisplayItem.release()
); |
67 } else { | 67 } else { |
68 EndClipDisplayItem endClipDisplayItem(m_renderer.displayItemClient(), en
dType); | 68 EndClipDisplayItem endClipDisplayItem(m_renderer.displayItemClient(), en
dType); |
69 endClipDisplayItem.replay(m_paintInfo.context); | 69 endClipDisplayItem.replay(m_paintInfo.context); |
70 } | 70 } |
71 } | 71 } |
72 | 72 |
73 } // namespace blink | 73 } // namespace blink |
OLD | NEW |