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

Unified Diff: trunk/src/cc/trees/layer_tree_host_unittest_animation.cc

Issue 254883004: Revert 266624 "cc: Split animating and drawing into separate act..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
« no previous file with comments | « trunk/src/cc/trees/layer_tree_host_impl_unittest.cc ('k') | trunk/src/cc/trees/single_thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/cc/trees/layer_tree_host_unittest_animation.cc
===================================================================
--- trunk/src/cc/trees/layer_tree_host_unittest_animation.cc (revision 266894)
+++ trunk/src/cc/trees/layer_tree_host_unittest_animation.cc (working copy)
@@ -1244,69 +1244,5 @@
// Only the non-impl-paint multi-threaded compositor freezes animations.
MULTI_THREAD_NOIMPL_TEST_F(LayerTreeHostAnimationTestFrozenAnimationTickTime);
-class LayerTreeHostAnimationTestAddAnimationAfterAnimating
- : public LayerTreeHostAnimationTest {
- public:
- LayerTreeHostAnimationTestAddAnimationAfterAnimating()
- : num_swap_buffers_(0) {}
-
- virtual void SetupTree() OVERRIDE {
- LayerTreeHostAnimationTest::SetupTree();
- content_ = Layer::Create();
- content_->SetBounds(gfx::Size(4, 4));
- layer_tree_host()->root_layer()->AddChild(content_);
- }
-
- virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); }
-
- virtual void DidCommit() OVERRIDE {
- switch (layer_tree_host()->source_frame_number()) {
- case 1:
- // First frame: add an animation to the root layer.
- AddAnimatedTransformToLayer(layer_tree_host()->root_layer(), 0.1, 5, 5);
- break;
- case 2:
- // Second frame: add an animation to the content layer. The root layer
- // animation has caused us to animate already during this frame.
- AddOpacityTransitionToLayer(content_.get(), 0.1, 5, 5, false);
- break;
- }
- }
-
- virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
- bool result) OVERRIDE {
- // The third frame is when both animations have started. Check that both
- // have a valid start time.
- if (++num_swap_buffers_ == 3) {
- EndTest();
- AnimationRegistrar::AnimationControllerMap copy =
- host_impl->animation_registrar()->active_animation_controllers();
- EXPECT_EQ(2u, copy.size());
- for (AnimationRegistrar::AnimationControllerMap::iterator iter =
- copy.begin();
- iter != copy.end();
- ++iter) {
- int id = ((*iter).second->id());
- if (id == host_impl->RootLayer()->id()) {
- Animation* anim = (*iter).second->GetAnimation(Animation::Transform);
- EXPECT_GT(anim->start_time(), 0);
- } else if (id == host_impl->RootLayer()->children()[0]->id()) {
- Animation* anim = (*iter).second->GetAnimation(Animation::Opacity);
- EXPECT_GT(anim->start_time(), 0);
- }
- }
- }
- }
-
- virtual void AfterTest() OVERRIDE {}
-
- private:
- scoped_refptr<Layer> content_;
- int num_swap_buffers_;
-};
-
-SINGLE_AND_MULTI_THREAD_TEST_F(
- LayerTreeHostAnimationTestAddAnimationAfterAnimating);
-
} // namespace
} // namespace cc
« no previous file with comments | « trunk/src/cc/trees/layer_tree_host_impl_unittest.cc ('k') | trunk/src/cc/trees/single_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698