| 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/paint/PaintPhase.h" | 9 #include "core/paint/PaintPhase.h" |
| 9 #include "platform/geometry/LayoutRect.h" | 10 #include "platform/geometry/LayoutRect.h" |
| 10 #include "platform/graphics/paint/DrawingRecorder.h" | 11 #include "platform/graphics/paint/DrawingRecorder.h" |
| 11 | 12 |
| 12 namespace blink { | 13 namespace blink { |
| 13 | 14 |
| 14 class GraphicsContext; | 15 class GraphicsContext; |
| 15 class LayoutObject; | |
| 16 | 16 |
| 17 // Convenience constructors for creating DrawingRecorders. | 17 // Convenience constructors for creating DrawingRecorders. |
| 18 class LayoutObjectDrawingRecorder final : public DrawingRecorder { | 18 class LayoutObjectDrawingRecorder final : public DrawingRecorder { |
| 19 public: | 19 public: |
| 20 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la
youtObject, DisplayItem::Type displayItemType, const LayoutRect& clip) | 20 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la
youtObject, DisplayItem::Type displayItemType, const LayoutRect& clip) |
| 21 : DrawingRecorder(context, layoutObject, displayItemType, pixelSnappedIn
tRect(clip)) { } | 21 : DrawingRecorder(context, layoutObject, displayItemType, pixelSnappedIn
tRect(clip)) |
| 22 { |
| 23 #if ENABLE(ASSERT) |
| 24 if (layoutObject.fullPaintInvalidationReason() == PaintInvalidationDelay
edFull) |
| 25 setUnderInvalidationCheckingMode(DrawingDisplayItem::DontCheck); |
| 26 #endif |
| 27 } |
| 22 | 28 |
| 23 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la
youtObject, PaintPhase phase, const FloatRect& clip) | 29 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la
youtObject, PaintPhase phase, const FloatRect& clip) |
| 24 : DrawingRecorder(context, layoutObject, DisplayItem::paintPhaseToDrawin
gType(phase), clip) { } | 30 : DrawingRecorder(context, layoutObject, DisplayItem::paintPhaseToDrawin
gType(phase), clip) { } |
| 25 | 31 |
| 26 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la
youtObject, DisplayItem::Type type, const FloatRect& clip) | 32 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la
youtObject, DisplayItem::Type type, const FloatRect& clip) |
| 27 : DrawingRecorder(context, layoutObject, type, clip) { } | 33 : DrawingRecorder(context, layoutObject, type, clip) { } |
| 28 }; | 34 }; |
| 29 | 35 |
| 30 } // namespace blink | 36 } // namespace blink |
| 31 | 37 |
| 32 #endif // LayoutObjectDrawingRecorder_h | 38 #endif // LayoutObjectDrawingRecorder_h |
| OLD | NEW |