Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/Source/core/layout/PaintInvalidationState.h

Issue 2000053002: WIP: Reset paint invalidation at transform boundaries. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 PaintInvalidationState_h 5 #ifndef PaintInvalidationState_h
6 #define PaintInvalidationState_h 6 #define PaintInvalidationState_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "platform/geometry/LayoutRect.h" 9 #include "platform/geometry/LayoutRect.h"
10 #include "platform/graphics/PaintInvalidationReason.h" 10 #include "platform/graphics/PaintInvalidationReason.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 bool hasForcedSubtreeInvalidationFlags() const { return m_forcedSubtreeInval idationFlags; } 57 bool hasForcedSubtreeInvalidationFlags() const { return m_forcedSubtreeInval idationFlags; }
58 58
59 bool forcedSubtreeInvalidationCheckingWithinContainer() const { return m_for cedSubtreeInvalidationFlags & InvalidationChecking; } 59 bool forcedSubtreeInvalidationCheckingWithinContainer() const { return m_for cedSubtreeInvalidationFlags & InvalidationChecking; }
60 void setForceSubtreeInvalidationCheckingWithinContainer() { m_forcedSubtreeI nvalidationFlags |= InvalidationChecking; } 60 void setForceSubtreeInvalidationCheckingWithinContainer() { m_forcedSubtreeI nvalidationFlags |= InvalidationChecking; }
61 61
62 bool forcedSubtreeFullInvalidationWithinContainer() const { return m_forcedS ubtreeInvalidationFlags & FullInvalidation; } 62 bool forcedSubtreeFullInvalidationWithinContainer() const { return m_forcedS ubtreeInvalidationFlags & FullInvalidation; }
63 63
64 bool forcedSubtreeInvalidationRectUpdateWithinContainerOnly() const { return m_forcedSubtreeInvalidationFlags == InvalidationRectUpdate; } 64 bool forcedSubtreeInvalidationRectUpdateWithinContainerOnly() const { return m_forcedSubtreeInvalidationFlags == InvalidationRectUpdate; }
65 void setForceSubtreeInvalidationRectUpdateWithinContainer() { m_forcedSubtre eInvalidationFlags |= InvalidationRectUpdate; } 65 void setForceSubtreeInvalidationRectUpdateWithinContainer() { m_forcedSubtre eInvalidationFlags |= InvalidationRectUpdate; }
66 66
67 const LayoutBoxModelObject& paintInvalidationContainer() const { return *m_p aintInvalidationContainer; } 67 const LayoutBoxModelObject& paintInvalidationContainer() const { return *m_r ealPaintInvalidationContainer; }
68 68
69 // Computes the position of the current object ((0,0) in the space of the ob ject) 69 // Computes the position of the current object ((0,0) in the space of the ob ject)
70 // in the space of paint invalidation backing. 70 // in the space of paint invalidation backing.
71 LayoutPoint computePositionFromPaintInvalidationBacking() const; 71 LayoutPoint computePositionFromPaintInvalidationBacking() const;
72 72
73 // Returns the rect bounds needed to invalidate paint of this object, 73 // Returns the rect bounds needed to invalidate paint of this object,
74 // in the space of paint invalidation backing. 74 // in the space of paint invalidation backing.
75 LayoutRect computePaintInvalidationRectInBacking() const; 75 LayoutRect computePaintInvalidationRectInBacking() const;
76 76
77 void mapLocalRectToPaintInvalidationBacking(LayoutRect&) const; 77 void mapLocalRectToPaintInvalidationBacking(LayoutRect&) const;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 bool m_cachedOffsetsEnabled; 125 bool m_cachedOffsetsEnabled;
126 bool m_cachedOffsetsForAbsolutePositionEnabled; 126 bool m_cachedOffsetsForAbsolutePositionEnabled;
127 127
128 // The following two fields are never null. Declare them as pointers because we need some 128 // The following two fields are never null. Declare them as pointers because we need some
129 // logic to initialize them in the body of the constructor. 129 // logic to initialize them in the body of the constructor.
130 130
131 // The current paint invalidation container for normal flow objects. 131 // The current paint invalidation container for normal flow objects.
132 // It is the enclosing composited object. 132 // It is the enclosing composited object.
133 const LayoutBoxModelObject* m_paintInvalidationContainer; 133 const LayoutBoxModelObject* m_paintInvalidationContainer;
134 134
135 const LayoutBoxModelObject* m_realPaintInvalidationContainer;
136
135 // The current paint invalidation container for stacked contents (stacking c ontexts or positioned objects). 137 // The current paint invalidation container for stacked contents (stacking c ontexts or positioned objects).
136 // It is the nearest ancestor composited object which establishes a stacking context. 138 // It is the nearest ancestor composited object which establishes a stacking context.
137 // See Source/core/paint/README.md ### PaintInvalidationState for details on how stacked contents' 139 // See Source/core/paint/README.md ### PaintInvalidationState for details on how stacked contents'
138 // paint invalidation containers differ. 140 // paint invalidation containers differ.
139 const LayoutBoxModelObject* m_paintInvalidationContainerForStackedContents; 141 const LayoutBoxModelObject* m_paintInvalidationContainerForStackedContents;
140 142
143 const LayoutBoxModelObject* m_realPaintInvalidationContainerForStackedConten ts;
144
141 const LayoutObject& m_containerForAbsolutePosition; 145 const LayoutObject& m_containerForAbsolutePosition;
142 146
143 // Transform from the initial viewport coordinate system of an outermost 147 // Transform from the initial viewport coordinate system of an outermost
144 // SVG root to the userspace _before_ the relevant element. Combining this 148 // SVG root to the userspace _before_ the relevant element. Combining this
145 // with |m_paintOffset| yields the "final" offset. 149 // with |m_paintOffset| yields the "final" offset.
146 AffineTransform m_svgTransform; 150 AffineTransform m_svgTransform;
147 151
148 Vector<LayoutObject*>& m_pendingDelayedPaintInvalidations; 152 Vector<LayoutObject*>& m_pendingDelayedPaintInvalidations;
149 153
150 PaintLayer& m_paintingLayer; 154 PaintLayer& m_paintingLayer;
151 155
156 const PaintInvalidationState* m_transformParent;
157 const PaintInvalidationState* m_parentPaintInvalidationState;
158
152 #if ENABLE(ASSERT) 159 #if ENABLE(ASSERT)
153 bool m_didUpdateForChildren; 160 bool m_didUpdateForChildren;
154 #endif 161 #endif
155 162
156 #if ENABLE(ASSERT) && !defined(NDEBUG) 163 #ifndef NDEBUG
157 // #define CHECK_FAST_PATH_SLOW_PATH_EQUALITY 164 #define CHECK_FAST_PATH_SLOW_PATH_EQUALITY
158 #endif 165 #endif
159 166
160 #ifdef CHECK_FAST_PATH_SLOW_PATH_EQUALITY 167 #ifdef CHECK_FAST_PATH_SLOW_PATH_EQUALITY
161 void assertFastPathAndSlowPathRectsEqual(const LayoutRect& fastPathRect, con st LayoutRect& slowPathRect) const; 168 void assertFastPathAndSlowPathRectsEqual(const LayoutRect& fastPathRect, con st LayoutRect& slowPathRect) const;
162 bool m_canCheckFastPathSlowPathEquality; 169 bool m_canCheckFastPathSlowPathEquality;
163 #endif 170 #endif
164 }; 171 };
165 172
166 } // namespace blink 173 } // namespace blink
167 174
168 #endif // PaintInvalidationState_h 175 #endif // PaintInvalidationState_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698