| Index: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
|
| index 79321fb3ed5ece415829117039910ffd6c52f24a..9a58e053c121d1d02e7cad32eff3024c0109fae0 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
|
| @@ -218,9 +218,6 @@ public:
|
| PropertyTreeManager(cc::PropertyTrees& propertyTrees, cc::Layer* rootLayer)
|
| : m_propertyTrees(propertyTrees)
|
| , m_rootLayer(rootLayer)
|
| -#if DCHECK_IS_ON()
|
| - , m_isFirstEffectEver(true)
|
| -#endif
|
| {
|
| m_effectStack.append(BlinkEffectAndCcIdPair{nullptr, kSecondaryRootNodeId});
|
| }
|
| @@ -230,7 +227,7 @@ public:
|
|
|
| int compositorIdForTransformNode(const TransformPaintPropertyNode*);
|
| int compositorIdForClipNode(const ClipPaintPropertyNode*);
|
| - int switchToEffectNode(const EffectPaintPropertyNode& nextEffect);
|
| + int switchToEffectNode(const EffectPaintPropertyNode* nextEffect);
|
| int compositorIdForCurrentEffectNode() const { return m_effectStack.last().id; }
|
| int compositorIdForScrollNode(const ScrollPaintPropertyNode*);
|
|
|
| @@ -267,7 +264,6 @@ private:
|
|
|
| #if DCHECK_IS_ON()
|
| HashSet<const EffectPaintPropertyNode*> m_effectNodesConverted;
|
| - bool m_isFirstEffectEver;
|
| #endif
|
| };
|
|
|
| @@ -435,17 +431,16 @@ const EffectPaintPropertyNode* lowestCommonAncestor(const EffectPaintPropertyNod
|
| return nodeA;
|
| }
|
|
|
| -int PropertyTreeManager::switchToEffectNode(const EffectPaintPropertyNode& nextEffect)
|
| +int PropertyTreeManager::switchToEffectNode(const EffectPaintPropertyNode* nextEffect)
|
| {
|
| - const EffectPaintPropertyNode* ancestor = lowestCommonAncestor(currentEffectNode(), &nextEffect);
|
| + const EffectPaintPropertyNode* ancestor = lowestCommonAncestor(currentEffectNode(), nextEffect);
|
| while (currentEffectNode() != ancestor)
|
| m_effectStack.removeLast();
|
|
|
| -#if DCHECK_IS_ON()
|
| - DCHECK(m_isFirstEffectEver || currentEffectNode()) << "Malformed effect tree. Nodes in the same property tree should have common root.";
|
| - m_isFirstEffectEver = false;
|
| -#endif
|
| - buildEffectNodesRecursively(&nextEffect);
|
| + if (!nextEffect)
|
| + return kSecondaryRootNodeId;
|
| +
|
| + buildEffectNodesRecursively(nextEffect);
|
|
|
| return compositorIdForCurrentEffectNode();
|
| }
|
| @@ -525,7 +520,7 @@ void PaintArtifactCompositor::update(const PaintArtifact& paintArtifact)
|
| int transformId = propertyTreeManager.compositorIdForTransformNode(paintChunk.properties.transform.get());
|
| int scrollId = propertyTreeManager.compositorIdForScrollNode(paintChunk.properties.scroll.get());
|
| int clipId = propertyTreeManager.compositorIdForClipNode(paintChunk.properties.clip.get());
|
| - int effectId = propertyTreeManager.switchToEffectNode(*paintChunk.properties.effect.get());
|
| + int effectId = propertyTreeManager.switchToEffectNode(paintChunk.properties.effect.get());
|
|
|
| propertyTreeManager.updateScrollOffset(layer->id(), scrollId);
|
|
|
|
|