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/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 void ScheduledActionInvalidateOutputSurface() override { | 174 void ScheduledActionInvalidateOutputSurface() override { |
175 ThreadProxy::ScheduledActionInvalidateOutputSurface(); | 175 ThreadProxy::ScheduledActionInvalidateOutputSurface(); |
176 test_hooks_->ScheduledActionInvalidateOutputSurface(); | 176 test_hooks_->ScheduledActionInvalidateOutputSurface(); |
177 } | 177 } |
178 | 178 |
179 void SendBeginMainFrameNotExpectedSoon() override { | 179 void SendBeginMainFrameNotExpectedSoon() override { |
180 ThreadProxy::SendBeginMainFrameNotExpectedSoon(); | 180 ThreadProxy::SendBeginMainFrameNotExpectedSoon(); |
181 test_hooks_->SendBeginMainFrameNotExpectedSoon(); | 181 test_hooks_->SendBeginMainFrameNotExpectedSoon(); |
182 } | 182 } |
183 | 183 |
| 184 void DidActivateSyncTree() override { |
| 185 ThreadProxy::DidActivateSyncTree(); |
| 186 test_hooks_->DidActivateSyncTree(); |
| 187 } |
| 188 |
184 void SetThrottleFrameProductionOnImpl(bool throttle) override { | 189 void SetThrottleFrameProductionOnImpl(bool throttle) override { |
185 ThreadProxy::SetThrottleFrameProductionOnImpl(throttle); | 190 ThreadProxy::SetThrottleFrameProductionOnImpl(throttle); |
186 test_hooks_->SetThrottleFrameProductionOnImpl(throttle); | 191 test_hooks_->SetThrottleFrameProductionOnImpl(throttle); |
187 } | 192 } |
188 | 193 |
189 void InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) override { | 194 void InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) override { |
190 ThreadProxy::InitializeOutputSurfaceOnImpl(output_surface); | 195 ThreadProxy::InitializeOutputSurfaceOnImpl(output_surface); |
191 test_hooks_->InitializeOutputSurfaceOnImpl(output_surface); | 196 test_hooks_->InitializeOutputSurfaceOnImpl(output_surface); |
192 } | 197 } |
193 | 198 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 void ReleaseOutputSurfaceOnImpl(CompletionEvent* completion) override { | 246 void ReleaseOutputSurfaceOnImpl(CompletionEvent* completion) override { |
242 ThreadProxy::ReleaseOutputSurfaceOnImpl(completion); | 247 ThreadProxy::ReleaseOutputSurfaceOnImpl(completion); |
243 test_hooks_->ReleaseOutputSurfaceOnImpl(); | 248 test_hooks_->ReleaseOutputSurfaceOnImpl(); |
244 } | 249 } |
245 | 250 |
246 void FinishGLOnImpl(CompletionEvent* completion) override { | 251 void FinishGLOnImpl(CompletionEvent* completion) override { |
247 ThreadProxy::FinishGLOnImpl(completion); | 252 ThreadProxy::FinishGLOnImpl(completion); |
248 test_hooks_->FinishGLOnImpl(); | 253 test_hooks_->FinishGLOnImpl(); |
249 } | 254 } |
250 | 255 |
251 void StartCommitOnImpl(CompletionEvent* completion) override { | 256 void StartCommitOnImpl(CompletionEvent* completion, |
252 ThreadProxy::StartCommitOnImpl(completion); | 257 LayerTreeHost* layer_tree_host, |
| 258 bool hold_commit_for_activation) override { |
| 259 ThreadProxy::StartCommitOnImpl(completion, layer_tree_host, |
| 260 hold_commit_for_activation); |
253 test_hooks_->StartCommitOnImpl(); | 261 test_hooks_->StartCommitOnImpl(); |
254 } | 262 } |
255 | 263 |
| 264 void InitializeImplOnImpl(CompletionEvent* completion, |
| 265 LayerTreeHost* layer_tree_host) override { |
| 266 ThreadProxy::InitializeImplOnImpl(completion, layer_tree_host); |
| 267 test_hooks_->InitializeImplOnImpl(); |
| 268 } |
| 269 |
| 270 void LayerTreeHostClosedOnImpl(CompletionEvent* completion) override { |
| 271 test_hooks_->WillCloseLayerTreeHostOnImpl(); |
| 272 ThreadProxy::LayerTreeHostClosedOnImpl(completion); |
| 273 } |
| 274 |
256 void DidCompleteSwapBuffers() override { | 275 void DidCompleteSwapBuffers() override { |
257 ThreadProxy::DidCompleteSwapBuffers(); | 276 ThreadProxy::DidCompleteSwapBuffers(); |
258 test_hooks_->ReceivedDidCompleteSwapBuffers(); | 277 test_hooks_->ReceivedDidCompleteSwapBuffers(); |
259 } | 278 } |
260 | 279 |
261 void SetRendererCapabilitiesMainCopy( | 280 void SetRendererCapabilitiesMainCopy( |
262 const RendererCapabilities& capabilities) override { | 281 const RendererCapabilities& capabilities) override { |
263 ThreadProxy::SetRendererCapabilitiesMainCopy(capabilities); | 282 ThreadProxy::SetRendererCapabilitiesMainCopy(capabilities); |
264 test_hooks_->ReceivedSetRendererCapabilitiesMainCopy(capabilities); | 283 test_hooks_->ReceivedSetRendererCapabilitiesMainCopy(capabilities); |
265 } | 284 } |
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 LayerTreeHost* LayerTreeTest::layer_tree_host() { | 1154 LayerTreeHost* LayerTreeTest::layer_tree_host() { |
1136 // We check for a null proxy here as we sometimes ask for the layer tree host | 1155 // We check for a null proxy here as we sometimes ask for the layer tree host |
1137 // when the proxy does not exist, often for checking settings after a test has | 1156 // when the proxy does not exist, often for checking settings after a test has |
1138 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See | 1157 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See |
1139 // elsewhere in this file for other examples. | 1158 // elsewhere in this file for other examples. |
1140 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked()); | 1159 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked()); |
1141 return layer_tree_host_.get(); | 1160 return layer_tree_host_.get(); |
1142 } | 1161 } |
1143 | 1162 |
1144 } // namespace cc | 1163 } // namespace cc |
OLD | NEW |