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

Unified Diff: cc/trees/layer_tree_host_unittest_animation.cc

Issue 378943004: cc: Fix slow LayerTreeHostAnimationTest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | no next file » | 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 64dd31d2c931fd7c2dfb3e3a8fa61512c1b5bbde..f717c2af9cf61ad23e0b38491a6b59b4a9993fe8 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -1253,20 +1253,23 @@ class LayerTreeHostAnimationTestAnimationsAddedToNewAndExistingLayers
virtual void UpdateAnimationState(LayerTreeHostImpl* host_impl,
bool has_unfinished_animation) OVERRIDE {
- Animation* root_animation = host_impl->active_tree()
- ->root_layer()
- ->layer_animation_controller()
- ->GetAnimation(Animation::Opacity);
+ LayerAnimationController* root_controller_impl =
+ host_impl->active_tree()->root_layer()->layer_animation_controller();
+ Animation* root_animation =
+ root_controller_impl->GetAnimation(Animation::Opacity);
if (!root_animation || root_animation->run_state() != Animation::Running)
return;
- Animation* child_animation = host_impl->active_tree()
- ->root_layer()
- ->children()[0]
- ->layer_animation_controller()
- ->GetAnimation(Animation::Opacity);
+ LayerAnimationController* child_controller_impl =
+ host_impl->active_tree()->root_layer()->children()
+ [0]->layer_animation_controller();
ajuma 2014/07/09 14:23:54 Weird line breaking, but that's how git cl format
+ Animation* child_animation =
+ child_controller_impl->GetAnimation(Animation::Opacity);
EXPECT_EQ(Animation::Running, child_animation->run_state());
EXPECT_EQ(root_animation->start_time(), child_animation->start_time());
+ root_controller_impl->AbortAnimations(Animation::Opacity);
+ root_controller_impl->AbortAnimations(Animation::Transform);
+ child_controller_impl->AbortAnimations(Animation::Opacity);
EndTest();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698