Chromium Code Reviews| 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 25 matching lines...) Expand all Loading... | |
| 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) | 45 LayoutObjectDrawingRecorder(GraphicsContext& context, const LayoutObject& la youtObject, DisplayItem::Type type, const LayoutRect& clip) |
| 46 : LayoutObjectDrawingRecorder(context, layoutObject, type, pixelSnappedI ntRect(clip)) { } | 46 : LayoutObjectDrawingRecorder(context, layoutObject, type, enclosingIntR ect(clip)) { } |
|
jbroman
2015/08/24 15:58:46
Aside: This could arguably just be "clip", which d
| |
| 47 | 47 |
| 48 #if ENABLE(ASSERT) | 48 #if ENABLE(ASSERT) |
| 49 void setUnderInvalidationCheckingMode(DrawingDisplayItem::UnderInvalidationC heckingMode mode) { m_drawingRecorder->setUnderInvalidationCheckingMode(mode); } | 49 void setUnderInvalidationCheckingMode(DrawingDisplayItem::UnderInvalidationC heckingMode mode) { m_drawingRecorder->setUnderInvalidationCheckingMode(mode); } |
| 50 #endif | 50 #endif |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 Optional<DisplayItemCacheSkipper> m_cacheSkipper; | 53 Optional<DisplayItemCacheSkipper> m_cacheSkipper; |
| 54 Optional<DrawingRecorder> m_drawingRecorder; | 54 Optional<DrawingRecorder> m_drawingRecorder; |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 } // namespace blink | 57 } // namespace blink |
| 58 | 58 |
| 59 #endif // LayoutObjectDrawingRecorder_h | 59 #endif // LayoutObjectDrawingRecorder_h |
| OLD | NEW |