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

Unified Diff: cc/animation/animation.cc

Issue 23926003: Take time_offset into account when ticking animations that are Starting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « no previous file | cc/animation/animation_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/animation.cc
diff --git a/cc/animation/animation.cc b/cc/animation/animation.cc
index 214b8bfc47f30529c38625724e002e2eb1845395..b509cfd994fceae049e3415cf914518f89592706 100644
--- a/cc/animation/animation.cc
+++ b/cc/animation/animation.cc
@@ -167,6 +167,12 @@ double Animation::TrimTimeToCurrentIteration(double monotonic_time) const {
// subtract all time spent paused.
trimmed -= start_time_ + total_paused_time_;
+ // If we're just starting or we're waiting on receiving a start time,
+ // time is 'stuck' at the initial state.
+ if ((run_state_ == Starting && !has_set_start_time()) ||
+ needs_synchronized_start_time())
+ trimmed = time_offset_;
+
// Zero is always the start of the animation.
if (trimmed <= 0)
return 0;
« no previous file with comments | « no previous file | cc/animation/animation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698