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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 519923002: Make the number of raster threads appear in chrome://gpu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « content/browser/resources/gpu/info_view.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>(
« no previous file with comments | « content/browser/resources/gpu/info_view.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698