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

Unified Diff: ui/compositor/layer_animator.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/layer_animator.h ('k') | ui/compositor/scoped_layer_animation_settings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « ui/compositor/layer_animator.h ('k') | ui/compositor/scoped_layer_animation_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698