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

Unified Diff: ui/compositor/layer_animator.cc

Issue 2473483013: [ash-md] Enhanced LayerAnimator to allow animations to be aborted/started in OnLayerAnimationStarte… (Closed)
Patch Set: Addresse review comments. Created 4 years, 1 month 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_animation_sequence.cc ('k') | ui/compositor/layer_animator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_animator.cc
diff --git a/ui/compositor/layer_animator.cc b/ui/compositor/layer_animator.cc
index 87b852ecf93b2557040aa3e19334af0e5cbacf1c..72ca40d0424c3994295773506ccc828c22867c6a 100644
--- a/ui/compositor/layer_animator.cc
+++ b/ui/compositor/layer_animator.cc
@@ -846,17 +846,19 @@ bool LayerAnimator::StartSequenceImmediately(LayerAnimationSequence* sequence) {
if (!sequence->animation_group_id())
sequence->set_animation_group_id(cc::AnimationIdProvider::NextGroupId());
- if (!sequence->waiting_for_group_start() ||
- sequence->IsFirstElementThreaded()) {
- sequence->set_start_time(start_time);
- sequence->Start(delegate());
- }
+
running_animations_.push_back(
RunningAnimation(sequence->AsWeakPtr()));
// Need to keep a reference to the animation.
AddToQueueIfNotPresent(sequence);
+ if (!sequence->waiting_for_group_start() ||
+ sequence->IsFirstElementThreaded()) {
+ sequence->set_start_time(start_time);
+ sequence->Start(delegate());
+ }
+
// Ensure that animations get stepped at their start time.
Step(start_time);
« no previous file with comments | « ui/compositor/layer_animation_sequence.cc ('k') | ui/compositor/layer_animator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698