Commit a9c13a25 authored by ajuma@chromium.org's avatar ajuma@chromium.org

cc: Fix slow LayerTreeHostAnimationTest

This fixes LayerTreeHostAnimationTestAnimationsAddedToNewAndExistingLayers
whose single-thread versions were taking 4 seconds, since they couldn't
finish until there were no longer any running animations (in 
single-thread mode, having running animations means continually having
pending commits).

This removes the running animations, allowing the test to finish.

BUG=None

Review URL: https://codereview.chromium.org/378943004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282051 0039d316-1c4b-4281-b951-d872f2087c98
parent 19bce315
......@@ -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();
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();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment