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 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 // Source frames start at 0, so this is invalid. | 1143 // Source frames start at 0, so this is invalid. |
1144 return -1; | 1144 return -1; |
1145 } | 1145 } |
1146 | 1146 |
1147 void LayerTreeTest::DestroyLayerTreeHost() { | 1147 void LayerTreeTest::DestroyLayerTreeHost() { |
1148 if (layer_tree_host_ && layer_tree_host_->root_layer()) | 1148 if (layer_tree_host_ && layer_tree_host_->root_layer()) |
1149 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); | 1149 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); |
1150 layer_tree_host_ = nullptr; | 1150 layer_tree_host_ = nullptr; |
1151 } | 1151 } |
1152 | 1152 |
| 1153 TaskGraphRunner* LayerTreeTest::task_graph_runner() const { |
| 1154 return task_graph_runner_.get(); |
| 1155 } |
| 1156 |
1153 LayerTreeHost* LayerTreeTest::layer_tree_host() { | 1157 LayerTreeHost* LayerTreeTest::layer_tree_host() { |
1154 // We check for a null task_runner_provider here as we sometimes ask for the | 1158 // We check for a null task_runner_provider here as we sometimes ask for the |
1155 // layer tree host when the task_runner_provider does not exist, often for | 1159 // layer tree host when the task_runner_provider does not exist, often for |
1156 // checking settings after a test has completed. For example, | 1160 // checking settings after a test has completed. For example, |
1157 // LTHPixelResourceTest::RunPixelResourceTest. See elsewhere in this file for | 1161 // LTHPixelResourceTest::RunPixelResourceTest. See elsewhere in this file for |
1158 // other examples. | 1162 // other examples. |
1159 DCHECK(!task_runner_provider() || task_runner_provider()->IsMainThread() || | 1163 DCHECK(!task_runner_provider() || task_runner_provider()->IsMainThread() || |
1160 task_runner_provider()->IsMainThreadBlocked()); | 1164 task_runner_provider()->IsMainThreadBlocked()); |
1161 return layer_tree_host_.get(); | 1165 return layer_tree_host_.get(); |
1162 } | 1166 } |
1163 | 1167 |
1164 } // namespace cc | 1168 } // namespace cc |
OLD | NEW |