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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 virtual void BeginTest() OVERRIDE { | 186 virtual void BeginTest() OVERRIDE { |
187 PostAddAnimationToMainThread(layer_tree_host()->root_layer()); | 187 PostAddAnimationToMainThread(layer_tree_host()->root_layer()); |
188 } | 188 } |
189 | 189 |
190 virtual void AnimateLayers( | 190 virtual void AnimateLayers( |
191 LayerTreeHostImpl* host_impl, | 191 LayerTreeHostImpl* host_impl, |
192 base::TimeTicks monotonic_time) OVERRIDE { | 192 base::TimeTicks monotonic_time) OVERRIDE { |
193 started_animating_ = true; | 193 started_animating_ = true; |
194 } | 194 } |
195 | 195 |
196 virtual void DrawLayersOnThread(LayerTreeHostImpl* tree_impl) OVERRIDE { | 196 virtual void DrawLayersOnThread(LayerTreeHostImpl* host_impl) OVERRIDE { |
197 if (started_animating_) | 197 if (started_animating_) |
198 EndTest(); | 198 EndTest(); |
199 } | 199 } |
200 | 200 |
201 virtual bool PrepareToDrawOnThread( | 201 virtual bool PrepareToDrawOnThread( |
202 LayerTreeHostImpl* host_impl, | 202 LayerTreeHostImpl* host_impl, |
203 LayerTreeHostImpl::FrameData* frame, | 203 LayerTreeHostImpl::FrameData* frame, |
204 bool result) OVERRIDE { | 204 bool result) OVERRIDE { |
205 return false; | 205 return false; |
206 } | 206 } |
207 | 207 |
208 virtual void AfterTest() OVERRIDE {} | 208 virtual void AfterTest() OVERRIDE { } |
209 | 209 |
210 private: | 210 private: |
211 bool started_animating_; | 211 bool started_animating_; |
212 }; | 212 }; |
213 | 213 |
214 // Starvation can only be an issue with the MT compositor. | 214 // Starvation can only be an issue with the MT compositor. |
215 MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestCheckerboardDoesNotStarveDraws); | 215 MULTI_THREAD_TEST_F(LayerTreeHostAnimationTestCheckerboardDoesNotStarveDraws); |
216 | 216 |
217 // Ensures that animations eventually get deleted. | 217 // Ensures that animations eventually get deleted. |
218 class LayerTreeHostAnimationTestAnimationsGetDeleted | 218 class LayerTreeHostAnimationTestAnimationsGetDeleted |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 int finished_times_; | 803 int finished_times_; |
804 FakeContentLayerClient client_; | 804 FakeContentLayerClient client_; |
805 scoped_refptr<FakeContentLayer> content_; | 805 scoped_refptr<FakeContentLayer> content_; |
806 }; | 806 }; |
807 | 807 |
808 MULTI_THREAD_TEST_F( | 808 MULTI_THREAD_TEST_F( |
809 LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations); | 809 LayerTreeHostAnimationTestCheckerboardDoesntStartAnimations); |
810 | 810 |
811 } // namespace | 811 } // namespace |
812 } // namespace cc | 812 } // namespace cc |
OLD | NEW |