| Index: ui/views/animation/square_ink_drop_ripple.cc
|
| diff --git a/ui/views/animation/square_ink_drop_ripple.cc b/ui/views/animation/square_ink_drop_ripple.cc
|
| index 94fa10dbbda3378fd5f0b85222a6d1e32976fdf7..2fc338bd403ed709ab0f61c1e05a0a1c13eb1be3 100644
|
| --- a/ui/views/animation/square_ink_drop_ripple.cc
|
| +++ b/ui/views/animation/square_ink_drop_ripple.cc
|
| @@ -297,10 +297,6 @@ void SquareInkDropRipple::AnimateStateChange(
|
| GetAnimationDuration(ACTION_PENDING_TRANSFORM),
|
| ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET,
|
| gfx::Tween::EASE_IN_OUT, animation_observer);
|
| - AnimateCenterPoint(target_center_point_,
|
| - GetAnimationDuration(ACTION_PENDING_TRANSFORM),
|
| - ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET,
|
| - gfx::Tween::EASE_IN, animation_observer);
|
| break;
|
| case InkDropState::ACTION_TRIGGERED: {
|
| DCHECK(old_ink_drop_state == InkDropState::HIDDEN ||
|
| @@ -320,10 +316,6 @@ void SquareInkDropRipple::AnimateStateChange(
|
| GetAnimationDuration(ACTION_TRIGGERED_TRANSFORM),
|
| ui::LayerAnimator::ENQUEUE_NEW_ANIMATION,
|
| gfx::Tween::EASE_IN_OUT, animation_observer);
|
| - AnimateCenterPoint(target_center_point_,
|
| - GetAnimationDuration(ACTION_TRIGGERED_TRANSFORM),
|
| - ui::LayerAnimator::ENQUEUE_NEW_ANIMATION,
|
| - gfx::Tween::EASE_IN, animation_observer);
|
| break;
|
| }
|
| case InkDropState::ALTERNATE_ACTION_PENDING:
|
| @@ -338,10 +330,6 @@ void SquareInkDropRipple::AnimateStateChange(
|
| GetAnimationDuration(ALTERNATE_ACTION_PENDING),
|
| ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET,
|
| gfx::Tween::EASE_IN_OUT, animation_observer);
|
| - AnimateCenterPoint(target_center_point_,
|
| - GetAnimationDuration(ALTERNATE_ACTION_PENDING),
|
| - ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET,
|
| - gfx::Tween::EASE_IN, animation_observer);
|
| break;
|
| case InkDropState::ALTERNATE_ACTION_TRIGGERED: {
|
| DCHECK_EQ(InkDropState::ALTERNATE_ACTION_PENDING, old_ink_drop_state)
|
| @@ -361,11 +349,6 @@ void SquareInkDropRipple::AnimateStateChange(
|
| ALTERNATE_ACTION_TRIGGERED_TRANSFORM),
|
| ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET,
|
| gfx::Tween::EASE_IN_OUT, animation_observer);
|
| - AnimateCenterPoint(
|
| - target_center_point_,
|
| - GetAnimationDuration(ALTERNATE_ACTION_TRIGGERED_TRANSFORM),
|
| - ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET,
|
| - gfx::Tween::EASE_IN, animation_observer);
|
| break;
|
| }
|
| case InkDropState::ACTIVATED: {
|
| @@ -385,10 +368,6 @@ void SquareInkDropRipple::AnimateStateChange(
|
| transforms, GetAnimationDuration(ACTIVATED_CIRCLE_TRANSFORM),
|
| ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET,
|
| gfx::Tween::EASE_IN_OUT, animation_observer);
|
| - AnimateCenterPoint(target_center_point_,
|
| - GetAnimationDuration(ACTIVATED_CIRCLE_TRANSFORM),
|
| - ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET,
|
| - gfx::Tween::EASE_IN, animation_observer);
|
| } else if (old_ink_drop_state == InkDropState::ACTION_PENDING) {
|
| rect_transform_preemption_strategy =
|
| ui::LayerAnimator::ENQUEUE_NEW_ANIMATION;
|
| @@ -399,10 +378,6 @@ void SquareInkDropRipple::AnimateStateChange(
|
| GetAnimationDuration(ACTIVATED_RECT_TRANSFORM),
|
| rect_transform_preemption_strategy,
|
| gfx::Tween::EASE_IN_OUT, animation_observer);
|
| - AnimateCenterPoint(target_center_point_,
|
| - GetAnimationDuration(ACTIVATED_RECT_TRANSFORM),
|
| - rect_transform_preemption_strategy,
|
| - gfx::Tween::EASE_IN, animation_observer);
|
| break;
|
| }
|
| case InkDropState::DEACTIVATED: {
|
| @@ -421,10 +396,6 @@ void SquareInkDropRipple::AnimateStateChange(
|
| GetAnimationDuration(DEACTIVATED_TRANSFORM),
|
| ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET,
|
| gfx::Tween::EASE_IN_OUT, animation_observer);
|
| - AnimateCenterPoint(target_center_point_,
|
| - GetAnimationDuration(DEACTIVATED_TRANSFORM),
|
| - ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET,
|
| - gfx::Tween::EASE_IN, animation_observer);
|
| break;
|
| }
|
| }
|
| @@ -445,29 +416,6 @@ void SquareInkDropRipple::AbortAllAnimations() {
|
| painted_layers_[i]->GetAnimator()->AbortAllAnimations();
|
| }
|
|
|
| -void SquareInkDropRipple::AnimateCenterPoint(
|
| - const gfx::Point& center_point,
|
| - base::TimeDelta duration,
|
| - ui::LayerAnimator::PreemptionStrategy preemption_strategy,
|
| - gfx::Tween::Type tween,
|
| - ui::LayerAnimationObserver* observer) {
|
| - ui::LayerAnimator* animator = root_layer_.GetAnimator();
|
| - ui::ScopedLayerAnimationSettings animation(animator);
|
| - animation.SetPreemptionStrategy(preemption_strategy);
|
| - animation.SetTweenType(tween);
|
| - gfx::Transform transform;
|
| - transform.Translate(target_center_point_.x(), target_center_point_.y());
|
| - std::unique_ptr<ui::LayerAnimationElement> element =
|
| - ui::LayerAnimationElement::CreateTransformElement(transform, duration);
|
| - ui::LayerAnimationSequence* sequence =
|
| - new ui::LayerAnimationSequence(std::move(element));
|
| -
|
| - if (observer)
|
| - sequence->AddObserver(observer);
|
| -
|
| - animator->StartAnimation(sequence);
|
| -}
|
| -
|
| void SquareInkDropRipple::AnimateToTransforms(
|
| const InkDropTransforms transforms,
|
| base::TimeDelta duration,
|
|
|