Commit 8546cb12 authored by jbauman's avatar jbauman Committed by Commit bot

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}
parent 335730ea
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment