| Index: sky/engine/core/animation/CompositorPendingAnimations.cpp
|
| diff --git a/sky/engine/core/animation/CompositorPendingAnimations.cpp b/sky/engine/core/animation/CompositorPendingAnimations.cpp
|
| index 8f3d3a6223fcb436e0c8d679e1f9bdf7143d155a..684d1a3605adbe0316be9f69887f74841d4b9710 100644
|
| --- a/sky/engine/core/animation/CompositorPendingAnimations.cpp
|
| +++ b/sky/engine/core/animation/CompositorPendingAnimations.cpp
|
| @@ -58,38 +58,20 @@ void CompositorPendingAnimations::add(AnimationPlayer* player)
|
| bool CompositorPendingAnimations::update(bool startOnCompositor)
|
| {
|
| Vector<AnimationPlayer*> waitingForStartTime;
|
| - bool startedSynchronizedOnCompositor = false;
|
| -
|
| Vector<RefPtr<AnimationPlayer> > players;
|
| players.swap(m_pending);
|
|
|
| for (size_t i = 0; i < players.size(); ++i) {
|
| AnimationPlayer& player = *players[i].get();
|
| - bool hadCompositorAnimation = player.hasActiveAnimationsOnCompositor();
|
| player.preCommit(startOnCompositor);
|
| - if (player.hasActiveAnimationsOnCompositor() && !hadCompositorAnimation) {
|
| - startedSynchronizedOnCompositor = true;
|
| - }
|
| -
|
| if (player.playing() && !player.hasStartTime()) {
|
| waitingForStartTime.append(&player);
|
| }
|
| }
|
|
|
| - // If any synchronized animations were started on the compositor, all
|
| - // remaning synchronized animations need to wait for the synchronized
|
| - // start time. Otherwise they may start immediately.
|
| - if (startedSynchronizedOnCompositor) {
|
| - for (size_t i = 0; i < waitingForStartTime.size(); ++i) {
|
| - if (!waitingForStartTime[i]->hasStartTime()) {
|
| - m_waitingForCompositorAnimationStart.append(waitingForStartTime[i]);
|
| - }
|
| - }
|
| - } else {
|
| - for (size_t i = 0; i < waitingForStartTime.size(); ++i) {
|
| - if (!waitingForStartTime[i]->hasStartTime()) {
|
| - waitingForStartTime[i]->notifyCompositorStartTime(waitingForStartTime[i]->timeline()->currentTimeInternal());
|
| - }
|
| + for (size_t i = 0; i < waitingForStartTime.size(); ++i) {
|
| + if (!waitingForStartTime[i]->hasStartTime()) {
|
| + waitingForStartTime[i]->notifyCompositorStartTime(waitingForStartTime[i]->timeline()->currentTimeInternal());
|
| }
|
| }
|
|
|
| @@ -100,36 +82,7 @@ bool CompositorPendingAnimations::update(bool startOnCompositor)
|
| }
|
|
|
| ASSERT(m_pending.isEmpty());
|
| -
|
| - if (startedSynchronizedOnCompositor)
|
| - return true;
|
| -
|
| - if (m_waitingForCompositorAnimationStart.isEmpty())
|
| - return false;
|
| -
|
| - // Check if we're still waiting for any compositor animations to start.
|
| - for (size_t i = 0; i < m_waitingForCompositorAnimationStart.size(); ++i) {
|
| - if (m_waitingForCompositorAnimationStart[i].get()->hasActiveAnimationsOnCompositor())
|
| - return true;
|
| - }
|
| -
|
| - // If not, go ahead and start any animations that were waiting.
|
| - notifyCompositorAnimationStarted(monotonicallyIncreasingTime());
|
| -
|
| - ASSERT(m_pending.isEmpty());
|
| return false;
|
| }
|
|
|
| -void CompositorPendingAnimations::notifyCompositorAnimationStarted(double monotonicAnimationStartTime)
|
| -{
|
| - for (size_t i = 0; i < m_waitingForCompositorAnimationStart.size(); ++i) {
|
| - AnimationPlayer* player = m_waitingForCompositorAnimationStart[i].get();
|
| - if (player->hasStartTime())
|
| - continue;
|
| - player->notifyCompositorStartTime(monotonicAnimationStartTime - player->timeline()->zeroTime());
|
| - }
|
| -
|
| - m_waitingForCompositorAnimationStart.clear();
|
| -}
|
| -
|
| } // namespace
|
|
|