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

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

Issue 19267016: Add a flag to allow renderer to use software compositor when GL compositor doesn't work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/gpu_data_manager_impl_private.cc
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index 6f823d32934a8ee71569fe0a37b5086aff5ff662..613fe63b96cab4fd2bfaa5d7ba801d72d3e0ba2e 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -812,6 +812,13 @@ void GpuDataManagerImplPrivate::UpdateRendererWebPrefs(
prefs->accelerated_compositing_for_3d_transforms_enabled = false;
prefs->accelerated_compositing_for_plugins_enabled = false;
}
+
+ if (use_software_compositor_) {
+ prefs->force_compositing_mode = true;
+ prefs->accelerated_compositing_enabled = true;
+ prefs->accelerated_compositing_for_3d_transforms_enabled = true;
+ prefs->accelerated_compositing_for_plugins_enabled = true;
+ }
}
gpu::GpuSwitchingOption
@@ -964,7 +971,8 @@ GpuDataManagerImplPrivate::GpuDataManagerImplPrivate(
domain_blocking_enabled_(true),
owner_(owner),
display_count_(0),
- gpu_process_accessible_(true) {
+ gpu_process_accessible_(true),
+ use_software_compositor_(false) {
DCHECK(owner_);
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kDisableAcceleratedCompositing)) {
@@ -973,6 +981,8 @@ GpuDataManagerImplPrivate::GpuDataManagerImplPrivate(
}
if (command_line->HasSwitch(switches::kDisableGpu))
DisableHardwareAcceleration();
+ if (command_line->HasSwitch(switches::kEnableSoftwareCompositing))
+ use_software_compositor_ = true;
if (command_line->HasSwitch(switches::kGpuSwitching)) {
std::string option_string = command_line->GetSwitchValueASCII(
switches::kGpuSwitching);
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.h ('k') | content/browser/renderer_host/compositor_impl_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698