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

Unified Diff: ui/compositor/layer_animation_sequence.cc

Issue 10956055: Revert 157567 - Revert 156318 - I had originally tried to build upon http://codereview.chromium.org… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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_animation_sequence.h ('k') | ui/compositor/layer_animator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_animation_sequence.cc
===================================================================
--- ui/compositor/layer_animation_sequence.cc (revision 158150)
+++ ui/compositor/layer_animation_sequence.cc (working copy)
@@ -31,12 +31,12 @@
DetachedFromSequence(this, true));
}
-bool LayerAnimationSequence::Progress(base::TimeDelta elapsed,
+void LayerAnimationSequence::Progress(base::TimeDelta elapsed,
LayerAnimationDelegate* delegate) {
bool redraw_required = false;
if (elements_.empty())
- return redraw_required;
+ return;
if (is_cyclic_ && duration_ > base::TimeDelta()) {
// If delta = elapsed - last_start_ is huge, we can skip ahead by complete
@@ -69,13 +69,16 @@
redraw_required = true;
}
+ // Since the delegate may be deleted due to the notifications below, it is
+ // important that we schedule a draw before sending them.
+ if (redraw_required)
+ delegate->ScheduleDrawForAnimation();
+
if (!is_cyclic_ && elapsed == duration_) {
last_element_ = 0;
last_start_ = base::TimeDelta::FromMilliseconds(0);
NotifyEnded();
}
-
- return redraw_required;
}
void LayerAnimationSequence::GetTargetValue(
« no previous file with comments | « ui/compositor/layer_animation_sequence.h ('k') | ui/compositor/layer_animator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698