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

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 changed as per review comments Created 6 years, 7 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 | « cc/trees/layer_tree_host_impl.cc ('k') | ui/compositor/layer_animation_sequence.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8e11556afe993c01b2e40cdfde98dbe1171e2895..9e0282237d1acf0f58b9ddd617031f47f38c5042 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)
@@ -1367,10 +1369,10 @@ class LayerTreeHostAnimationTestAddAnimationAfterAnimating
int id = ((*iter).second->id());
if (id == host_impl->RootLayer()->id()) {
Animation* anim = (*iter).second->GetAnimation(Animation::Transform);
- EXPECT_GT(anim->start_time(), 0);
+ EXPECT_GT((anim->start_time() - base::TimeTicks()).InSecondsF(), 0);
} else if (id == host_impl->RootLayer()->children()[0]->id()) {
Animation* anim = (*iter).second->GetAnimation(Animation::Opacity);
- EXPECT_GT(anim->start_time(), 0);
+ EXPECT_GT((anim->start_time() - base::TimeTicks()).InSecondsF(), 0);
}
}
}
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | ui/compositor/layer_animation_sequence.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698