| Index: ui/compositor/layer_animator.cc
|
| ===================================================================
|
| --- ui/compositor/layer_animator.cc (revision 245869)
|
| +++ ui/compositor/layer_animator.cc (working copy)
|
| @@ -55,6 +55,7 @@
|
| LayerAnimator::LayerAnimator(base::TimeDelta transition_duration)
|
| : delegate_(NULL),
|
| preemption_strategy_(IMMEDIATELY_SET_NEW_TARGET),
|
| + is_transition_duration_locked_(false),
|
| transition_duration_(transition_duration),
|
| tween_type_(gfx::Tween::LINEAR),
|
| is_started_(false),
|
| @@ -118,6 +119,10 @@
|
| ANIMATED_PROPERTY(float, GRAYSCALE, Grayscale, float, grayscale);
|
| ANIMATED_PROPERTY(SkColor, COLOR, Color, SkColor, color);
|
|
|
| +base::TimeDelta LayerAnimator::GetTransitionDuration() const {
|
| + return transition_duration_;
|
| +}
|
| +
|
| void LayerAnimator::SetDelegate(LayerAnimationDelegate* delegate) {
|
| delegate_ = delegate;
|
| }
|
| @@ -798,8 +803,10 @@
|
| sequence->OnScheduled();
|
| }
|
|
|
| -base::TimeDelta LayerAnimator::GetTransitionDuration() const {
|
| - return transition_duration_;
|
| +void LayerAnimator::SetTransitionDuration(base::TimeDelta duration) {
|
| + if (is_transition_duration_locked_)
|
| + return;
|
| + transition_duration_ = duration;
|
| }
|
|
|
| void LayerAnimator::ClearAnimationsInternal() {
|
|
|