| Index: ui/gfx/compositor/layer_animation_element.cc
|
| diff --git a/ui/gfx/compositor/layer_animation_element.cc b/ui/gfx/compositor/layer_animation_element.cc
|
| index fb52bbb3c14c5829091fb7a1af0f17a8dae6e3ec..5459b1fff906159071d0471b499160d9176a92e3 100644
|
| --- a/ui/gfx/compositor/layer_animation_element.cc
|
| +++ b/ui/gfx/compositor/layer_animation_element.cc
|
| @@ -26,6 +26,7 @@ class Pause : public LayerAnimationElement {
|
| virtual void OnStart(LayerAnimationDelegate* delegate) OVERRIDE {}
|
| virtual void OnProgress(double t,
|
| LayerAnimationDelegate* delegate) OVERRIDE {}
|
| + virtual void OnSetTarget(LayerAnimationDelegate* delegate) const OVERRIDE {}
|
| virtual void OnAbort() OVERRIDE {}
|
|
|
| DISALLOW_COPY_AND_ASSIGN(Pause);
|
| @@ -51,6 +52,10 @@ class TransformTransition : public LayerAnimationElement {
|
| Tween::ValueBetween(t, start_, target_));
|
| }
|
|
|
| + virtual void OnSetTarget(LayerAnimationDelegate* delegate) const OVERRIDE {
|
| + delegate->SetTransformFromAnimation(target_);
|
| + }
|
| +
|
| virtual void OnAbort() OVERRIDE {}
|
|
|
| private:
|
| @@ -86,6 +91,10 @@ class BoundsTransition : public LayerAnimationElement {
|
| delegate->SetBoundsFromAnimation(Tween::ValueBetween(t, start_, target_));
|
| }
|
|
|
| + virtual void OnSetTarget(LayerAnimationDelegate* delegate) const OVERRIDE {
|
| + delegate->SetBoundsFromAnimation(target_);
|
| + }
|
| +
|
| virtual void OnAbort() OVERRIDE {}
|
|
|
| private:
|
| @@ -119,6 +128,10 @@ class OpacityTransition : public LayerAnimationElement {
|
| delegate->SetOpacityFromAnimation(Tween::ValueBetween(t, start_, target_));
|
| }
|
|
|
| + virtual void OnSetTarget(LayerAnimationDelegate* delegate) const OVERRIDE {
|
| + delegate->SetOpacityFromAnimation(target_);
|
| + }
|
| +
|
| virtual void OnAbort() OVERRIDE {}
|
|
|
| private:
|
| @@ -155,9 +168,14 @@ void LayerAnimationElement::Progress(double t,
|
| if (first_frame_)
|
| OnStart(delegate);
|
| OnProgress(t, delegate);
|
| + delegate->ScheduleDrawForAnimation();
|
| first_frame_ = t == 1.0;
|
| }
|
|
|
| +void LayerAnimationElement::SetTarget(LayerAnimationDelegate* delegate) const {
|
| + OnSetTarget(delegate);
|
| +}
|
| +
|
| void LayerAnimationElement::Abort() {
|
| first_frame_ = true;
|
| OnAbort();
|
|
|