Index: content/browser/gpu/compositor_util.cc |
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc |
index 09018f7e4eb59a239ab9c775d858cabf77e88667..bf4b4723a66d9048b8c2b6f7bae63c5f36f69181 100644 |
--- a/content/browser/gpu/compositor_util.cc |
+++ b/content/browser/gpu/compositor_util.cc |
@@ -35,11 +35,12 @@ static bool IsGpuRasterizationBlacklisted() { |
const char kGpuCompositingFeatureName[] = "gpu_compositing"; |
const char kWebGLFeatureName[] = "webgl"; |
const char kRasterizationFeatureName[] = "rasterization"; |
-const char kMultipleRasterThreadsFeatureName[] = "multiple_raster_threads"; |
+const char kMultipleCategorizedWorkerThreadsFeatureName[] = |
+ "multiple_categorized_worker_threads"; |
const char kNativeGpuMemoryBuffersFeatureName[] = "native_gpu_memory_buffers"; |
-const int kMinRasterThreads = 1; |
-const int kMaxRasterThreads = 4; |
+const int kMinCategorizedWorkerThreads = 1; |
+const int kMaxCategorizedWorkerThreads = 4; |
const int kMinMSAASampleCount = 0; |
@@ -126,9 +127,9 @@ const GpuFeatureInfo GetGpuFeatureInfo(size_t index, bool* eof) { |
"Accelerated rasterization has been disabled, either via blacklist," |
" about:flags or the command line.", |
true}, |
- {kMultipleRasterThreadsFeatureName, false, |
- NumberOfRendererRasterThreads() == 1, "Raster is using a single thread.", |
- false}, |
+ {kMultipleCategorizedWorkerThreadsFeatureName, false, |
+ NumberOfRendererCategorizedWorkerThreads() == 1, |
+ "Categorized worker pool is using a single thread.", false}, |
{kNativeGpuMemoryBuffersFeatureName, false, |
!BrowserGpuMemoryBufferManager::IsNativeGpuMemoryBuffersEnabled(), |
"Native GpuMemoryBuffers have been disabled, either via about:flags" |
@@ -142,38 +143,41 @@ const GpuFeatureInfo GetGpuFeatureInfo(size_t index, bool* eof) { |
} // namespace |
-int NumberOfRendererRasterThreads() { |
+int NumberOfRendererCategorizedWorkerThreads() { |
int num_processors = base::SysInfo::NumberOfProcessors(); |
#if defined(OS_ANDROID) |
// Android may report 6 to 8 CPUs for big.LITTLE configurations. |
- // Limit the number of raster threads based on maximum of 4 big cores. |
+ // Limit the number of categorized worker threads based on maximum of 4 big |
+ // cores. |
num_processors = std::min(num_processors, 4); |
#endif |
- int num_raster_threads = num_processors / 2; |
+ int num_categorized_worker_threads = num_processors / 2; |
#if defined(OS_ANDROID) |
- // Limit the number of raster threads to 1 on Android. |
- // TODO(reveman): Remove this when we have a better mechanims to prevent |
+ // Limit the number of categorized worker threads to 1 on Android. |
+ // TODO(reveman): Remove this when we have a better mechanism to prevent |
// pre-paint raster work from slowing down non-raster work. crbug.com/504515 |
- num_raster_threads = 1; |
+ num_categorized_worker_threads = 1; |
#endif |
const base::CommandLine& command_line = |
*base::CommandLine::ForCurrentProcess(); |
- if (command_line.HasSwitch(switches::kNumRasterThreads)) { |
+ if (command_line.HasSwitch(switches::kNumCategorizedWorkerThreads)) { |
std::string string_value = command_line.GetSwitchValueASCII( |
- switches::kNumRasterThreads); |
- if (!base::StringToInt(string_value, &num_raster_threads)) { |
- DLOG(WARNING) << "Failed to parse switch " << |
- switches::kNumRasterThreads << ": " << string_value; |
+ switches::kNumCategorizedWorkerThreads); |
+ if (!base::StringToInt(string_value, &num_categorized_worker_threads)) { |
+ DLOG(WARNING) << "Failed to parse switch " |
+ << switches::kNumCategorizedWorkerThreads << ": " |
+ << string_value; |
} |
} |
- return cc::MathUtil::ClampToRange(num_raster_threads, kMinRasterThreads, |
- kMaxRasterThreads); |
+ return cc::MathUtil::ClampToRange(num_categorized_worker_threads, |
+ kMinCategorizedWorkerThreads, |
+ kMaxCategorizedWorkerThreads); |
} |
bool IsZeroCopyUploadEnabled() { |
@@ -333,13 +337,14 @@ base::DictionaryValue* GetFeatureStatus() { |
if (IsForceGpuRasterizationEnabled()) |
status += "_force"; |
} |
- if (gpu_feature_info.name == kMultipleRasterThreadsFeatureName) { |
+ if (gpu_feature_info.name == |
+ kMultipleCategorizedWorkerThreadsFeatureName) { |
const base::CommandLine& command_line = |
*base::CommandLine::ForCurrentProcess(); |
- if (command_line.HasSwitch(switches::kNumRasterThreads)) |
+ if (command_line.HasSwitch(switches::kNumCategorizedWorkerThreads)) |
status += "_force"; |
} |
- if (gpu_feature_info.name == kMultipleRasterThreadsFeatureName) |
+ if (gpu_feature_info.name == kMultipleCategorizedWorkerThreadsFeatureName) |
status += "_on"; |
} |
if (gpu_feature_info.name == kWebGLFeatureName && |