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

Unified Diff: sky/engine/core/animation/css/CSSAnimations.cpp

Issue 772673002: Fix Animations, Remove Compostior Animations. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: CompositorPendingAnimations -> PendingAnimations Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/animation/PendingAnimations.cpp ('k') | sky/engine/core/core.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/animation/css/CSSAnimations.cpp
diff --git a/sky/engine/core/animation/css/CSSAnimations.cpp b/sky/engine/core/animation/css/CSSAnimations.cpp
index dcfbcef3b33aa4d68979130220b8a9c9562df16b..44d0679ade8475bf1ed77455b19578669f54f00f 100644
--- a/sky/engine/core/animation/css/CSSAnimations.cpp
+++ b/sky/engine/core/animation/css/CSSAnimations.cpp
@@ -34,7 +34,6 @@
#include "gen/sky/core/StylePropertyShorthand.h"
#include "sky/engine/core/animation/ActiveAnimations.h"
#include "sky/engine/core/animation/AnimationTimeline.h"
-#include "sky/engine/core/animation/CompositorAnimations.h"
#include "sky/engine/core/animation/KeyframeEffectModel.h"
#include "sky/engine/core/animation/LegacyStyleInterpolation.h"
#include "sky/engine/core/animation/css/CSSAnimatableValueFactory.h"
@@ -336,9 +335,6 @@ void CSSAnimations::maybeApplyPendingUpdate(Element* element)
ASSERT(m_transitions.contains(id));
RefPtr<AnimationPlayer> player = m_transitions.take(id).player;
- Animation* animation = toAnimation(player->source());
- if (animation->hasActiveAnimationsOnCompositor(id) && update->newTransitions().find(id) != update->newTransitions().end())
- retargetedCompositorTransitions.add(id, std::pair<RefPtr<Animation>, double>(animation, player->startTimeInternal()));
player->cancel();
player->update(TimingUpdateOnDemand);
}
@@ -355,29 +351,6 @@ void CSSAnimations::maybeApplyPendingUpdate(Element* element)
OwnPtr<TransitionEventDelegate> eventDelegate = adoptPtr(new TransitionEventDelegate(element, newTransition.eventId));
RefPtr<AnimationEffect> effect = inertAnimation->effect();
-
- if (retargetedCompositorTransitions.contains(id)) {
- const std::pair<RefPtr<Animation>, double>& oldTransition = retargetedCompositorTransitions.get(id);
- RefPtr<Animation> oldAnimation = oldTransition.first;
- double oldStartTime = oldTransition.second;
- double inheritedTime = isNull(oldStartTime) ? 0 : element->document().timeline().currentTimeInternal() - oldStartTime;
-
- AnimatableValueKeyframeEffectModel* oldEffect = toAnimatableValueKeyframeEffectModel(inertAnimation->effect());
- const KeyframeVector& frames = oldEffect->getFrames();
-
- AnimatableValueKeyframeVector newFrames;
- newFrames.append(toAnimatableValueKeyframe(frames[0]->clone().get()));
- newFrames.append(toAnimatableValueKeyframe(frames[1]->clone().get()));
-
- newFrames[0]->clearPropertyValue(id);
- RefPtr<InertAnimation> inertAnimationForSampling = InertAnimation::create(oldAnimation->effect(), oldAnimation->specifiedTiming(), false);
- OwnPtr<Vector<RefPtr<Interpolation> > > sample = inertAnimationForSampling->sample(inheritedTime);
- ASSERT(sample->size() == 1);
- newFrames[0]->setPropertyValue(id, toLegacyStyleInterpolation(sample->at(0).get())->currentValue());
-
- effect = AnimatableValueKeyframeEffectModel::create(newFrames);
- }
-
RefPtr<Animation> transition = Animation::create(element, effect, inertAnimation->specifiedTiming(), Animation::TransitionPriority, eventDelegate.release());
RefPtr<AnimationPlayer> player = element->document().timeline().createAnimationPlayer(transition.get());
player->update(TimingUpdateOnDemand);
« no previous file with comments | « sky/engine/core/animation/PendingAnimations.cpp ('k') | sky/engine/core/core.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698