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

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

Issue 189883009: Define a --force-gpu-rasterization flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 49e938a50e9da71609613be4245cf653bffe7918..fa95b1711a5c24c7bf8a3141a8d00b2d06acef35 100644
--- a/content/browser/gpu/compositor_util.cc
+++ b/content/browser/gpu/compositor_util.cc
@@ -269,6 +269,21 @@ bool IsDelegatedRendererEnabled() {
return enabled;
}
+bool IsImplSidePaintingEnabled() {
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+
+ if (command_line.HasSwitch(switches::kDisableImplSidePainting))
+ return false;
+ else if (command_line.HasSwitch(switches::kEnableImplSidePainting))
+ return true;
+
+#if defined(OS_ANDROID)
+ return true;
+#else
+ return false;
+#endif
+}
+
base::Value* GetFeatureStatus() {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance();
@@ -291,7 +306,7 @@ base::Value* GetFeatureStatus() {
if (gpu_feature_info.name == "css_animation") {
status += "_software_animated";
} else if (gpu_feature_info.name == "raster") {
- if (cc::switches::IsImplSidePaintingEnabled())
+ if (IsImplSidePaintingEnabled())
status += "_software_multithreaded";
else
status += "_software";
@@ -333,10 +348,8 @@ base::Value* GetFeatureStatus() {
}
}
// TODO(reveman): Remove this when crbug.com/223286 has been fixed.
- if (gpu_feature_info.name == "raster" &&
- cc::switches::IsImplSidePaintingEnabled()) {
+ if (gpu_feature_info.name == "raster" && IsImplSidePaintingEnabled())
status = "disabled_software_multithreaded";
- }
feature_status_dict->SetString(
gpu_feature_info.name.c_str(), status.c_str());
}

Powered by Google App Engine
This is Rietveld 408576698