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

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

Issue 2495893002: Implement incremental paint property tree rebuilding (Closed)
Patch Set: Suppress main thread scrolling invalidation failures 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 "platform/graphics/paint/ClipPaintPropertyNode.h" 10 #include "platform/graphics/paint/ClipPaintPropertyNode.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 const ClipPaintPropertyNode* outputClip() const { return m_outputClip.get(); } 58 const ClipPaintPropertyNode* outputClip() const { return m_outputClip.get(); }
59 59
60 float opacity() const { return m_opacity; } 60 float opacity() const { return m_opacity; }
61 const CompositorFilterOperations& filter() const { return m_filter; } 61 const CompositorFilterOperations& filter() const { return m_filter; }
62 62
63 // Parent effect or nullptr if this is the root effect. 63 // Parent effect or nullptr if this is the root effect.
64 const EffectPaintPropertyNode* parent() const { return m_parent.get(); } 64 const EffectPaintPropertyNode* parent() const { return m_parent.get(); }
65 bool isRoot() const { return !m_parent; } 65 bool isRoot() const { return !m_parent; }
66 66
67 #if DCHECK_IS_ON()
68 // The clone function is used by FindPropertiesNeedingUpdate.h for recording
69 // an effect node before it has been updated, to later detect changes.
70 PassRefPtr<EffectPaintPropertyNode> clone() const {
71 return adoptRef(new EffectPaintPropertyNode(
72 m_parent, m_localTransformSpace, m_outputClip, m_filter, m_opacity));
73 }
74
75 // The equality operator is used by FindPropertiesNeedingUpdate.h for checking
76 // if an effect node has changed.
77 bool operator==(const EffectPaintPropertyNode& o) const {
78 return m_parent == o.m_parent &&
79 m_localTransformSpace == o.m_localTransformSpace &&
80 m_outputClip == o.m_outputClip && m_filter == o.m_filter &&
81 m_opacity == o.m_opacity;
82 }
83 #endif
84
67 private: 85 private:
68 EffectPaintPropertyNode( 86 EffectPaintPropertyNode(
69 PassRefPtr<const EffectPaintPropertyNode> parent, 87 PassRefPtr<const EffectPaintPropertyNode> parent,
70 PassRefPtr<const TransformPaintPropertyNode> localTransformSpace, 88 PassRefPtr<const TransformPaintPropertyNode> localTransformSpace,
71 PassRefPtr<const ClipPaintPropertyNode> outputClip, 89 PassRefPtr<const ClipPaintPropertyNode> outputClip,
72 CompositorFilterOperations filter, 90 CompositorFilterOperations filter,
73 float opacity) 91 float opacity)
74 : m_parent(parent), 92 : m_parent(parent),
75 m_localTransformSpace(localTransformSpace), 93 m_localTransformSpace(localTransformSpace),
76 m_outputClip(outputClip), 94 m_outputClip(outputClip),
(...skipping 19 matching lines...) Expand all
96 // === End of effects === 114 // === End of effects ===
97 }; 115 };
98 116
99 // Redeclared here to avoid ODR issues. 117 // Redeclared here to avoid ODR issues.
100 // See platform/testing/PaintPrinters.h. 118 // See platform/testing/PaintPrinters.h.
101 void PrintTo(const EffectPaintPropertyNode&, std::ostream*); 119 void PrintTo(const EffectPaintPropertyNode&, std::ostream*);
102 120
103 } // namespace blink 121 } // namespace blink
104 122
105 #endif // EffectPaintPropertyNode_h 123 #endif // EffectPaintPropertyNode_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698