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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 | 593 |
594 virtual void SetupTree() OVERRIDE { | 594 virtual void SetupTree() OVERRIDE { |
595 LayerTreeHostAnimationTest::SetupTree(); | 595 LayerTreeHostAnimationTest::SetupTree(); |
596 content_ = FakeContentLayer::Create(&client_); | 596 content_ = FakeContentLayer::Create(&client_); |
597 content_->SetBounds(gfx::Size(4, 4)); | 597 content_->SetBounds(gfx::Size(4, 4)); |
598 content_->set_layer_animation_delegate(this); | 598 content_->set_layer_animation_delegate(this); |
599 layer_tree_host()->root_layer()->AddChild(content_); | 599 layer_tree_host()->root_layer()->AddChild(content_); |
600 } | 600 } |
601 | 601 |
602 virtual void BeginTest() OVERRIDE { | 602 virtual void BeginTest() OVERRIDE { |
603 layer_tree_host()->SetViewportSize(gfx::Size(), gfx::Size()); | 603 layer_tree_host()->SetViewportSize(gfx::Size()); |
604 PostAddAnimationToMainThread(content_); | 604 PostAddAnimationToMainThread(content_); |
605 } | 605 } |
606 | 606 |
607 virtual void notifyAnimationStarted(double wall_clock_time) OVERRIDE { | 607 virtual void notifyAnimationStarted(double wall_clock_time) OVERRIDE { |
608 started_times_++; | 608 started_times_++; |
609 // TODO(ajuma): Remove this EndTest() so we test animation finishing. | 609 // TODO(ajuma): Remove this EndTest() so we test animation finishing. |
610 EndTest(); | 610 EndTest(); |
611 } | 611 } |
612 | 612 |
613 virtual void notifyAnimationFinished(double wall_clock_time) OVERRIDE { | 613 virtual void notifyAnimationFinished(double wall_clock_time) OVERRIDE { |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 int finished_times_; | 754 int finished_times_; |
755 FakeContentLayerClient client_; | 755 FakeContentLayerClient client_; |
756 scoped_refptr<FakeContentLayer> content_; | 756 scoped_refptr<FakeContentLayer> content_; |
757 }; | 757 }; |
758 | 758 |
759 MULTI_THREAD_TEST_F( | 759 MULTI_THREAD_TEST_F( |
760 LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations); | 760 LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations); |
761 | 761 |
762 } // namespace | 762 } // namespace |
763 } // namespace cc | 763 } // namespace cc |
OLD | NEW |