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

Unified Diff: ui/gfx/compositor/layer_animation_sequence.cc

Issue 9222018: reland -- Disable animations during aura tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Gardening Created 8 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
Index: ui/gfx/compositor/layer_animation_sequence.cc
diff --git a/ui/gfx/compositor/layer_animation_sequence.cc b/ui/gfx/compositor/layer_animation_sequence.cc
index b5475ecfa727409c92c9a51e5752133f3faba5a7..fbd7bca9cb0c4689e5e8f3edc4ade41211b787f3 100644
--- a/ui/gfx/compositor/layer_animation_sequence.cc
+++ b/ui/gfx/compositor/layer_animation_sequence.cc
@@ -16,11 +16,13 @@ namespace ui {
LayerAnimationSequence::LayerAnimationSequence()
: is_cyclic_(false),
+ is_animating_(false),
last_element_(0) {
}
LayerAnimationSequence::LayerAnimationSequence(LayerAnimationElement* element)
: is_cyclic_(false),
+ is_animating_(false),
last_element_(0) {
AddElement(element);
}
@@ -36,6 +38,9 @@ void LayerAnimationSequence::Progress(base::TimeDelta elapsed,
if (elements_.empty())
return;
+ // We are now animating.
+ is_animating_ = true;
+
if (is_cyclic_ && duration_ > base::TimeDelta()) {
// If delta = elapsed - last_start_ is huge, we can skip ahead by complete
// loops to save time.
@@ -69,6 +74,7 @@ void LayerAnimationSequence::Progress(base::TimeDelta elapsed,
if (!is_cyclic_ && elapsed == duration_) {
last_element_ = 0;
last_start_ = base::TimeDelta::FromMilliseconds(0);
+ is_animating_ = false;
NotifyEnded();
}
}
@@ -90,6 +96,7 @@ void LayerAnimationSequence::Abort() {
}
last_element_ = 0;
last_start_ = base::TimeDelta::FromMilliseconds(0);
+ is_animating_ = false;
NotifyAborted();
}

Powered by Google App Engine
This is Rietveld 408576698