Chromium Code Reviews| Index: third_party/WebKit/Source/core/animation/CompositorAnimations.cpp |
| diff --git a/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp b/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp |
| index 4dcad3f8bde3196c35752fc13989f4839b47c59f..0888a268c69dc5c7161beb079cd0830fd794879b 100644 |
| --- a/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp |
| +++ b/third_party/WebKit/Source/core/animation/CompositorAnimations.cpp |
| @@ -37,6 +37,7 @@ |
| #include "core/animation/animatable/AnimatableFilterOperations.h" |
| #include "core/animation/animatable/AnimatableTransform.h" |
| #include "core/animation/animatable/AnimatableValue.h" |
| +#include "core/dom/DOMNodeIds.h" |
| #include "core/layout/LayoutBoxModelObject.h" |
| #include "core/layout/LayoutObject.h" |
| #include "core/layout/compositing/CompositedLayerMapping.h" |
| @@ -390,39 +391,13 @@ void CompositorAnimations::pauseAnimationForTestingOnCompositor(const Element& e |
| compositorPlayer->pauseAnimation(id, pauseTime); |
| } |
| -bool CompositorAnimations::canAttachCompositedLayers(const Element& element, const Animation& animation) |
| +void CompositorAnimations::attachCompositedLayers(Element& element, const Animation& animation) |
| { |
| if (!animation.compositorPlayer()) |
| - return false; |
| - |
| - if (!element.layoutObject() || !element.layoutObject()->isBoxModelObject()) |
| - return false; |
| - |
| - PaintLayer* layer = toLayoutBoxModelObject(element.layoutObject())->layer(); |
| - |
| - if (!layer || !layer->isAllowedToQueryCompositingState() |
| - || !layer->compositedLayerMapping() |
| - || !layer->compositedLayerMapping()->mainGraphicsLayer()) |
| - return false; |
| - |
| - if (!layer->compositedLayerMapping()->mainGraphicsLayer()->platformLayer()) |
| - return false; |
| - |
| - return true; |
| -} |
| - |
| -void CompositorAnimations::attachCompositedLayers(const Element& element, const Animation& animation) |
| -{ |
| - ASSERT(element.layoutObject()); |
| - |
| - PaintLayer* layer = toLayoutBoxModelObject(element.layoutObject())->layer(); |
| - ASSERT(layer); |
| + return; |
| CompositorAnimationPlayer* compositorPlayer = animation.compositorPlayer(); |
| - ASSERT(compositorPlayer); |
| - |
| - ASSERT(layer->compositedLayerMapping()); |
| - compositorPlayer->attachLayer(layer->compositedLayerMapping()->mainGraphicsLayer()->platformLayer()); |
| + compositorPlayer->attachElement(CompositorElementId(DOMNodeIds::idForNode(&element))); |
|
Ian Vollick
2016/06/01 18:08:26
By not pulling from cc, we are able to simplify th
|
| } |
| // ----------------------------------------------------------------------- |