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 "cc/animation/animation.h" | 8 #include "cc/animation/animation.h" |
9 #include "cc/animation/animation_registrar.h" | 9 #include "cc/animation/animation_registrar.h" |
10 #include "cc/animation/layer_animation_controller.h" | 10 #include "cc/animation/layer_animation_controller.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 void ReclaimResources(const CompositorFrameAck* ack) override { | 203 void ReclaimResources(const CompositorFrameAck* ack) override { |
204 LayerTreeHostImpl::ReclaimResources(ack); | 204 LayerTreeHostImpl::ReclaimResources(ack); |
205 } | 205 } |
206 | 206 |
207 void UpdateVisibleTiles() override { | 207 void UpdateVisibleTiles() override { |
208 LayerTreeHostImpl::UpdateVisibleTiles(); | 208 LayerTreeHostImpl::UpdateVisibleTiles(); |
209 test_hooks_->UpdateVisibleTilesOnThread(this); | 209 test_hooks_->UpdateVisibleTilesOnThread(this); |
210 } | 210 } |
211 | 211 |
212 void NotifyReadyToActivate() override { | 212 void NotifyReadyToActivate() override { |
213 if (block_notify_ready_to_activate_for_testing_) | 213 if (block_notify_ready_to_activate_for_testing_) { |
214 notify_ready_to_activate_was_blocked_ = true; | 214 notify_ready_to_activate_was_blocked_ = true; |
215 else | 215 } else { |
216 client_->NotifyReadyToActivate(); | 216 client_->NotifyReadyToActivate(); |
| 217 test_hooks_->NotifyReadyToActivateOnThread(this); |
| 218 } |
| 219 } |
| 220 |
| 221 void NotifyReadyToDraw() override { |
| 222 client_->NotifyReadyToDraw(); |
| 223 test_hooks_->NotifyReadyToDrawOnThread(this); |
217 } | 224 } |
218 | 225 |
219 void BlockNotifyReadyToActivateForTesting(bool block) override { | 226 void BlockNotifyReadyToActivateForTesting(bool block) override { |
220 CHECK(settings().impl_side_painting); | 227 CHECK(settings().impl_side_painting); |
221 CHECK(proxy()->ImplThreadTaskRunner()) | 228 CHECK(proxy()->ImplThreadTaskRunner()) |
222 << "Not supported for single-threaded mode."; | 229 << "Not supported for single-threaded mode."; |
223 block_notify_ready_to_activate_for_testing_ = block; | 230 block_notify_ready_to_activate_for_testing_ = block; |
224 if (!block && notify_ready_to_activate_was_blocked_) { | 231 if (!block && notify_ready_to_activate_was_blocked_) { |
225 NotifyReadyToActivate(); | 232 NotifyReadyToActivate(); |
226 notify_ready_to_activate_was_blocked_ = false; | 233 notify_ready_to_activate_was_blocked_ = false; |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 return -1; | 746 return -1; |
740 } | 747 } |
741 | 748 |
742 void LayerTreeTest::DestroyLayerTreeHost() { | 749 void LayerTreeTest::DestroyLayerTreeHost() { |
743 if (layer_tree_host_ && layer_tree_host_->root_layer()) | 750 if (layer_tree_host_ && layer_tree_host_->root_layer()) |
744 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); | 751 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); |
745 layer_tree_host_ = nullptr; | 752 layer_tree_host_ = nullptr; |
746 } | 753 } |
747 | 754 |
748 } // namespace cc | 755 } // namespace cc |
OLD | NEW |