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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 | 701 |
702 virtual void DispatchAddInstantAnimation(Layer* layer_to_receive_animation) | 702 virtual void DispatchAddInstantAnimation(Layer* layer_to_receive_animation) |
703 OVERRIDE { | 703 OVERRIDE { |
704 LayerTreeHostAnimationTest::DispatchAddInstantAnimation( | 704 LayerTreeHostAnimationTest::DispatchAddInstantAnimation( |
705 layer_to_receive_animation); | 705 layer_to_receive_animation); |
706 added_animations_++; | 706 added_animations_++; |
707 } | 707 } |
708 | 708 |
709 virtual bool PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, | 709 virtual bool PrepareToDrawOnThread(LayerTreeHostImpl* host_impl, |
710 LayerTreeHostImpl::FrameData* frame_data, | 710 LayerTreeHostImpl::FrameData* frame_data, |
711 bool result) { | 711 bool result) OVERRIDE { |
712 if (added_animations_ < 2) | 712 if (added_animations_ < 2) |
713 return result; | 713 return result; |
714 // Act like there is checkerboard when the second animation wants to draw. | 714 // Act like there is checkerboard when the second animation wants to draw. |
715 return false; | 715 return false; |
716 } | 716 } |
717 | 717 |
718 virtual void DidCommitAndDrawFrame() OVERRIDE { | 718 virtual void DidCommitAndDrawFrame() OVERRIDE { |
719 switch (layer_tree_host()->commit_number()) { | 719 switch (layer_tree_host()->commit_number()) { |
720 case 1: | 720 case 1: |
721 // The animation is longer than 1 vsync. | 721 // The animation is longer than 1 vsync. |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 FakeContentLayerClient client_; | 821 FakeContentLayerClient client_; |
822 scoped_refptr<FakeContentLayer> root_layer_; | 822 scoped_refptr<FakeContentLayer> root_layer_; |
823 int started_times_; | 823 int started_times_; |
824 int num_commit_complete_; | 824 int num_commit_complete_; |
825 }; | 825 }; |
826 | 826 |
827 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestPinchZoomScrollbars); | 827 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestPinchZoomScrollbars); |
828 | 828 |
829 } // namespace | 829 } // namespace |
830 } // namespace cc | 830 } // namespace cc |
OLD | NEW |