Chromium Code Reviews| Index: content/renderer/render_thread_impl.cc |
| diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
| index d6aa2743bc5c0e553da66e7b70ee3934740beb6f..e21440c55baa8ceff5d1d84530f6c4e142f536be 100644 |
| --- a/content/renderer/render_thread_impl.cc |
| +++ b/content/renderer/render_thread_impl.cc |
| @@ -173,8 +173,6 @@ const int64 kInitialIdleHandlerDelayMs = 1000; |
| const int64 kShortIdleHandlerDelayMs = 1000; |
| const int64 kLongIdleHandlerDelayMs = 30*1000; |
| const int kIdleCPUUsageThresholdInPercents = 3; |
| -const int kMinRasterThreads = 1; |
| -const int kMaxRasterThreads = 64; |
| // Maximum allocation size allowed for image scaling filters that |
| // require pre-scaling. Skia will fallback to a filter that doesn't |
| @@ -556,18 +554,14 @@ void RenderThreadImpl::Init() { |
| // it doesn't have to be the same thread RenderThreadImpl is created on. |
| allocate_gpu_memory_buffer_thread_checker_.DetachFromThread(); |
| - if (command_line.HasSwitch(switches::kNumRasterThreads)) { |
| + if (is_impl_side_painting_enabled_) { |
| int num_raster_threads; |
|
jamesr
2014/08/29 19:50:39
initialize this var, please. if the StringToInt ca
danakj
2014/08/29 19:53:31
Done.
|
| std::string string_value = |
| command_line.GetSwitchValueASCII(switches::kNumRasterThreads); |
| - if (base::StringToInt(string_value, &num_raster_threads) && |
| - num_raster_threads >= kMinRasterThreads && |
| - num_raster_threads <= kMaxRasterThreads) { |
| - cc::RasterWorkerPool::SetNumRasterThreads(num_raster_threads); |
| - } else { |
| - LOG(WARNING) << "Failed to parse switch " << |
| - switches::kNumRasterThreads << ": " << string_value; |
| - } |
| + bool ok = base::StringToInt(string_value, &num_raster_threads); |
| + DCHECK(ok) << string_value; |
|
jamesr
2014/08/29 19:50:38
if you give this var a better name the error messa
danakj
2014/08/29 19:53:31
Done.
|
| + DCHECK_GT(num_raster_threads, 0); |
| + cc::RasterWorkerPool::SetNumRasterThreads(num_raster_threads); |
| } |
| service_registry()->AddService<RenderFrameSetup>( |