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

Unified Diff: cc/trees/layer_tree_host_unittest_animation.cc

Issue 99733003: Add monotonic time and target property to cc::AnimationDelegate notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 45387578c84266310831645335b9dccd2197a468..17b5653d8d0827d9d516012885aa00dc8d445a52 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -148,9 +148,12 @@ class LayerTreeHostAnimationTestAddAnimation
}
}
- virtual void NotifyAnimationStarted(double wall_clock_time) OVERRIDE {
+ virtual void NotifyAnimationStarted(
+ double wall_clock_time,
+ double monotonic_time,
+ Animation::TargetProperty target_property) OVERRIDE {
received_animation_started_notification_ = true;
- start_time_ = wall_clock_time;
+ start_time_ = monotonic_time;
if (num_animates_) {
EXPECT_LT(0.0, start_time_);
@@ -239,7 +242,10 @@ class LayerTreeHostAnimationTestAnimationsGetDeleted
EndTest();
}
- virtual void NotifyAnimationFinished(double time) OVERRIDE {
+ virtual void NotifyAnimationFinished(
+ double wall_clock_time,
+ double monotonic_time,
+ Animation::TargetProperty target_property) OVERRIDE {
// Animations on the impl-side controller only get deleted during a commit,
// so we need to schedule a commit.
layer_tree_host()->SetNeedsCommit();
@@ -309,7 +315,10 @@ class LayerTreeHostAnimationTestNoBackgroundTickingWithoutActiveTree
PostAddAnimationToMainThread(layer_tree_host()->root_layer());
}
- virtual void NotifyAnimationFinished(double time) OVERRIDE {
+ virtual void NotifyAnimationFinished(
+ double wall_clock_time,
+ double monotonic_time,
+ Animation::TargetProperty target_property) OVERRIDE {
// Replace animated commits with an empty tree.
layer_tree_host()->SetRootLayer(make_scoped_refptr<Layer>(NULL));
}
@@ -499,7 +508,10 @@ class LayerTreeHostAnimationTestSynchronizeAnimationStartTimes
PostAddAnimationToMainThread(content_.get());
}
- virtual void NotifyAnimationStarted(double time) OVERRIDE {
+ virtual void NotifyAnimationStarted(
+ double wall_clock_time,
+ double monotonic_time,
+ Animation::TargetProperty target_property) OVERRIDE {
LayerAnimationController* controller =
layer_tree_host()->root_layer()->children()[0]->
layer_animation_controller();
@@ -554,7 +566,10 @@ class LayerTreeHostAnimationTestAnimationFinishedEvents
PostAddInstantAnimationToMainThread(layer_tree_host()->root_layer());
}
- virtual void NotifyAnimationFinished(double time) OVERRIDE {
+ virtual void NotifyAnimationFinished(
+ double wall_clock_time,
+ double monotonic_time,
+ Animation::TargetProperty target_property) OVERRIDE {
LayerAnimationController* controller =
layer_tree_host()->root_layer()->layer_animation_controller();
Animation* animation =
@@ -770,11 +785,17 @@ class LayerTreeHostAnimationTestRunAnimationWhenNotCanDraw
PostAddAnimationToMainThread(content_.get());
}
- virtual void NotifyAnimationStarted(double wall_clock_time) OVERRIDE {
+ virtual void NotifyAnimationStarted(
+ double wall_clock_time,
+ double monotonic_time,
+ Animation::TargetProperty target_property) OVERRIDE {
started_times_++;
}
- virtual void NotifyAnimationFinished(double wall_clock_time) OVERRIDE {
+ virtual void NotifyAnimationFinished(
+ double wall_clock_time,
+ double monotonic_time,
+ Animation::TargetProperty target_property) OVERRIDE {
EndTest();
}
@@ -816,12 +837,18 @@ class LayerTreeHostAnimationTestRunAnimationWhenNotVisible
layer_tree_host()->SetVisible(false);
}
- virtual void NotifyAnimationStarted(double wall_clock_time) OVERRIDE {
+ virtual void NotifyAnimationStarted(
+ double wall_clock_time,
+ double monotonic_time,
+ Animation::TargetProperty target_property) OVERRIDE {
EXPECT_FALSE(visible_);
started_times_++;
}
- virtual void NotifyAnimationFinished(double wall_clock_time) OVERRIDE {
+ virtual void NotifyAnimationFinished(
+ double wall_clock_time,
+ double monotonic_time,
+ Animation::TargetProperty target_property) OVERRIDE {
EXPECT_FALSE(visible_);
EXPECT_EQ(1, started_times_);
EndTest();
@@ -893,13 +920,19 @@ class LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations
}
}
- virtual void NotifyAnimationStarted(double wall_clock_time) OVERRIDE {
+ virtual void NotifyAnimationStarted(
+ double wall_clock_time,
+ double monotonic_time,
+ Animation::TargetProperty target_property) OVERRIDE {
if (TestEnded())
return;
started_times_++;
}
- virtual void NotifyAnimationFinished(double wall_clock_time) OVERRIDE {
+ virtual void NotifyAnimationFinished(
+ double wall_clock_time,
+ double monotonic_time,
+ Animation::TargetProperty target_property) OVERRIDE {
// We should be checkerboarding already, but it should still finish the
// first animation.
EXPECT_EQ(2, added_animations_);

Powered by Google App Engine
This is Rietveld 408576698