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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.h

Issue 2404213004: Implement incremental paint property tree rebuilding (Closed)
Patch Set: Cleanup needsUpdate finder construction, tighten reasons for updating a property subtree, misc clea… Created 4 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 EffectPaintPropertyNode_h 5 #ifndef EffectPaintPropertyNode_h
6 #define EffectPaintPropertyNode_h 6 #define EffectPaintPropertyNode_h
7 7
8 #include "platform/PlatformExport.h" 8 #include "platform/PlatformExport.h"
9 #include "platform/graphics/CompositorFilterOperations.h" 9 #include "platform/graphics/CompositorFilterOperations.h"
10 #include "wtf/PassRefPtr.h" 10 #include "wtf/PassRefPtr.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 const ClipPaintPropertyNode* outputClip() const { return m_outputClip.get(); } 54 const ClipPaintPropertyNode* outputClip() const { return m_outputClip.get(); }
55 55
56 float opacity() const { return m_opacity; } 56 float opacity() const { return m_opacity; }
57 const CompositorFilterOperations& filter() const { return m_filter; } 57 const CompositorFilterOperations& filter() const { return m_filter; }
58 58
59 // Parent effect or nullptr if this is the root effect. 59 // Parent effect or nullptr if this is the root effect.
60 const EffectPaintPropertyNode* parent() const { return m_parent.get(); } 60 const EffectPaintPropertyNode* parent() const { return m_parent.get(); }
61 bool isRoot() const { return !m_parent; } 61 bool isRoot() const { return !m_parent; }
62 62
63 #if DCHECK_IS_ON()
64 // The clone function is used by FindPropertiesNeedingUpdate.h for recording
65 // an effect node before it has been updated, to later detect changes.
66 PassRefPtr<EffectPaintPropertyNode> clone() const {
67 return adoptRef(new EffectPaintPropertyNode(
68 m_parent, m_localTransformSpace, m_outputClip, m_filter, m_opacity));
69 }
70
71 // The equality operator is used by FindPropertiesNeedingUpdate.h for checking
72 // if an effect node has changed.
73 bool operator==(const EffectPaintPropertyNode& o) const {
74 return m_parent == o.m_parent &&
75 m_localTransformSpace == o.m_localTransformSpace &&
76 m_outputClip == o.m_outputClip && m_filter == o.m_filter &&
77 m_opacity == o.m_opacity;
78 }
79 #endif
80
63 private: 81 private:
64 EffectPaintPropertyNode( 82 EffectPaintPropertyNode(
65 PassRefPtr<const EffectPaintPropertyNode> parent, 83 PassRefPtr<const EffectPaintPropertyNode> parent,
66 PassRefPtr<const TransformPaintPropertyNode> localTransformSpace, 84 PassRefPtr<const TransformPaintPropertyNode> localTransformSpace,
67 PassRefPtr<const ClipPaintPropertyNode> outputClip, 85 PassRefPtr<const ClipPaintPropertyNode> outputClip,
68 CompositorFilterOperations filter, 86 CompositorFilterOperations filter,
69 float opacity) 87 float opacity)
70 : m_parent(parent), 88 : m_parent(parent),
71 m_localTransformSpace(localTransformSpace), 89 m_localTransformSpace(localTransformSpace),
72 m_outputClip(outputClip), 90 m_outputClip(outputClip),
(...skipping 19 matching lines...) Expand all
92 // === End of effects === 110 // === End of effects ===
93 }; 111 };
94 112
95 // Redeclared here to avoid ODR issues. 113 // Redeclared here to avoid ODR issues.
96 // See platform/testing/PaintPrinters.h. 114 // See platform/testing/PaintPrinters.h.
97 void PrintTo(const EffectPaintPropertyNode&, std::ostream*); 115 void PrintTo(const EffectPaintPropertyNode&, std::ostream*);
98 116
99 } // namespace blink 117 } // namespace blink
100 118
101 #endif // EffectPaintPropertyNode_h 119 #endif // EffectPaintPropertyNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698