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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 1036693002: cc: Fix crash while running blink layout tests with GPU rasterization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +test Created 5 years, 9 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
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 2c13fcbc861f58e298a6a9c073f3eca33c4574f4..44c9eed72623ad3b938646b6f150dc602ca4019f 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2035,12 +2035,21 @@ 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);
*tile_task_worker_pool = GpuTileTaskWorkerPool::Create(
- task_runner, task_graph_runner_,
+ task_runner, task_graph_runner,
static_cast<GpuRasterizer*>(rasterizer_.get()));
return;
}
@@ -2058,15 +2067,6 @@ void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool(
*resource_pool =
ResourcePool::Create(resource_provider_.get(), image_target);
- TaskGraphRunner* 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();
- } else {
- task_graph_runner = task_graph_runner_;
- }
-
*tile_task_worker_pool = ZeroCopyTileTaskWorkerPool::Create(
task_runner, task_graph_runner, resource_provider_.get());
return;
@@ -2080,7 +2080,7 @@ void LayerTreeHostImpl::CreateResourceAndTileTaskWorkerPool(
ResourcePool::Create(resource_provider_.get(), GL_TEXTURE_2D);
*tile_task_worker_pool = OneCopyTileTaskWorkerPool::Create(
- task_runner, task_graph_runner_, context_provider,
+ task_runner, task_graph_runner, context_provider,
resource_provider_.get(), staging_resource_pool_.get());
return;
}
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_pixeltest_synchronous.cc » ('j') | cc/trees/layer_tree_host_pixeltest_synchronous.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698