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 007c1cc384af9deb5b2b7b2d969f4e96f23c5db6..46df0734b5c1c073b570e1bc4d17a9241c325fce 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" |
| @@ -376,39 +377,26 @@ 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) |
|
Ian Vollick
2016/06/29 15:22:12
This is the noteworthy behavioral change in this p
|
| { |
| if (!animation.compositorPlayer()) |
| - return false; |
| + return; |
| if (!element.layoutObject() || !element.layoutObject()->isBoxModelObject()) |
| - return false; |
| + return; |
| PaintLayer* layer = toLayoutBoxModelObject(element.layoutObject())->layer(); |
| if (!layer || !layer->isAllowedToQueryCompositingState() |
| || !layer->compositedLayerMapping() |
| || !layer->compositedLayerMapping()->mainGraphicsLayer()) |
| - return false; |
| + return; |
| 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(createCompositorElementId(DOMNodeIds::idForNode(&element), CompositorSubElementId::Primary)); |
| } |
| bool CompositorAnimations::convertTimingForCompositor(const Timing& timing, double timeOffset, CompositorTiming& out, double animationPlaybackRate) |