OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include "cc/animation/animation_curve.h" | 7 #include "cc/animation/animation_curve.h" |
8 #include "cc/animation/layer_animation_controller.h" | 8 #include "cc/animation/layer_animation_controller.h" |
9 #include "cc/animation/timing_function.h" | 9 #include "cc/animation/timing_function.h" |
10 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 class LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations | 680 class LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations |
681 : public LayerTreeHostAnimationTest { | 681 : public LayerTreeHostAnimationTest { |
682 virtual void SetupTree() OVERRIDE { | 682 virtual void SetupTree() OVERRIDE { |
683 LayerTreeHostAnimationTest::SetupTree(); | 683 LayerTreeHostAnimationTest::SetupTree(); |
684 content_ = FakeContentLayer::Create(&client_); | 684 content_ = FakeContentLayer::Create(&client_); |
685 content_->SetBounds(gfx::Size(4, 4)); | 685 content_->SetBounds(gfx::Size(4, 4)); |
686 content_->set_layer_animation_delegate(this); | 686 content_->set_layer_animation_delegate(this); |
687 layer_tree_host()->root_layer()->AddChild(content_); | 687 layer_tree_host()->root_layer()->AddChild(content_); |
688 } | 688 } |
689 | 689 |
| 690 virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE { |
| 691 // Make sure that drawing many times doesn't cause a checkerboarded |
| 692 // animation to start so we avoid flake in this test. |
| 693 settings->timeout_and_draw_when_animation_checkerboards = false; |
| 694 } |
| 695 |
690 virtual void BeginTest() OVERRIDE { | 696 virtual void BeginTest() OVERRIDE { |
691 added_animations_ = 0; | 697 added_animations_ = 0; |
692 started_times_ = 0; | 698 started_times_ = 0; |
693 finished_times_ = 0; | 699 finished_times_ = 0; |
694 | 700 |
695 PostSetNeedsCommitToMainThread(); | 701 PostSetNeedsCommitToMainThread(); |
696 } | 702 } |
697 | 703 |
698 virtual void DispatchAddInstantAnimation(Layer* layer_to_receive_animation) | 704 virtual void DispatchAddInstantAnimation(Layer* layer_to_receive_animation) |
699 OVERRIDE { | 705 OVERRIDE { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 int finished_times_; | 760 int finished_times_; |
755 FakeContentLayerClient client_; | 761 FakeContentLayerClient client_; |
756 scoped_refptr<FakeContentLayer> content_; | 762 scoped_refptr<FakeContentLayer> content_; |
757 }; | 763 }; |
758 | 764 |
759 MULTI_THREAD_TEST_F( | 765 MULTI_THREAD_TEST_F( |
760 LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations); | 766 LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations); |
761 | 767 |
762 } // namespace | 768 } // namespace |
763 } // namespace cc | 769 } // namespace cc |
OLD | NEW |