Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: ui/compositor/scoped_layer_animation_settings.cc

Issue 139013006: Revert 245031 "This CL" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1795/src/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/compositor/scoped_layer_animation_settings.h ('k') | ui/views/corewm/window_animations.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « ui/compositor/scoped_layer_animation_settings.h ('k') | ui/views/corewm/window_animations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698