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

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: Addressed comments. 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..9606eb56756506d28b3b9df1bf77fabe5f3cd933 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;
+ if (command_line.HasSwitch(switches::kEnableThreadedGpuRasterization))
+ return true;
+
+ return false;
+}
+
bool UseSurfacesEnabled() {
#if defined(OS_ANDROID)
return false;

Powered by Google App Engine
This is Rietveld 408576698