OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 BoxPaintInvalidator_h | 5 #ifndef BoxPaintInvalidator_h |
6 #define BoxPaintInvalidator_h | 6 #define BoxPaintInvalidator_h |
7 | 7 |
8 #include "platform/graphics/PaintInvalidationReason.h" | 8 #include "platform/graphics/PaintInvalidationReason.h" |
9 #include "wtf/Allocator.h" | 9 #include "wtf/Allocator.h" |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 public: | 21 public: |
22 BoxPaintInvalidator(const LayoutBox& box, | 22 BoxPaintInvalidator(const LayoutBox& box, |
23 const PaintInvalidatorContext& context) | 23 const PaintInvalidatorContext& context) |
24 : m_box(box), m_context(context) {} | 24 : m_box(box), m_context(context) {} |
25 | 25 |
26 static void boxWillBeDestroyed(const LayoutBox&); | 26 static void boxWillBeDestroyed(const LayoutBox&); |
27 | 27 |
28 PaintInvalidationReason invalidatePaintIfNeeded(); | 28 PaintInvalidationReason invalidatePaintIfNeeded(); |
29 | 29 |
30 private: | 30 private: |
| 31 bool backgroundGeometryDependsOnLayoutOverflowRect(); |
| 32 bool backgroundPaintsOntoScrollingContentsLayer(); |
| 33 bool shouldFullyInvalidateBackgroundOnLayoutOverflowChange( |
| 34 const LayoutRect& oldLayoutOverflow, |
| 35 const LayoutRect& newLayoutOverflow); |
| 36 void invalidateScrollingContentsBackgroundIfNeeded(); |
| 37 |
31 PaintInvalidationReason computePaintInvalidationReason(); | 38 PaintInvalidationReason computePaintInvalidationReason(); |
32 | 39 |
33 bool incrementallyInvalidatePaint(); | 40 bool incrementallyInvalidatePaint(PaintInvalidationReason, |
| 41 const LayoutRect& oldRect, |
| 42 const LayoutRect& newRect); |
34 | 43 |
35 bool needsToSavePreviousBoxGeometries(); | 44 bool needsToSavePreviousBoxGeometries(); |
36 void savePreviousBoxGeometriesIfNeeded(); | 45 void savePreviousBoxGeometriesIfNeeded(); |
37 LayoutSize previousBorderBoxSize(const LayoutSize& previousVisualRectSize); | 46 LayoutSize previousBorderBoxSize(); |
38 LayoutRect previousContentBoxRect(); | 47 LayoutRect previousContentBoxRect(); |
39 LayoutRect previousLayoutOverflowRect(); | 48 LayoutRect previousLayoutOverflowRect(); |
40 | 49 |
41 const LayoutBox& m_box; | 50 const LayoutBox& m_box; |
42 const PaintInvalidatorContext& m_context; | 51 const PaintInvalidatorContext& m_context; |
43 }; | 52 }; |
44 | 53 |
45 } // namespace blink | 54 } // namespace blink |
46 | 55 |
47 #endif | 56 #endif |
OLD | NEW |