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

Side by Side Diff: third_party/WebKit/Source/core/style/StyleDifference.h

Issue 1950573003: Improve handling of PaintInvalidationLayer (renamed to PaintInvalidationSubtree) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@LocationChange
Patch Set: Created 4 years, 7 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
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 StyleDifference_h 5 #ifndef StyleDifference_h
6 #define StyleDifference_h 6 #define StyleDifference_h
7 7
8 #include "wtf/Allocator.h" 8 #include "wtf/Allocator.h"
9 #include "wtf/Assertions.h" 9 #include "wtf/Assertions.h"
10 10
(...skipping 27 matching lines...) Expand all
38 return !m_paintInvalidationType && !m_layoutType && !(m_propertySpecific Differences & ~propertyDifferences); 38 return !m_paintInvalidationType && !m_layoutType && !(m_propertySpecific Differences & ~propertyDifferences);
39 } 39 }
40 40
41 bool needsPaintInvalidation() const { return m_paintInvalidationType != NoPa intInvalidation; } 41 bool needsPaintInvalidation() const { return m_paintInvalidationType != NoPa intInvalidation; }
42 void clearNeedsPaintInvalidation() { m_paintInvalidationType = NoPaintInvali dation; } 42 void clearNeedsPaintInvalidation() { m_paintInvalidationType = NoPaintInvali dation; }
43 43
44 // The object just needs to issue paint invalidations. 44 // The object just needs to issue paint invalidations.
45 bool needsPaintInvalidationObject() const { return m_paintInvalidationType = = PaintInvalidationObject; } 45 bool needsPaintInvalidationObject() const { return m_paintInvalidationType = = PaintInvalidationObject; }
46 void setNeedsPaintInvalidationObject() 46 void setNeedsPaintInvalidationObject()
47 { 47 {
48 ASSERT(!needsPaintInvalidationLayer()); 48 ASSERT(!needsPaintInvalidationSubtree());
49 m_paintInvalidationType = PaintInvalidationObject; 49 m_paintInvalidationType = PaintInvalidationObject;
50 } 50 }
51 51
52 // The layer and its descendant layers need to issue paint invalidations. 52 // The object and its descendants need to issue paint invalidations.
53 bool needsPaintInvalidationLayer() const { return m_paintInvalidationType == PaintInvalidationLayer; } 53 bool needsPaintInvalidationSubtree() const { return m_paintInvalidationType == PaintInvalidationSubtree; }
54 void setNeedsPaintInvalidationLayer() { m_paintInvalidationType = PaintInval idationLayer; } 54 void setNeedsPaintInvalidationSubtree() { m_paintInvalidationType = PaintInv alidationSubtree; }
55 55
56 bool needsLayout() const { return m_layoutType != NoLayout; } 56 bool needsLayout() const { return m_layoutType != NoLayout; }
57 void clearNeedsLayout() { m_layoutType = NoLayout; } 57 void clearNeedsLayout() { m_layoutType = NoLayout; }
58 58
59 // The offset of this positioned object has been updated. 59 // The offset of this positioned object has been updated.
60 bool needsPositionedMovementLayout() const { return m_layoutType == Position edMovement; } 60 bool needsPositionedMovementLayout() const { return m_layoutType == Position edMovement; }
61 void setNeedsPositionedMovementLayout() 61 void setNeedsPositionedMovementLayout()
62 { 62 {
63 ASSERT(!needsFullLayout()); 63 ASSERT(!needsFullLayout());
64 m_layoutType = PositionedMovement; 64 m_layoutType = PositionedMovement;
(...skipping 20 matching lines...) Expand all
85 bool backdropFilterChanged() const { return m_propertySpecificDifferences & BackdropFilterChanged; } 85 bool backdropFilterChanged() const { return m_propertySpecificDifferences & BackdropFilterChanged; }
86 void setBackdropFilterChanged() { m_propertySpecificDifferences |= BackdropF ilterChanged; } 86 void setBackdropFilterChanged() { m_propertySpecificDifferences |= BackdropF ilterChanged; }
87 87
88 bool textDecorationOrColorChanged() const { return m_propertySpecificDiffere nces & TextDecorationOrColorChanged; } 88 bool textDecorationOrColorChanged() const { return m_propertySpecificDiffere nces & TextDecorationOrColorChanged; }
89 void setTextDecorationOrColorChanged() { m_propertySpecificDifferences |= Te xtDecorationOrColorChanged; } 89 void setTextDecorationOrColorChanged() { m_propertySpecificDifferences |= Te xtDecorationOrColorChanged; }
90 90
91 private: 91 private:
92 enum PaintInvalidationType { 92 enum PaintInvalidationType {
93 NoPaintInvalidation = 0, 93 NoPaintInvalidation = 0,
94 PaintInvalidationObject, 94 PaintInvalidationObject,
95 PaintInvalidationLayer 95 PaintInvalidationSubtree
96 }; 96 };
97 unsigned m_paintInvalidationType : 2; 97 unsigned m_paintInvalidationType : 2;
98 98
99 enum LayoutType { 99 enum LayoutType {
100 NoLayout = 0, 100 NoLayout = 0,
101 PositionedMovement, 101 PositionedMovement,
102 FullLayout 102 FullLayout
103 }; 103 };
104 unsigned m_layoutType : 2; 104 unsigned m_layoutType : 2;
105 unsigned m_recomputeOverflow : 1; 105 unsigned m_recomputeOverflow : 1;
106 unsigned m_propertySpecificDifferences : 6; 106 unsigned m_propertySpecificDifferences : 6;
107 }; 107 };
108 108
109 } // namespace blink 109 } // namespace blink
110 110
111 #endif // StyleDifference_h 111 #endif // StyleDifference_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698