summaryrefslogtreecommitdiffstats
path: root/content/browser/gpu
diff options
context:
space:
mode:
authorjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-01 02:46:22 +0000
committerjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-01 02:46:22 +0000
commitebc0e1dfdf04993d73087a92d3584b82936e15d2 (patch)
tree6fe976dcaaef63c7bb285506206f41e88f405aad /content/browser/gpu
parent9ee0d98ec72e8ac96dd2d86de5b1746baa18bb50 (diff)
downloadchromium_src-ebc0e1dfdf04993d73087a92d3584b82936e15d2.zip
chromium_src-ebc0e1dfdf04993d73087a92d3584b82936e15d2.tar.gz
chromium_src-ebc0e1dfdf04993d73087a92d3584b82936e15d2.tar.bz2
Add a flag to allow renderer to use software compositor when GL compositor doesn't work.
The --enable-software-compositing flag will allow the renderer to use the software compositor if it can't create a GL context. This is currently accomplished by having the compositor request a "fallback" output surface if the normal output surface can't be initialized (on the impl thread). BUG=229712,230120 Review URL: https://chromiumcodereview.appspot.com/19267016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214930 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/gpu')
-rw-r--r--content/browser/gpu/gpu_data_manager_impl_private.cc12
-rw-r--r--content/browser/gpu/gpu_data_manager_impl_private.h2
2 files changed, 13 insertions, 1 deletions
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index 6f823d3..613fe63 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);
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
index b4b7805..eb226e8 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.h
+++ b/content/browser/gpu/gpu_data_manager_impl_private.h
@@ -244,6 +244,8 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
bool gpu_process_accessible_;
+ bool use_software_compositor_;
+
DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImplPrivate);
};