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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 1576133002: Add category handling to RasterWorkerPool (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hihi
Patch Set: Created 4 years, 11 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: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index db1591c407bfda3a28758117657834259d1a42cc..602cbcb511a12fb769b03f775b6461d4c9fb04df 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -802,6 +802,9 @@ void RenderThreadImpl::Init() {
// avoid it for now to reduce the cost of recording.
are_image_decode_tasks_enabled_ = num_raster_threads > 1;
+ bool use_single_thread_for_background_raster_tasks = command_line.HasSwitch(
+ switches::kUseSingleThreadForBackgroundRasterTasks);
+
base::SimpleThread::Options thread_options;
#if defined(OS_ANDROID) || defined(OS_LINUX)
if (!command_line.HasSwitch(
@@ -810,7 +813,9 @@ void RenderThreadImpl::Init() {
}
#endif
- raster_worker_pool_->Start(num_raster_threads, thread_options);
+ raster_worker_pool_->Start(num_raster_threads,
+ use_single_thread_for_background_raster_tasks,
+ thread_options);
// TODO(boliu): In single process, browser main loop should set up the
// discardable memory manager, and should skip this if kSingleProcess.
« content/renderer/raster_worker_pool.cc ('K') | « content/renderer/raster_worker_pool_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698