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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 DrawResult PrepareToDraw(FrameData* frame) override { | 235 DrawResult PrepareToDraw(FrameData* frame) override { |
236 DrawResult draw_result = LayerTreeHostImpl::PrepareToDraw(frame); | 236 DrawResult draw_result = LayerTreeHostImpl::PrepareToDraw(frame); |
237 return test_hooks_->PrepareToDrawOnThread(this, frame, draw_result); | 237 return test_hooks_->PrepareToDrawOnThread(this, frame, draw_result); |
238 } | 238 } |
239 | 239 |
240 void DrawLayers(FrameData* frame) override { | 240 void DrawLayers(FrameData* frame) override { |
241 LayerTreeHostImpl::DrawLayers(frame); | 241 LayerTreeHostImpl::DrawLayers(frame); |
242 test_hooks_->DrawLayersOnThread(this); | 242 test_hooks_->DrawLayersOnThread(this); |
243 } | 243 } |
244 | 244 |
245 bool SwapBuffers(const LayerTreeHostImpl::FrameData& frame) override { | |
246 bool result = LayerTreeHostImpl::SwapBuffers(frame); | |
247 test_hooks_->SwapBuffersOnThread(this, result); | |
248 return result; | |
249 } | |
250 | |
251 void DidSwapBuffersComplete() override { | 245 void DidSwapBuffersComplete() override { |
252 LayerTreeHostImpl::DidSwapBuffersComplete(); | 246 LayerTreeHostImpl::DidSwapBuffersComplete(); |
253 test_hooks_->SwapBuffersCompleteOnThread(this); | 247 test_hooks_->SwapBuffersCompleteOnThread(); |
254 } | 248 } |
255 | 249 |
256 void ReclaimResources(const CompositorFrameAck* ack) override { | 250 void ReclaimResources(const CompositorFrameAck* ack) override { |
257 LayerTreeHostImpl::ReclaimResources(ack); | 251 LayerTreeHostImpl::ReclaimResources(ack); |
258 } | 252 } |
259 | 253 |
260 void NotifyReadyToActivate() override { | 254 void NotifyReadyToActivate() override { |
261 if (block_notify_ready_to_activate_for_testing_) { | 255 if (block_notify_ready_to_activate_for_testing_) { |
262 notify_ready_to_activate_was_blocked_ = true; | 256 notify_ready_to_activate_was_blocked_ = true; |
263 } else { | 257 } else { |
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 | 1039 |
1046 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const { | 1040 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const { |
1047 DCHECK(IsRemoteTest()); | 1041 DCHECK(IsRemoteTest()); |
1048 DCHECK(remote_client_layer_tree_host_); | 1042 DCHECK(remote_client_layer_tree_host_); |
1049 | 1043 |
1050 return static_cast<RemoteChannelImplForTest*>( | 1044 return static_cast<RemoteChannelImplForTest*>( |
1051 remote_client_layer_tree_host_->proxy()); | 1045 remote_client_layer_tree_host_->proxy()); |
1052 } | 1046 } |
1053 | 1047 |
1054 } // namespace cc | 1048 } // namespace cc |
OLD | NEW |