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

Unified Diff: chrome/browser/tab_contents/render_view_host_delegate_helper.cc

Issue 5334003: Added a master switch to enable/disable gpu acceleration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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: chrome/browser/tab_contents/render_view_host_delegate_helper.cc
===================================================================
--- chrome/browser/tab_contents/render_view_host_delegate_helper.cc (revision 67133)
+++ chrome/browser/tab_contents/render_view_host_delegate_helper.cc (working copy)
@@ -188,6 +188,8 @@
}
}
+bool RenderViewHostDelegateHelper::gpu_enabled_ = true;
+
// static
WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
Profile* profile, bool is_dom_ui) {
@@ -271,6 +273,7 @@
web_prefs.databases_enabled =
!command_line.HasSwitch(switches::kDisableDatabases);
web_prefs.experimental_webgl_enabled =
+ gpu_enabled() &&
!command_line.HasSwitch(switches::kDisableExperimentalWebGL);
web_prefs.site_specific_quirks_enabled =
!command_line.HasSwitch(switches::kDisableSiteSpecificQuirks);
@@ -279,8 +282,10 @@
web_prefs.show_composited_layer_borders =
command_line.HasSwitch(switches::kShowCompositedLayerBorders);
web_prefs.accelerated_compositing_enabled =
+ gpu_enabled() &&
!command_line.HasSwitch(switches::kDisableAcceleratedCompositing);
web_prefs.accelerated_2d_canvas_enabled =
+ gpu_enabled() &&
command_line.HasSwitch(switches::kEnableAccelerated2dCanvas);
web_prefs.memory_info_enabled =
command_line.HasSwitch(switches::kEnableMemoryInfo);

Powered by Google App Engine
This is Rietveld 408576698