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

Unified Diff: content/browser/gpu/compositor_util.cc

Issue 1168153004: Limit number of raster threads on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/compositor_util.cc
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc
index 2e46bdab05bce8b521f79150a1e0140e100400aa..635944fba1422c0de5b4a8f7b6fd4f702ab661f6 100644
--- a/content/browser/gpu/compositor_util.cc
+++ b/content/browser/gpu/compositor_util.cc
@@ -198,7 +198,15 @@ bool IsImplSidePaintingEnabled() {
}
int NumberOfRendererRasterThreads() {
- int num_raster_threads = base::SysInfo::NumberOfProcessors() / 2;
+ 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.
+ num_processors = std::min(num_processors, 4);
+#endif
+
+ int num_raster_threads = num_processors / 2;
// Async uploads is used when neither zero-copy nor one-copy is enabled and
// it uses its own thread, so reduce the number of raster threads when async
no sievers 2015/06/09 18:26:30 So what about this stuff? It sounds like it's talk
reveman 2015/06/09 19:28:13 Not needed in that case but it's hard to know that
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698