| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 void ScheduledActionBeginOutputSurfaceCreation() override { | 113 void ScheduledActionBeginOutputSurfaceCreation() override { |
| 114 ThreadProxy::ScheduledActionBeginOutputSurfaceCreation(); | 114 ThreadProxy::ScheduledActionBeginOutputSurfaceCreation(); |
| 115 test_hooks_->ScheduledActionBeginOutputSurfaceCreation(); | 115 test_hooks_->ScheduledActionBeginOutputSurfaceCreation(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void ScheduledActionPrepareTiles() override { | 118 void ScheduledActionPrepareTiles() override { |
| 119 ThreadProxy::ScheduledActionPrepareTiles(); | 119 ThreadProxy::ScheduledActionPrepareTiles(); |
| 120 test_hooks_->ScheduledActionPrepareTiles(); | 120 test_hooks_->ScheduledActionPrepareTiles(); |
| 121 } | 121 } |
| 122 | 122 |
| 123 void ScheduledActionInvalidateOutputSurface() override { | |
| 124 ThreadProxy::ScheduledActionInvalidateOutputSurface(); | |
| 125 test_hooks_->ScheduledActionInvalidateOutputSurface(); | |
| 126 } | |
| 127 | |
| 128 ThreadProxyForTest( | 123 ThreadProxyForTest( |
| 129 TestHooks* test_hooks, | 124 TestHooks* test_hooks, |
| 130 LayerTreeHost* host, | 125 LayerTreeHost* host, |
| 131 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 126 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
| 132 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, | 127 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, |
| 133 scoped_ptr<BeginFrameSource> external_begin_frame_source) | 128 scoped_ptr<BeginFrameSource> external_begin_frame_source) |
| 134 : ThreadProxy(host, main_task_runner, | 129 : ThreadProxy(host, main_task_runner, |
| 135 impl_task_runner, | 130 impl_task_runner, |
| 136 external_begin_frame_source.Pass()), | 131 external_begin_frame_source.Pass()), |
| 137 test_hooks_(test_hooks) {} | 132 test_hooks_(test_hooks) {} |
| (...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 LayerTreeHost* LayerTreeTest::layer_tree_host() { | 890 LayerTreeHost* LayerTreeTest::layer_tree_host() { |
| 896 // We check for a null proxy here as we sometimes ask for the layer tree host | 891 // We check for a null proxy here as we sometimes ask for the layer tree host |
| 897 // when the proxy does not exist, often for checking settings after a test has | 892 // when the proxy does not exist, often for checking settings after a test has |
| 898 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See | 893 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See |
| 899 // elsewhere in this file for other examples. | 894 // elsewhere in this file for other examples. |
| 900 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked()); | 895 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked()); |
| 901 return layer_tree_host_.get(); | 896 return layer_tree_host_.get(); |
| 902 } | 897 } |
| 903 | 898 |
| 904 } // namespace cc | 899 } // namespace cc |
| OLD | NEW |