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

Unified Diff: cc/layers/layer.cc

Issue 231133002: CC::Animations should use TimeTicks & TimeDelta to represent time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding Animation related changes and unittests Created 6 years, 8 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: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index a9e59d35ed8007322e6961899eb8ad625c2e9b8a..9a3f6e62be53b29d105e31d8a7ddc888e3a3f848 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -1118,7 +1118,11 @@ bool Layer::AddAnimation(scoped_ptr <Animation> animation) {
}
void Layer::PauseAnimation(int animation_id, double time_offset) {
- layer_animation_controller_->PauseAnimation(animation_id, time_offset);
+ layer_animation_controller_->PauseAnimation(
+ animation_id,
+ base::TimeTicks::FromInternalValue(time_offset *
+ base::Time::kMicrosecondsPerSecond) -
+ base::TimeTicks());
SetNeedsCommit();
}

Powered by Google App Engine
This is Rietveld 408576698