Index: ui/compositor/scoped_layer_animation_settings.cc |
=================================================================== |
--- ui/compositor/scoped_layer_animation_settings.cc (revision 245869) |
+++ ui/compositor/scoped_layer_animation_settings.cc (working copy) |
@@ -81,7 +81,9 @@ |
ScopedLayerAnimationSettings::ScopedLayerAnimationSettings( |
LayerAnimator* animator) |
: animator_(animator), |
- old_transition_duration_(animator->transition_duration_), |
+ old_is_transition_duration_locked_( |
+ animator->is_transition_duration_locked_), |
+ old_transition_duration_(animator->GetTransitionDuration()), |
old_tween_type_(animator->tween_type()), |
old_preemption_strategy_(animator->preemption_strategy()), |
inverse_observer_(new InvertingObserver()) { |
@@ -90,7 +92,9 @@ |
} |
ScopedLayerAnimationSettings::~ScopedLayerAnimationSettings() { |
- animator_->transition_duration_ = old_transition_duration_; |
+ animator_->is_transition_duration_locked_ = |
+ old_is_transition_duration_locked_; |
+ animator_->SetTransitionDuration(old_transition_duration_); |
animator_->set_tween_type(old_tween_type_); |
animator_->set_preemption_strategy(old_preemption_strategy_); |
@@ -113,9 +117,13 @@ |
void ScopedLayerAnimationSettings::SetTransitionDuration( |
base::TimeDelta duration) { |
- animator_->transition_duration_ = duration; |
+ animator_->SetTransitionDuration(duration); |
} |
+void ScopedLayerAnimationSettings::LockTransitionDuration() { |
+ animator_->is_transition_duration_locked_ = true; |
+} |
+ |
base::TimeDelta ScopedLayerAnimationSettings::GetTransitionDuration() const { |
return animator_->GetTransitionDuration(); |
} |