Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1754)

Side by Side Diff: cc/test/layer_tree_test.cc

Issue 1449133002: TaskGraphRunner refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/test/task_graph_runner_test_template.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/test/task_graph_runner_test_template.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698