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); |