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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 } | 397 } |
398 } | 398 } |
399 | 399 |
400 void ActivateSyncTree() override { | 400 void ActivateSyncTree() override { |
401 test_hooks_->WillActivateTreeOnThread(this); | 401 test_hooks_->WillActivateTreeOnThread(this); |
402 LayerTreeHostImpl::ActivateSyncTree(); | 402 LayerTreeHostImpl::ActivateSyncTree(); |
403 DCHECK(!pending_tree()); | 403 DCHECK(!pending_tree()); |
404 test_hooks_->DidActivateTreeOnThread(this); | 404 test_hooks_->DidActivateTreeOnThread(this); |
405 } | 405 } |
406 | 406 |
407 bool InitializeRenderer(scoped_ptr<OutputSurface> output_surface) override { | 407 bool InitializeRenderer(OutputSurface* output_surface) override { |
408 bool success = LayerTreeHostImpl::InitializeRenderer(output_surface.Pass()); | 408 bool success = LayerTreeHostImpl::InitializeRenderer(output_surface); |
409 test_hooks_->InitializedRendererOnThread(this, success); | 409 test_hooks_->InitializedRendererOnThread(this, success); |
410 return success; | 410 return success; |
411 } | 411 } |
412 | 412 |
413 void SetVisible(bool visible) override { | 413 void SetVisible(bool visible) override { |
414 LayerTreeHostImpl::SetVisible(visible); | 414 LayerTreeHostImpl::SetVisible(visible); |
415 test_hooks_->DidSetVisibleOnImplTree(this, visible); | 415 test_hooks_->DidSetVisibleOnImplTree(this, visible); |
416 } | 416 } |
417 | 417 |
418 void AnimateLayers(base::TimeTicks monotonic_time) override { | 418 void AnimateLayers(base::TimeTicks monotonic_time) override { |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
997 LayerTreeHost* LayerTreeTest::layer_tree_host() { | 997 LayerTreeHost* LayerTreeTest::layer_tree_host() { |
998 // We check for a null proxy here as we sometimes ask for the layer tree host | 998 // We check for a null proxy here as we sometimes ask for the layer tree host |
999 // when the proxy does not exist, often for checking settings after a test has | 999 // when the proxy does not exist, often for checking settings after a test has |
1000 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See | 1000 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See |
1001 // elsewhere in this file for other examples. | 1001 // elsewhere in this file for other examples. |
1002 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked()); | 1002 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked()); |
1003 return layer_tree_host_.get(); | 1003 return layer_tree_host_.get(); |
1004 } | 1004 } |
1005 | 1005 |
1006 } // namespace cc | 1006 } // namespace cc |
OLD | NEW |