| Index: Source/core/animation/CompositorAnimations.cpp
|
| diff --git a/Source/core/animation/CompositorAnimations.cpp b/Source/core/animation/CompositorAnimations.cpp
|
| index 854000fcdb5d57f77d0cc2ae37a80b05e24d3787..ef2db21575b918f99ffc0bf9838da75b503dd4f3 100644
|
| --- a/Source/core/animation/CompositorAnimations.cpp
|
| +++ b/Source/core/animation/CompositorAnimations.cpp
|
| @@ -287,17 +287,9 @@ bool CompositorAnimations::startAnimationOnCompositor(const Element& element, in
|
| ASSERT(!animations.isEmpty());
|
| for (auto& animation : animations) {
|
| int id = animation->id();
|
| - if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled()) {
|
| - WebCompositorAnimationPlayer* compositorPlayer = player.compositorPlayer();
|
| - ASSERT(compositorPlayer);
|
| - compositorPlayer->addAnimation(animation.leakPtr());
|
| - } else if (!layer->compositedDeprecatedPaintLayerMapping()->mainGraphicsLayer()->addAnimation(animation.release())) {
|
| - // FIXME: We should know ahead of time whether these animations can be started.
|
| - for (int startedAnimationId : startedAnimationIds)
|
| - cancelAnimationOnCompositor(element, player, startedAnimationId);
|
| - startedAnimationIds.clear();
|
| - return false;
|
| - }
|
| + WebCompositorAnimationPlayer* compositorPlayer = player.compositorPlayer();
|
| + ASSERT(compositorPlayer);
|
| + compositorPlayer->addAnimation(animation.leakPtr());
|
| startedAnimationIds.append(id);
|
| }
|
| ASSERT(!startedAnimationIds.isEmpty());
|
| @@ -314,13 +306,10 @@ void CompositorAnimations::cancelAnimationOnCompositor(const Element& element, c
|
| // compositing update.
|
| return;
|
| }
|
| - if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled()) {
|
| - WebCompositorAnimationPlayer* compositorPlayer = player.compositorPlayer();
|
| - ASSERT(compositorPlayer);
|
| - compositorPlayer->removeAnimation(id);
|
| - } else {
|
| - toLayoutBoxModelObject(element.layoutObject())->layer()->compositedDeprecatedPaintLayerMapping()->mainGraphicsLayer()->removeAnimation(id);
|
| - }
|
| +
|
| + WebCompositorAnimationPlayer* compositorPlayer = player.compositorPlayer();
|
| + ASSERT(compositorPlayer);
|
| + compositorPlayer->removeAnimation(id);
|
| }
|
|
|
| void CompositorAnimations::pauseAnimationForTestingOnCompositor(const Element& element, const AnimationPlayer& player, int id, double pauseTime)
|
| @@ -333,20 +322,14 @@ void CompositorAnimations::pauseAnimationForTestingOnCompositor(const Element& e
|
| ASSERT_NOT_REACHED();
|
| return;
|
| }
|
| - if (RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled()) {
|
| - WebCompositorAnimationPlayer* compositorPlayer = player.compositorPlayer();
|
| - ASSERT(compositorPlayer);
|
| - compositorPlayer->pauseAnimation(id, pauseTime);
|
| - } else {
|
| - toLayoutBoxModelObject(element.layoutObject())->layer()->compositedDeprecatedPaintLayerMapping()->mainGraphicsLayer()->pauseAnimation(id, pauseTime);
|
| - }
|
| +
|
| + WebCompositorAnimationPlayer* compositorPlayer = player.compositorPlayer();
|
| + ASSERT(compositorPlayer);
|
| + compositorPlayer->pauseAnimation(id, pauseTime);
|
| }
|
|
|
| bool CompositorAnimations::canAttachCompositedLayers(const Element& element, const AnimationPlayer& player)
|
| {
|
| - if (!RuntimeEnabledFeatures::compositorAnimationTimelinesEnabled())
|
| - return false;
|
| -
|
| if (!player.compositorPlayer())
|
| return false;
|
|
|
|
|