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

Unified Diff: cc/trees/layer_tree_host_unittest_animation.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: Code Refactored as per the comments. 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/trees/layer_tree_host_unittest_animation.cc
diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc
index aeeb4f5a54b5efc975e0d43f6d61f783f66660e0..5f8c0a80fe17cfcbce5246371efda438c4ed5a58 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -568,7 +568,8 @@ class LayerTreeHostAnimationTestSynchronizeAnimationStartTimes
layer_animation_controller();
Animation* animation =
controller->GetAnimation(Animation::Opacity);
- main_start_time_ = animation->start_time();
+ main_start_time_ =
+ (animation->start_time() - base::TimeTicks()).InSecondsF();
controller->RemoveAnimation(animation->id());
if (impl_start_time_ > 0.0)
@@ -586,7 +587,8 @@ class LayerTreeHostAnimationTestSynchronizeAnimationStartTimes
if (!animation)
return;
- impl_start_time_ = animation->start_time();
+ impl_start_time_ =
+ (animation->start_time() - base::TimeTicks()).InSecondsF();
controller->RemoveAnimation(animation->id());
if (main_start_time_ > 0.0)

Powered by Google App Engine
This is Rietveld 408576698