From 5d6fe75abc0414d83319ce7668d7245b05e424b5 Mon Sep 17 00:00:00 2001 From: "piman@google.com" Date: Mon, 10 Jan 2011 23:48:02 +0000 Subject: Add --enable-accelerated-plugins flag to enable compositing for plugins, separately from the rest. The PPAPI 3D implementation requires accelerated compositing to be on. For both NaCl and Pepper Flash, we want to be able to enable compositing for plugins, without forcing it on for everything else. BUG=None TEST=with pepper flash Review URL: http://codereview.chromium.org/6190005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70964 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/tab_contents/render_view_host_delegate_helper.cc | 2 ++ chrome/common/chrome_switches.cc | 3 +++ chrome/common/chrome_switches.h | 1 + chrome/common/render_messages.cc | 2 ++ 4 files changed, 8 insertions(+) (limited to 'chrome') diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc index 568ae4cf..84f684d 100644 --- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc +++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc @@ -291,6 +291,8 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs( command_line.HasSwitch(switches::kEnableAccelerated2dCanvas); web_prefs.accelerated_layers_enabled = command_line.HasSwitch(switches::kEnableAcceleratedLayers); + web_prefs.accelerated_plugins_enabled = + command_line.HasSwitch(switches::kEnableAcceleratedPlugins); web_prefs.accelerated_video_enabled = !command_line.HasSwitch(switches::kDisableAcceleratedVideo); web_prefs.memory_info_enabled = diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index c69408e..3f55ee9 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -412,6 +412,9 @@ const char kEnableAccelerated2dCanvas[] = "enable-accelerated-2d-canvas"; // Enables the hardware acceleration of 3D CSS and animation. const char kEnableAcceleratedLayers[] = "enable-accelerated-layers"; +// Enables the hardware acceleration of plugins. +const char kEnableAcceleratedPlugins[] = "enable-accelerated-plugins"; + // Enables WebKit accessibility within the renderer process. const char kEnableAccessibility[] = "enable-accessibility"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 3e5e853..2b23e3e 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -124,6 +124,7 @@ extern const char kDomAutomationController[]; extern const char kDumpHistogramsOnExit[]; extern const char kEnableAccelerated2dCanvas[]; extern const char kEnableAcceleratedLayers[]; +extern const char kEnableAcceleratedPlugins[]; extern const char kEnableAccessibility[]; extern const char kEnableAeroPeekTabs[]; extern const char kEnableAuthNegotiatePort[]; diff --git a/chrome/common/render_messages.cc b/chrome/common/render_messages.cc index 69b73be..8a1f0d8 100644 --- a/chrome/common/render_messages.cc +++ b/chrome/common/render_messages.cc @@ -728,6 +728,7 @@ void ParamTraits::Write(Message* m, const param_type& p) { WriteParam(m, p.show_composited_layer_borders); WriteParam(m, p.accelerated_compositing_enabled); WriteParam(m, p.accelerated_2d_canvas_enabled); + WriteParam(m, p.accelerated_plugins_enabled); WriteParam(m, p.accelerated_layers_enabled); WriteParam(m, p.accelerated_video_enabled); WriteParam(m, p.memory_info_enabled); @@ -780,6 +781,7 @@ bool ParamTraits::Read(const Message* m, void** iter, ReadParam(m, iter, &p->show_composited_layer_borders) && ReadParam(m, iter, &p->accelerated_compositing_enabled) && ReadParam(m, iter, &p->accelerated_2d_canvas_enabled) && + ReadParam(m, iter, &p->accelerated_plugins_enabled) && ReadParam(m, iter, &p->accelerated_layers_enabled) && ReadParam(m, iter, &p->accelerated_video_enabled) && ReadParam(m, iter, &p->memory_info_enabled); -- cgit v1.1