| 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 void CommitComplete() override { | 268 void CommitComplete() override { |
| 269 LayerTreeHostImpl::CommitComplete(); | 269 LayerTreeHostImpl::CommitComplete(); |
| 270 test_hooks_->CommitCompleteOnThread(this); | 270 test_hooks_->CommitCompleteOnThread(this); |
| 271 } | 271 } |
| 272 | 272 |
| 273 DrawResult PrepareToDraw(FrameData* frame) override { | 273 DrawResult PrepareToDraw(FrameData* frame) override { |
| 274 DrawResult draw_result = LayerTreeHostImpl::PrepareToDraw(frame); | 274 DrawResult draw_result = LayerTreeHostImpl::PrepareToDraw(frame); |
| 275 return test_hooks_->PrepareToDrawOnThread(this, frame, draw_result); | 275 return test_hooks_->PrepareToDrawOnThread(this, frame, draw_result); |
| 276 } | 276 } |
| 277 | 277 |
| 278 void DrawLayers(FrameData* frame, base::TimeTicks frame_begin_time) override { | 278 void DrawLayers(FrameData* frame) override { |
| 279 LayerTreeHostImpl::DrawLayers(frame, frame_begin_time); | 279 LayerTreeHostImpl::DrawLayers(frame); |
| 280 test_hooks_->DrawLayersOnThread(this); | 280 test_hooks_->DrawLayersOnThread(this); |
| 281 } | 281 } |
| 282 | 282 |
| 283 bool SwapBuffers(const LayerTreeHostImpl::FrameData& frame) override { | 283 bool SwapBuffers(const LayerTreeHostImpl::FrameData& frame) override { |
| 284 bool result = LayerTreeHostImpl::SwapBuffers(frame); | 284 bool result = LayerTreeHostImpl::SwapBuffers(frame); |
| 285 test_hooks_->SwapBuffersOnThread(this, result); | 285 test_hooks_->SwapBuffersOnThread(this, result); |
| 286 return result; | 286 return result; |
| 287 } | 287 } |
| 288 | 288 |
| 289 void DidSwapBuffersComplete() override { | 289 void DidSwapBuffersComplete() override { |
| (...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 LayerTreeHost* LayerTreeTest::layer_tree_host() { | 889 LayerTreeHost* LayerTreeTest::layer_tree_host() { |
| 890 // We check for a null proxy here as we sometimes ask for the layer tree host | 890 // We check for a null proxy here as we sometimes ask for the layer tree host |
| 891 // when the proxy does not exist, often for checking settings after a test has | 891 // when the proxy does not exist, often for checking settings after a test has |
| 892 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See | 892 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See |
| 893 // elsewhere in this file for other examples. | 893 // elsewhere in this file for other examples. |
| 894 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked()); | 894 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked()); |
| 895 return layer_tree_host_.get(); | 895 return layer_tree_host_.get(); |
| 896 } | 896 } |
| 897 | 897 |
| 898 } // namespace cc | 898 } // namespace cc |
| OLD | NEW |