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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 1135943006: Create single thread synchronous task graph runner when necessary with gpu disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 0bf40594b49d519a242d450b1859190577331892..cccf917c5527213207072b770165f42b773f7bc3 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2038,6 +2038,15 @@ void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool(
: proxy_->MainThreadTaskRunner();
DCHECK(task_runner);
+ // Pass the single-threaded synchronous task graph runner to the worker pool
+ // if we're in synchronous single-threaded mode.
+ TaskGraphRunner* task_graph_runner = task_graph_runner_;
+ if (IsSynchronousSingleThreaded()) {
+ DCHECK(!single_thread_synchronous_task_graph_runner_);
+ single_thread_synchronous_task_graph_runner_.reset(new TaskGraphRunner);
+ task_graph_runner = single_thread_synchronous_task_graph_runner_.get();
+ }
+
ContextProvider* context_provider = output_surface_->context_provider();
if (!context_provider) {
*resource_pool =
@@ -2048,15 +2057,6 @@ void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool(
return;
}
- // Pass the single-threaded synchronous task graph runner to the worker pool
- // if we're in synchronous single-threaded mode.
- TaskGraphRunner* task_graph_runner = task_graph_runner_;
- if (IsSynchronousSingleThreaded()) {
- DCHECK(!single_thread_synchronous_task_graph_runner_);
- single_thread_synchronous_task_graph_runner_.reset(new TaskGraphRunner);
- task_graph_runner = single_thread_synchronous_task_graph_runner_.get();
- }
-
if (use_gpu_rasterization_) {
*resource_pool =
ResourcePool::Create(resource_provider_.get(), GL_TEXTURE_2D);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698