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

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

Issue 126993002: Switch from CommandLine switch to WebPreferences to control Pepper 3D. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix a bug jamesr pointed out Created 6 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d7424120a5cd3a93cf390130413924ee22ea6f35..38fa23bb28f18edd780329a54b80cb944d947f5a 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -621,10 +621,6 @@ void GpuDataManagerImplPrivate::AppendRendererCommandLine(
CommandLine* command_line) const {
DCHECK(command_line);
- if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL)) {
- if (!command_line->HasSwitch(switches::kDisablePepper3d))
- command_line->AppendSwitch(switches::kDisablePepper3d);
- }
if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING) &&
!command_line->HasSwitch(switches::kDisableAcceleratedCompositing))
command_line->AppendSwitch(switches::kDisableAcceleratedCompositing);
@@ -642,10 +638,8 @@ void GpuDataManagerImplPrivate::AppendRendererCommandLine(
command_line->AppendSwitch(switches::kEnableSoftwareCompositing);
#if defined(USE_AURA)
- if (!CanUseGpuBrowserCompositor()) {
+ if (!CanUseGpuBrowserCompositor())
command_line->AppendSwitch(switches::kDisableGpuCompositing);
- command_line->AppendSwitch(switches::kDisablePepper3d);
- }
#endif
}
@@ -747,8 +741,10 @@ void GpuDataManagerImplPrivate::UpdateRendererWebPrefs(
if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING))
prefs->accelerated_compositing_enabled = false;
- if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL))
+ if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL)) {
prefs->experimental_webgl_enabled = false;
+ prefs->pepper_3d_enabled = false;
+ }
if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_FLASH3D))
prefs->flash_3d_enabled = false;
if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_FLASH_STAGE3D)) {
@@ -771,12 +767,13 @@ void GpuDataManagerImplPrivate::UpdateRendererWebPrefs(
prefs->accelerated_compositing_for_video_enabled = false;
// Accelerated video and animation are slower than regular when using
- // SwiftShader. 3D CSS may also be too slow to be worthwhile.
+ // SwiftShader. 3D CSS or Pepper 3D may also be too slow to be worthwhile.
if (ShouldUseSwiftShader()) {
prefs->accelerated_compositing_for_video_enabled = false;
prefs->accelerated_compositing_for_animation_enabled = false;
prefs->accelerated_compositing_for_3d_transforms_enabled = false;
prefs->accelerated_compositing_for_plugins_enabled = false;
+ prefs->pepper_3d_enabled = false;
}
if (use_software_compositor_) {
@@ -788,8 +785,10 @@ void GpuDataManagerImplPrivate::UpdateRendererWebPrefs(
}
#if defined(USE_AURA)
- if (!CanUseGpuBrowserCompositor())
+ if (!CanUseGpuBrowserCompositor()) {
prefs->accelerated_2d_canvas_enabled = false;
+ prefs->pepper_3d_enabled = false;
+ }
#endif
}
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698