| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/test/layer_tree_test.h" | 5 #include "cc/test/layer_tree_test.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 bool AnimateLayers(base::TimeTicks monotonic_time) override { | 232 bool AnimateLayers(base::TimeTicks monotonic_time) override { |
| 233 test_hooks_->WillAnimateLayers(this, monotonic_time); | 233 test_hooks_->WillAnimateLayers(this, monotonic_time); |
| 234 bool result = LayerTreeHostImpl::AnimateLayers(monotonic_time); | 234 bool result = LayerTreeHostImpl::AnimateLayers(monotonic_time); |
| 235 test_hooks_->AnimateLayers(this, monotonic_time); | 235 test_hooks_->AnimateLayers(this, monotonic_time); |
| 236 return result; | 236 return result; |
| 237 } | 237 } |
| 238 | 238 |
| 239 void UpdateAnimationState(bool start_ready_animations) override { | 239 void UpdateAnimationState(bool start_ready_animations) override { |
| 240 LayerTreeHostImpl::UpdateAnimationState(start_ready_animations); | 240 LayerTreeHostImpl::UpdateAnimationState(start_ready_animations); |
| 241 bool has_unfinished_animation = false; | 241 bool has_unfinished_animation = false; |
| 242 for (const auto& it : animation_host()->active_players_for_testing()) { | 242 for (const auto& it : animation_host()->ticking_players_for_testing()) { |
| 243 if (it->HasActiveAnimation()) { | 243 if (it->HasTickingAnimation()) { |
| 244 has_unfinished_animation = true; | 244 has_unfinished_animation = true; |
| 245 break; | 245 break; |
| 246 } | 246 } |
| 247 } | 247 } |
| 248 test_hooks_->UpdateAnimationState(this, has_unfinished_animation); | 248 test_hooks_->UpdateAnimationState(this, has_unfinished_animation); |
| 249 } | 249 } |
| 250 | 250 |
| 251 void NotifyTileStateChanged(const Tile* tile) override { | 251 void NotifyTileStateChanged(const Tile* tile) override { |
| 252 LayerTreeHostImpl::NotifyTileStateChanged(tile); | 252 LayerTreeHostImpl::NotifyTileStateChanged(tile); |
| 253 test_hooks_->NotifyTileStateChangedOnThread(this, tile); | 253 test_hooks_->NotifyTileStateChangedOnThread(this, tile); |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 DCHECK(!IsRemoteTest()); | 922 DCHECK(!IsRemoteTest()); |
| 923 return layer_tree_host_in_process_; | 923 return layer_tree_host_in_process_; |
| 924 } | 924 } |
| 925 | 925 |
| 926 Proxy* LayerTreeTest::proxy() { | 926 Proxy* LayerTreeTest::proxy() { |
| 927 return layer_tree_host_in_process() ? layer_tree_host_in_process()->proxy() | 927 return layer_tree_host_in_process() ? layer_tree_host_in_process()->proxy() |
| 928 : NULL; | 928 : NULL; |
| 929 } | 929 } |
| 930 | 930 |
| 931 } // namespace cc | 931 } // namespace cc |
| OLD | NEW |