| Index: cc/animation/element_animations.cc
|
| diff --git a/cc/animation/element_animations.cc b/cc/animation/element_animations.cc
|
| index c43a0a51706fc84308663f90af2106b9f9f98061..d8f8c4aa191ad7bced60ab94f0d8f74c48b1e48c 100644
|
| --- a/cc/animation/element_animations.cc
|
| +++ b/cc/animation/element_animations.cc
|
| @@ -146,6 +146,8 @@ void ElementAnimations::PushPropertiesTo(
|
| }
|
|
|
| void ElementAnimations::AddAnimation(std::unique_ptr<Animation> animation) {
|
| + DCHECK(!animation->is_impl_only() ||
|
| + animation->target_property() == TargetProperty::SCROLL_OFFSET);
|
| bool added_transform_animation =
|
| animation->target_property() == TargetProperty::TRANSFORM;
|
| bool added_opacity_animation =
|
| @@ -171,73 +173,6 @@ void ElementAnimations::Animate(base::TimeTicks monotonic_time) {
|
| UpdateAnimatingOpacity();
|
| }
|
|
|
| -void ElementAnimations::AccumulatePropertyUpdates(
|
| - base::TimeTicks monotonic_time,
|
| - AnimationEvents* events) {
|
| - if (!events)
|
| - return;
|
| -
|
| - for (size_t i = 0; i < animations_.size(); ++i) {
|
| - Animation* animation = animations_[i].get();
|
| - if (!animation->is_impl_only())
|
| - continue;
|
| -
|
| - if (!animation->InEffect(monotonic_time))
|
| - continue;
|
| -
|
| - base::TimeDelta trimmed =
|
| - animation->TrimTimeToCurrentIteration(monotonic_time);
|
| - switch (animation->target_property()) {
|
| - case TargetProperty::OPACITY: {
|
| - AnimationEvent event(AnimationEvent::PROPERTY_UPDATE, element_id_,
|
| - animation->group(), TargetProperty::OPACITY,
|
| - monotonic_time);
|
| - const FloatAnimationCurve* float_animation_curve =
|
| - animation->curve()->ToFloatAnimationCurve();
|
| - event.opacity = float_animation_curve->GetValue(trimmed);
|
| - event.is_impl_only = true;
|
| - events->events_.push_back(event);
|
| - break;
|
| - }
|
| -
|
| - case TargetProperty::TRANSFORM: {
|
| - AnimationEvent event(AnimationEvent::PROPERTY_UPDATE, element_id_,
|
| - animation->group(), TargetProperty::TRANSFORM,
|
| - monotonic_time);
|
| - const TransformAnimationCurve* transform_animation_curve =
|
| - animation->curve()->ToTransformAnimationCurve();
|
| - event.transform = transform_animation_curve->GetValue(trimmed);
|
| - event.is_impl_only = true;
|
| - events->events_.push_back(event);
|
| - break;
|
| - }
|
| -
|
| - case TargetProperty::FILTER: {
|
| - AnimationEvent event(AnimationEvent::PROPERTY_UPDATE, element_id_,
|
| - animation->group(), TargetProperty::FILTER,
|
| - monotonic_time);
|
| - const FilterAnimationCurve* filter_animation_curve =
|
| - animation->curve()->ToFilterAnimationCurve();
|
| - event.filters = filter_animation_curve->GetValue(trimmed);
|
| - event.is_impl_only = true;
|
| - events->events_.push_back(event);
|
| - break;
|
| - }
|
| -
|
| - case TargetProperty::BACKGROUND_COLOR: {
|
| - break;
|
| - }
|
| -
|
| - case TargetProperty::SCROLL_OFFSET: {
|
| - // Impl-side changes to scroll offset are already sent back to the
|
| - // main thread (e.g. for user-driven scrolling), so a PROPERTY_UPDATE
|
| - // isn't needed.
|
| - break;
|
| - }
|
| - }
|
| - }
|
| -}
|
| -
|
| void ElementAnimations::UpdateState(bool start_ready_animations,
|
| AnimationEvents* events) {
|
| if (!has_element_in_active_list())
|
| @@ -259,8 +194,6 @@ void ElementAnimations::UpdateState(bool start_ready_animations,
|
| PromoteStartedAnimations(last_tick_time_, events);
|
| }
|
|
|
| - AccumulatePropertyUpdates(last_tick_time_, events);
|
| -
|
| UpdateActivation(NORMAL_ACTIVATION);
|
| }
|
|
|
|
|