| 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 "cc/animation/animation.h" | 8 #include "cc/animation/animation.h" |
| 9 #include "cc/animation/animation_registrar.h" | 9 #include "cc/animation/animation_registrar.h" |
| 10 #include "cc/animation/layer_animation_controller.h" | 10 #include "cc/animation/layer_animation_controller.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 void ScheduledActionBeginOutputSurfaceCreation() override { | 112 void ScheduledActionBeginOutputSurfaceCreation() override { |
| 113 ThreadProxy::ScheduledActionBeginOutputSurfaceCreation(); | 113 ThreadProxy::ScheduledActionBeginOutputSurfaceCreation(); |
| 114 test_hooks_->ScheduledActionBeginOutputSurfaceCreation(); | 114 test_hooks_->ScheduledActionBeginOutputSurfaceCreation(); |
| 115 } | 115 } |
| 116 | 116 |
| 117 void ScheduledActionPrepareTiles() override { | 117 void ScheduledActionPrepareTiles() override { |
| 118 ThreadProxy::ScheduledActionPrepareTiles(); | 118 ThreadProxy::ScheduledActionPrepareTiles(); |
| 119 test_hooks_->ScheduledActionPrepareTiles(); | 119 test_hooks_->ScheduledActionPrepareTiles(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 void ScheduledActionInvalidateOutputSurface() override { |
| 123 ThreadProxy::ScheduledActionInvalidateOutputSurface(); |
| 124 test_hooks_->ScheduledActionInvalidateOutputSurface(); |
| 125 } |
| 126 |
| 122 ThreadProxyForTest( | 127 ThreadProxyForTest( |
| 123 TestHooks* test_hooks, | 128 TestHooks* test_hooks, |
| 124 LayerTreeHost* host, | 129 LayerTreeHost* host, |
| 125 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 130 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
| 126 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, | 131 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, |
| 127 scoped_ptr<BeginFrameSource> external_begin_frame_source) | 132 scoped_ptr<BeginFrameSource> external_begin_frame_source) |
| 128 : ThreadProxy(host, main_task_runner, | 133 : ThreadProxy(host, main_task_runner, |
| 129 impl_task_runner, | 134 impl_task_runner, |
| 130 external_begin_frame_source.Pass()), | 135 external_begin_frame_source.Pass()), |
| 131 test_hooks_(test_hooks) {} | 136 test_hooks_(test_hooks) {} |
| (...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 LayerTreeHost* LayerTreeTest::layer_tree_host() { | 886 LayerTreeHost* LayerTreeTest::layer_tree_host() { |
| 882 // We check for a null proxy here as we sometimes ask for the layer tree host | 887 // We check for a null proxy here as we sometimes ask for the layer tree host |
| 883 // when the proxy does not exist, often for checking settings after a test has | 888 // when the proxy does not exist, often for checking settings after a test has |
| 884 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See | 889 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See |
| 885 // elsewhere in this file for other examples. | 890 // elsewhere in this file for other examples. |
| 886 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked()); | 891 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked()); |
| 887 return layer_tree_host_.get(); | 892 return layer_tree_host_.get(); |
| 888 } | 893 } |
| 889 | 894 |
| 890 } // namespace cc | 895 } // namespace cc |
| OLD | NEW |