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 PaintInvalidator_h | 5 #ifndef PaintInvalidator_h |
6 #define PaintInvalidator_h | 6 #define PaintInvalidator_h |
7 | 7 |
8 #include "platform/geometry/LayoutRect.h" | 8 #include "platform/geometry/LayoutRect.h" |
9 #include "platform/graphics/paint/GeometryMapper.h" | 9 #include "platform/graphics/paint/GeometryMapper.h" |
10 #include "wtf/Vector.h" | 10 #include "wtf/Vector.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // The current paint invalidation container for stacked contents (stacking | 64 // The current paint invalidation container for stacked contents (stacking |
65 // contexts or positioned objects). It is the nearest ancestor composited | 65 // contexts or positioned objects). It is the nearest ancestor composited |
66 // object which establishes a stacking context. See | 66 // object which establishes a stacking context. See |
67 // Source/core/paint/README.md ### PaintInvalidationState for details on how | 67 // Source/core/paint/README.md ### PaintInvalidationState for details on how |
68 // stacked contents' paint invalidation containers differ. | 68 // stacked contents' paint invalidation containers differ. |
69 const LayoutBoxModelObject* paintInvalidationContainerForStackedContents = | 69 const LayoutBoxModelObject* paintInvalidationContainerForStackedContents = |
70 nullptr; | 70 nullptr; |
71 | 71 |
72 PaintLayer* paintingLayer = nullptr; | 72 PaintLayer* paintingLayer = nullptr; |
73 | 73 |
74 // Store the old and new visual rects in the paint invalidation backing's | 74 // Store the old visual rect in the paint invalidation backing's coordinates. |
75 // coordinates. The rects do *not* account for composited scrolling. | 75 // It does *not* account for composited scrolling. |
76 // See LayoutObject::adjustVisualRectForCompositedScrolling(). | 76 // See LayoutObject::adjustVisualRectForCompositedScrolling(). |
77 LayoutRect oldVisualRect; | 77 LayoutRect oldVisualRect; |
78 LayoutRect newVisualRect; | 78 // Use LayoutObject::visualRect() to get the new visual rect. |
79 | 79 |
80 // Store the origin of the object's local coordinates in the paint | 80 // Store the origin of the object's local coordinates in the paint |
81 // invalidation backing's coordinates. They are used to detect layoutObject | 81 // invalidation backing's coordinates. They are used to detect layoutObject |
82 // shifts that force a full invalidation and invalidation check in subtree. | 82 // shifts that force a full invalidation and invalidation check in subtree. |
83 // The points do *not* account for composited scrolling. See | 83 // The points do *not* account for composited scrolling. See |
84 // LayoutObject::adjustVisualRectForCompositedScrolling(). | 84 // LayoutObject::adjustVisualRectForCompositedScrolling(). |
85 LayoutPoint oldLocation; | 85 LayoutPoint oldLocation; |
86 LayoutPoint newLocation; | 86 LayoutPoint newLocation; |
87 }; | 87 }; |
88 | 88 |
(...skipping 22 matching lines...) Expand all Loading... |
111 ALWAYS_INLINE void updateVisualRect(const LayoutObject&, | 111 ALWAYS_INLINE void updateVisualRect(const LayoutObject&, |
112 PaintInvalidatorContext&); | 112 PaintInvalidatorContext&); |
113 | 113 |
114 Vector<const LayoutObject*> m_pendingDelayedPaintInvalidations; | 114 Vector<const LayoutObject*> m_pendingDelayedPaintInvalidations; |
115 GeometryMapper& m_geometryMapper; | 115 GeometryMapper& m_geometryMapper; |
116 }; | 116 }; |
117 | 117 |
118 } // namespace blink | 118 } // namespace blink |
119 | 119 |
120 #endif // PaintInvalidator_h | 120 #endif // PaintInvalidator_h |
OLD | NEW |