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

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

Issue 895763002: Add a command-line flag to enable threaded GPU rasterization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
Index: content/browser/gpu/compositor_util.cc
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc
index 0f01ec83812eb7d368c5fb6af2011e5570ea2dd9..986143601b9da16b6b40904b03d3bbaf911e1399 100644
--- a/content/browser/gpu/compositor_util.cc
+++ b/content/browser/gpu/compositor_util.cc
@@ -292,6 +292,21 @@ bool IsForceGpuRasterizationEnabled() {
return command_line.HasSwitch(switches::kForceGpuRasterization);
}
+bool IsThreadedGpuRasterizationEnabled() {
+ if (!IsImplSidePaintingEnabled())
+ return false;
+
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
+
+ if (command_line.HasSwitch(switches::kDisableThreadedGpuRasterization))
+ return false;
+ else if (command_line.HasSwitch(switches::kEnableThreadedGpuRasterization))
danakj 2015/02/02 21:48:38 dont need else after a return
vmiura 2015/02/02 22:03:22 Done.
+ return true;
+
+ return false;
+}
+
bool UseSurfacesEnabled() {
#if defined(OS_ANDROID)
return false;

Powered by Google App Engine
This is Rietveld 408576698