| Index: cc/layer_animation_controller.cc
|
| diff --git a/cc/layer_animation_controller.cc b/cc/layer_animation_controller.cc
|
| index 0ec11e4fa5d06e49bc779cfbcbf9020ee6429920..ef5bf97c68682b7a3d0b8463c547373c950d02f3 100644
|
| --- a/cc/layer_animation_controller.cc
|
| +++ b/cc/layer_animation_controller.cc
|
| @@ -125,6 +125,22 @@ void LayerAnimationController::animate(double monotonicTime)
|
| m_lastTickTime = monotonicTime;
|
| }
|
|
|
| +void LayerAnimationController::accumulatePropertyUpdates(double monotonicTime,
|
| + AnimationEventsVector* events)
|
| +{
|
| + for (size_t i = 0; i < m_activeAnimations.size(); ++i) {
|
| + if (m_activeAnimations[i]->targetProperty() == Animation::Opacity) {
|
| + Animation* animation = m_activeAnimations[i];
|
| + float opacity = animation->curve()->toFloatAnimationCurve()->getValue(monotonicTime);
|
| + AnimationEvent event(AnimationEvent::PropertyUpdate,
|
| + m_id, animation->group(),
|
| + Animation::Opacity, monotonicTime,
|
| + opacity);
|
| + events->push_back(event);
|
| + }
|
| + }
|
| +}
|
| +
|
| void LayerAnimationController::updateState(AnimationEventsVector* events)
|
| {
|
| if (!hasActiveObserver())
|
| @@ -136,6 +152,8 @@ void LayerAnimationController::updateState(AnimationEventsVector* events)
|
| startAnimationsWaitingForTargetAvailability(m_lastTickTime);
|
| promoteStartedAnimations(m_lastTickTime, events);
|
|
|
| + accumulatePropertyUpdates(m_lastTickTime, events);
|
| +
|
| updateActivation();
|
| }
|
|
|
| @@ -245,7 +263,10 @@ void LayerAnimationController::pushNewAnimationsToImplThread(LayerAnimationContr
|
|
|
| struct IsCompleted {
|
| IsCompleted(const LayerAnimationController& mainThreadController) : m_mainThreadController(mainThreadController) { }
|
| - bool operator()(Animation* animation) const { return !m_mainThreadController.getAnimation(animation->group(), animation->targetProperty()); }
|
| + bool operator()(Animation* animation) const {
|
| + if (animation->isImplAnimationOnly())
|
| + return false;
|
| + return !m_mainThreadController.getAnimation(animation->group(), animation->targetProperty()); }
|
| private:
|
| const LayerAnimationController& m_mainThreadController;
|
| };
|
|
|