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

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..1bccf0afb084778c7cbae861acc3851676644ef4 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);
« 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