summaryrefslogtreecommitdiffstats
path: root/cc/trees
diff options
context:
space:
mode:
authorjbauman <jbauman@chromium.org>2015-05-14 15:38:54 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-14 22:40:01 +0000
commit8546cb1249babdd05de341cc30a95bec99253f2c (patch)
treebb50349a39f1a8f2bf859fe2c1933cdb6ad754e8 /cc/trees
parent335730eaff11508dcf50445ec9db2812a2a31360 (diff)
downloadchromium_src-8546cb1249babdd05de341cc30a95bec99253f2c.zip
chromium_src-8546cb1249babdd05de341cc30a95bec99253f2c.tar.gz
chromium_src-8546cb1249babdd05de341cc30a95bec99253f2c.tar.bz2
Create single thread synchronous task graph runner when necessary with gpu disabled.
This prevents layout tests from crashing with --disable-gpu Review URL: https://codereview.chromium.org/1135943006 Cr-Commit-Position: refs/heads/master@{#329960}
Diffstat (limited to 'cc/trees')
-rw-r--r--cc/trees/layer_tree_host_impl.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 126fd09..6125337 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2038,16 +2038,6 @@ void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool(
: proxy_->MainThreadTaskRunner();
DCHECK(task_runner);
- ContextProvider* context_provider = output_surface_->context_provider();
- if (!context_provider) {
- *resource_pool =
- ResourcePool::Create(resource_provider_.get(), GL_TEXTURE_2D);
-
- *tile_task_worker_pool = BitmapTileTaskWorkerPool::Create(
- task_runner, task_graph_runner_, resource_provider_.get());
- 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_;
@@ -2057,6 +2047,16 @@ void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool(
task_graph_runner = single_thread_synchronous_task_graph_runner_.get();
}
+ ContextProvider* context_provider = output_surface_->context_provider();
+ if (!context_provider) {
+ *resource_pool =
+ ResourcePool::Create(resource_provider_.get(), GL_TEXTURE_2D);
+
+ *tile_task_worker_pool = BitmapTileTaskWorkerPool::Create(
+ task_runner, task_graph_runner, resource_provider_.get());
+ return;
+ }
+
if (use_gpu_rasterization_) {
*resource_pool =
ResourcePool::Create(resource_provider_.get(), GL_TEXTURE_2D);