| 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/LayoutPoint.h" | 10 #include "platform/geometry/LayoutPoint.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 static void updatePaintOffsetIfNeeded(PaintController& paintController, cons
t LayoutObject& layoutObject, const LayoutPoint& paintOffset) | 67 static void updatePaintOffsetIfNeeded(PaintController& paintController, cons
t LayoutObject& layoutObject, const LayoutPoint& paintOffset) |
| 68 { | 68 { |
| 69 if (!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() || pain
tController.skippingCache()) | 69 if (!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled() || pain
tController.skippingCache()) |
| 70 return; | 70 return; |
| 71 | 71 |
| 72 if (layoutObject.paintOffsetChanged(paintOffset)) | 72 if (layoutObject.paintOffsetChanged(paintOffset)) |
| 73 paintController.invalidatePaintOffset(layoutObject); | 73 paintController.invalidatePaintOffset(layoutObject); |
| 74 else | 74 else |
| 75 ASSERT(!paintController.paintOffsetWasInvalidated(layoutObject) || !
paintController.clientCacheIsValid(layoutObject)); | 75 ASSERT(!paintController.paintOffsetWasInvalidated(layoutObject) || !
paintController.clientCacheIsValid(layoutObject)); |
| 76 | 76 |
| 77 layoutObject.mutableForPainting().setPreviousPaintOffset(paintOffset); | 77 layoutObject.getMutableForPainting().setPreviousPaintOffset(paintOffset)
; |
| 78 } | 78 } |
| 79 | 79 |
| 80 Optional<DisplayItemCacheSkipper> m_cacheSkipper; | 80 Optional<DisplayItemCacheSkipper> m_cacheSkipper; |
| 81 Optional<DrawingRecorder> m_drawingRecorder; | 81 Optional<DrawingRecorder> m_drawingRecorder; |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 } // namespace blink | 84 } // namespace blink |
| 85 | 85 |
| 86 #endif // LayoutObjectDrawingRecorder_h | 86 #endif // LayoutObjectDrawingRecorder_h |
| OLD | NEW |