Chromium Code Reviews| 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(const LayoutRect&, | |
|
chrishtr
2016/11/17 20:42:36
Document these two arguments
Xianzhu
2016/11/17 23:36:41
Done.
| |
| 34 const LayoutRect&); | |
| 35 void invalidateScrollingContentsBackgroundIfNeeded(); | |
| 36 | |
| 31 PaintInvalidationReason computePaintInvalidationReason(); | 37 PaintInvalidationReason computePaintInvalidationReason(); |
| 32 | 38 |
| 33 bool incrementallyInvalidatePaint(); | 39 bool incrementallyInvalidatePaint(PaintInvalidationReason, |
| 40 const LayoutRect& oldRect, | |
| 41 const LayoutRect& newRect); | |
| 34 | 42 |
| 35 bool needsToSavePreviousBoxGeometries(); | 43 bool needsToSavePreviousBoxGeometries(); |
| 36 void savePreviousBoxGeometriesIfNeeded(); | 44 void savePreviousBoxGeometriesIfNeeded(); |
| 37 LayoutSize previousBorderBoxSize(const LayoutSize& previousVisualRectSize); | 45 LayoutSize previousBorderBoxSize(); |
| 38 LayoutRect previousContentBoxRect(); | 46 LayoutRect previousContentBoxRect(); |
| 39 LayoutRect previousLayoutOverflowRect(); | 47 LayoutRect previousLayoutOverflowRect(); |
| 40 | 48 |
| 41 const LayoutBox& m_box; | 49 const LayoutBox& m_box; |
| 42 const PaintInvalidatorContext& m_context; | 50 const PaintInvalidatorContext& m_context; |
| 43 }; | 51 }; |
| 44 | 52 |
| 45 } // namespace blink | 53 } // namespace blink |
| 46 | 54 |
| 47 #endif | 55 #endif |
| OLD | NEW |