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

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

Issue 2556013002: Fix paint property under-invalidation checking about reference filters (Closed)
Patch Set: Fix paint property under-invalidation checking about reference filters Created 4 years 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 | « third_party/WebKit/Source/platform/graphics/CompositorFilterOperations.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "cc/layers/layer.h" 8 #include "cc/layers/layer.h"
9 #include "platform/PlatformExport.h" 9 #include "platform/PlatformExport.h"
10 #include "platform/graphics/CompositorFilterOperations.h" 10 #include "platform/graphics/CompositorFilterOperations.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 #if DCHECK_IS_ON() 70 #if DCHECK_IS_ON()
71 // The clone function is used by FindPropertiesNeedingUpdate.h for recording 71 // The clone function is used by FindPropertiesNeedingUpdate.h for recording
72 // an effect node before it has been updated, to later detect changes. 72 // an effect node before it has been updated, to later detect changes.
73 PassRefPtr<EffectPaintPropertyNode> clone() const { 73 PassRefPtr<EffectPaintPropertyNode> clone() const {
74 return adoptRef(new EffectPaintPropertyNode( 74 return adoptRef(new EffectPaintPropertyNode(
75 m_parent, m_localTransformSpace, m_outputClip, m_filter, m_opacity)); 75 m_parent, m_localTransformSpace, m_outputClip, m_filter, m_opacity));
76 } 76 }
77 77
78 // The equality operator is used by FindPropertiesNeedingUpdate.h for checking 78 // The equality operator is used by FindPropertiesNeedingUpdate.h for checking
79 // if an effect node has changed. 79 // if an effect node has changed. It ignores changes of reference filters
80 // because SkImageFilter doesn't have an equality operator.
80 bool operator==(const EffectPaintPropertyNode& o) const { 81 bool operator==(const EffectPaintPropertyNode& o) const {
81 return m_parent == o.m_parent && 82 return m_parent == o.m_parent &&
82 m_localTransformSpace == o.m_localTransformSpace && 83 m_localTransformSpace == o.m_localTransformSpace &&
83 m_outputClip == o.m_outputClip && m_filter == o.m_filter && 84 m_outputClip == o.m_outputClip && m_opacity == o.m_opacity &&
84 m_opacity == o.m_opacity; 85 m_filter.equalsIgnoringReferenceFilters(o.m_filter);
85 } 86 }
86 #endif 87 #endif
87 88
88 private: 89 private:
89 EffectPaintPropertyNode( 90 EffectPaintPropertyNode(
90 PassRefPtr<const EffectPaintPropertyNode> parent, 91 PassRefPtr<const EffectPaintPropertyNode> parent,
91 PassRefPtr<const TransformPaintPropertyNode> localTransformSpace, 92 PassRefPtr<const TransformPaintPropertyNode> localTransformSpace,
92 PassRefPtr<const ClipPaintPropertyNode> outputClip, 93 PassRefPtr<const ClipPaintPropertyNode> outputClip,
93 CompositorFilterOperations filter, 94 CompositorFilterOperations filter,
94 float opacity) 95 float opacity)
(...skipping 29 matching lines...) Expand all
124 mutable scoped_refptr<cc::Layer> m_dummyLayer; 125 mutable scoped_refptr<cc::Layer> m_dummyLayer;
125 }; 126 };
126 127
127 // Redeclared here to avoid ODR issues. 128 // Redeclared here to avoid ODR issues.
128 // See platform/testing/PaintPrinters.h. 129 // See platform/testing/PaintPrinters.h.
129 void PrintTo(const EffectPaintPropertyNode&, std::ostream*); 130 void PrintTo(const EffectPaintPropertyNode&, std::ostream*);
130 131
131 } // namespace blink 132 } // namespace blink
132 133
133 #endif // EffectPaintPropertyNode_h 134 #endif // EffectPaintPropertyNode_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/CompositorFilterOperations.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698