| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 LayerTreeHostImpl::NotifyReadyToDraw(); | 192 LayerTreeHostImpl::NotifyReadyToDraw(); |
| 193 test_hooks_->NotifyReadyToDrawOnThread(this); | 193 test_hooks_->NotifyReadyToDrawOnThread(this); |
| 194 } | 194 } |
| 195 | 195 |
| 196 void NotifyAllTileTasksCompleted() override { | 196 void NotifyAllTileTasksCompleted() override { |
| 197 LayerTreeHostImpl::NotifyAllTileTasksCompleted(); | 197 LayerTreeHostImpl::NotifyAllTileTasksCompleted(); |
| 198 test_hooks_->NotifyAllTileTasksCompleted(this); | 198 test_hooks_->NotifyAllTileTasksCompleted(this); |
| 199 } | 199 } |
| 200 | 200 |
| 201 void BlockNotifyReadyToActivateForTesting(bool block) override { | 201 void BlockNotifyReadyToActivateForTesting(bool block) override { |
| 202 CHECK(task_runner_provider()->ImplThreadTaskRunner()) | 202 // Not supported for single-threaded mode. |
| 203 << "Not supported for single-threaded mode."; | 203 CHECK(task_runner_provider()->ImplThreadTaskRunner()); |
| 204 block_notify_ready_to_activate_for_testing_ = block; | 204 block_notify_ready_to_activate_for_testing_ = block; |
| 205 if (!block && notify_ready_to_activate_was_blocked_) { | 205 if (!block && notify_ready_to_activate_was_blocked_) { |
| 206 task_runner_provider_->ImplThreadTaskRunner()->PostTask( | 206 task_runner_provider_->ImplThreadTaskRunner()->PostTask( |
| 207 FROM_HERE, | 207 FROM_HERE, |
| 208 base::Bind(&LayerTreeHostImplForTesting::NotifyReadyToActivate, | 208 base::Bind(&LayerTreeHostImplForTesting::NotifyReadyToActivate, |
| 209 base::Unretained(this))); | 209 base::Unretained(this))); |
| 210 notify_ready_to_activate_was_blocked_ = false; | 210 notify_ready_to_activate_was_blocked_ = false; |
| 211 } | 211 } |
| 212 } | 212 } |
| 213 | 213 |
| (...skipping 708 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 |