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

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

Issue 1299323005: blink: Add backdrop-filter support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: removed some todos Created 5 years, 4 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/Assertions.h" 8 #include "wtf/Assertions.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 class StyleDifference { 12 class StyleDifference {
13 public: 13 public:
14 enum PropertyDifference { 14 enum PropertyDifference {
15 TransformChanged = 1 << 0, 15 TransformChanged = 1 << 0,
16 OpacityChanged = 1 << 1, 16 OpacityChanged = 1 << 1,
17 ZIndexChanged = 1 << 2, 17 ZIndexChanged = 1 << 2,
18 FilterChanged = 1 << 3, 18 FilterChanged = 1 << 3,
19 BackdropFilterChanged = 1 << 4,
19 // The object needs to issue paint invalidations if it contains text or properties dependent on color (e.g., border or outline). 20 // The object needs to issue paint invalidations if it contains text or properties dependent on color (e.g., border or outline).
20 TextOrColorChanged = 1 << 4, 21 TextOrColorChanged = 1 << 5,
21 }; 22 };
22 23
23 StyleDifference() 24 StyleDifference()
24 : m_paintInvalidationType(NoPaintInvalidation) 25 : m_paintInvalidationType(NoPaintInvalidation)
25 , m_layoutType(NoLayout) 26 , m_layoutType(NoLayout)
26 , m_propertySpecificDifferences(0) 27 , m_propertySpecificDifferences(0)
27 { } 28 { }
28 29
29 bool hasDifference() const { return m_paintInvalidationType || m_layoutType || m_propertySpecificDifferences; } 30 bool hasDifference() const { return m_paintInvalidationType || m_layoutType || m_propertySpecificDifferences; }
30 31
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 68
68 bool opacityChanged() const { return m_propertySpecificDifferences & Opacity Changed; } 69 bool opacityChanged() const { return m_propertySpecificDifferences & Opacity Changed; }
69 void setOpacityChanged() { m_propertySpecificDifferences |= OpacityChanged; } 70 void setOpacityChanged() { m_propertySpecificDifferences |= OpacityChanged; }
70 71
71 bool zIndexChanged() const { return m_propertySpecificDifferences & ZIndexCh anged; } 72 bool zIndexChanged() const { return m_propertySpecificDifferences & ZIndexCh anged; }
72 void setZIndexChanged() { m_propertySpecificDifferences |= ZIndexChanged; } 73 void setZIndexChanged() { m_propertySpecificDifferences |= ZIndexChanged; }
73 74
74 bool filterChanged() const { return m_propertySpecificDifferences & FilterCh anged; } 75 bool filterChanged() const { return m_propertySpecificDifferences & FilterCh anged; }
75 void setFilterChanged() { m_propertySpecificDifferences |= FilterChanged; } 76 void setFilterChanged() { m_propertySpecificDifferences |= FilterChanged; }
76 77
78 bool backdropFilterChanged() const { return m_propertySpecificDifferences & FilterChanged; }
79 void setBackdropFilterChanged() { m_propertySpecificDifferences |= BackdropF ilterChanged; }
80
77 bool textOrColorChanged() const { return m_propertySpecificDifferences & Tex tOrColorChanged; } 81 bool textOrColorChanged() const { return m_propertySpecificDifferences & Tex tOrColorChanged; }
78 void setTextOrColorChanged() { m_propertySpecificDifferences |= TextOrColorC hanged; } 82 void setTextOrColorChanged() { m_propertySpecificDifferences |= TextOrColorC hanged; }
79 83
80 private: 84 private:
81 enum PaintInvalidationType { 85 enum PaintInvalidationType {
82 NoPaintInvalidation = 0, 86 NoPaintInvalidation = 0,
83 PaintInvalidationObject, 87 PaintInvalidationObject,
84 PaintInvalidationLayer 88 PaintInvalidationLayer
85 }; 89 };
86 unsigned m_paintInvalidationType : 2; 90 unsigned m_paintInvalidationType : 2;
87 91
88 enum LayoutType { 92 enum LayoutType {
89 NoLayout = 0, 93 NoLayout = 0,
90 PositionedMovement, 94 PositionedMovement,
91 FullLayout 95 FullLayout
92 }; 96 };
93 unsigned m_layoutType : 2; 97 unsigned m_layoutType : 2;
94 98
95 unsigned m_propertySpecificDifferences : 5; 99 unsigned m_propertySpecificDifferences : 5;
96 }; 100 };
97 101
98 } // namespace blink 102 } // namespace blink
99 103
100 #endif // StyleDifference_h 104 #endif // StyleDifference_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698