Commit 67c3b8b0 authored by weiliangc's avatar weiliangc Committed by Commit bot

Avoid repeat call to set number of worker threads in Single Process

In single process mode with impl-side-painting, browser and renderer
would both try to set number of raster worker threads, which causes
DCHECK. This CL makes sure there won't be duplicate call to set number
of worker threads in single process mode.

R=enne
BUG=314185

Review URL: https://codereview.chromium.org/971943002

Cr-Commit-Position: refs/heads/master@{#318995}
parent 70b91498
...@@ -661,7 +661,12 @@ void RenderThreadImpl::Init() { ...@@ -661,7 +661,12 @@ void RenderThreadImpl::Init() {
// threads in GPU raster mode. // threads in GPU raster mode.
if (is_threaded_gpu_rasterization_enabled_) if (is_threaded_gpu_rasterization_enabled_)
num_raster_threads = 1; num_raster_threads = 1;
cc::TileTaskWorkerPool::SetNumWorkerThreads(num_raster_threads);
// In single process, browser compositor already initialized and set up
// worker threads, can't change the number later for the renderer compistor
// in the same process.
if (!command_line.HasSwitch(switches::kSingleProcess))
cc::TileTaskWorkerPool::SetNumWorkerThreads(num_raster_threads);
#if defined(OS_ANDROID) || defined(OS_LINUX) #if defined(OS_ANDROID) || defined(OS_LINUX)
if (!command_line.HasSwitch( if (!command_line.HasSwitch(
......
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