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 LayoutObjectDrawingRecorder_h | 5 #ifndef LayoutObjectDrawingRecorder_h |
6 #define LayoutObjectDrawingRecorder_h | 6 #define LayoutObjectDrawingRecorder_h |
7 | 7 |
8 #include "core/layout/LayoutObject.h" | 8 #include "core/layout/LayoutObject.h" |
9 #include "core/paint/PaintPhase.h" | 9 #include "core/paint/PaintPhase.h" |
10 #include "platform/geometry/LayoutRect.h" | 10 #include "platform/geometry/LayoutRect.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 { | 35 { |
36 // We may paint a delayed-invalidation object before it's actually inval
idated. | 36 // We may paint a delayed-invalidation object before it's actually inval
idated. |
37 if (layoutObject.fullPaintInvalidationReason() == PaintInvalidationDelay
edFull) | 37 if (layoutObject.fullPaintInvalidationReason() == PaintInvalidationDelay
edFull) |
38 m_cacheSkipper.emplace(context); | 38 m_cacheSkipper.emplace(context); |
39 m_drawingRecorder.emplace(context, layoutObject, displayItemType, clip); | 39 m_drawingRecorder.emplace(context, layoutObject, displayItemType, clip); |
40 } | 40 } |
41 | 41 |
42 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la
youtObject, PaintPhase phase, const FloatRect& clip) | 42 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la
youtObject, PaintPhase phase, const FloatRect& clip) |
43 : LayoutObjectDrawingRecorder(context, layoutObject, DisplayItem::paintP
haseToDrawingType(phase), clip) { } | 43 : LayoutObjectDrawingRecorder(context, layoutObject, DisplayItem::paintP
haseToDrawingType(phase), clip) { } |
44 | 44 |
45 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la
youtObject, DisplayItem::Type type, const LayoutRect& clip) | |
46 : LayoutObjectDrawingRecorder(context, layoutObject, type, pixelSnappedI
ntRect(clip)) { } | |
47 | |
48 #if ENABLE(ASSERT) | 45 #if ENABLE(ASSERT) |
49 void setUnderInvalidationCheckingMode(DrawingDisplayItem::UnderInvalidationC
heckingMode mode) { m_drawingRecorder->setUnderInvalidationCheckingMode(mode); } | 46 void setUnderInvalidationCheckingMode(DrawingDisplayItem::UnderInvalidationC
heckingMode mode) { m_drawingRecorder->setUnderInvalidationCheckingMode(mode); } |
50 #endif | 47 #endif |
51 | 48 |
52 private: | 49 private: |
53 Optional<DisplayItemCacheSkipper> m_cacheSkipper; | 50 Optional<DisplayItemCacheSkipper> m_cacheSkipper; |
54 Optional<DrawingRecorder> m_drawingRecorder; | 51 Optional<DrawingRecorder> m_drawingRecorder; |
55 }; | 52 }; |
56 | 53 |
57 } // namespace blink | 54 } // namespace blink |
58 | 55 |
59 #endif // LayoutObjectDrawingRecorder_h | 56 #endif // LayoutObjectDrawingRecorder_h |
OLD | NEW |