diff options
author | vangelis@chromium.org <vangelis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-02 19:51:40 +0000 |
---|---|---|
committer | vangelis@chromium.org <vangelis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-02 19:51:40 +0000 |
commit | 7929669df6b5809741393490f259c5249c951ea7 (patch) | |
tree | ada5c06384f16b3f19e9df5590764d6b2bbf6be7 /chrome | |
parent | ecb72800ed612c10991971bf6c2b7a64117c48a5 (diff) | |
download | chromium_src-7929669df6b5809741393490f259c5249c951ea7.zip chromium_src-7929669df6b5809741393490f259c5249c951ea7.tar.gz chromium_src-7929669df6b5809741393490f259c5249c951ea7.tar.bz2 |
Adding command line flag for enabling accelerated compositing.
This CL cannot be checked in until the patch for:
https://bugs.webkit.org/show_bug.cgi?id=39917
has landed.
BUG=45373
Review URL: http://codereview.chromium.org/2330004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48754 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/tab_contents/render_view_host_delegate_helper.cc | 2 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 3 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 | ||||
-rw-r--r-- | chrome/common/render_messages.h | 4 |
4 files changed, 9 insertions, 1 deletions
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 2d84d45..2d80f2aa 100644 --- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc +++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc @@ -240,6 +240,8 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs( command_line.HasSwitch(switches::kAllowFileAccessFromFiles); web_prefs.show_composited_layer_borders = command_line.HasSwitch(switches::kShowCompositedLayerBorders); + web_prefs.accelerated_compositing_enabled = + command_line.HasSwitch(switches::kEnableAcceleratedCompositing); // The user stylesheet watcher may not exist in a testing profile. if (profile->GetUserStyleSheetWatcher()) { web_prefs.user_style_sheet_enabled = true; diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index 42dc6fc..4690749 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -249,6 +249,9 @@ const char kDomAutomationController[] = "dom-automation"; // scripts. const char kDumpHistogramsOnExit[] = "dump-histograms-on-exit"; +// Enable gpu-accelerated compositing. +const char kEnableAcceleratedCompositing[] = "enable-accelerated-compositing"; + // Enables AeroPeek for each tab. (This switch only works on Windows 7). const char kEnableAeroPeekTabs[] = "enable-aero-peek-tabs"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index a68f61c..b4df9c9 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -86,6 +86,7 @@ extern const char kDnsLogDetails[]; extern const char kDnsPrefetchDisable[]; extern const char kDomAutomationController[]; extern const char kDumpHistogramsOnExit[]; +extern const char kEnableAcceleratedCompositing[]; extern const char kEnableAeroPeekTabs[]; extern const char kEnableApps[]; extern const char kEnableAuthNegotiatePort[]; diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 3a224e0..0f6419c 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -1660,6 +1660,7 @@ struct ParamTraits<WebPreferences> { WriteParam(m, p.allow_file_access_from_file_urls); WriteParam(m, p.experimental_webgl_enabled); WriteParam(m, p.show_composited_layer_borders); + WriteParam(m, p.accelerated_compositing_enabled); } static bool Read(const Message* m, void** iter, param_type* p) { return @@ -1702,7 +1703,8 @@ struct ParamTraits<WebPreferences> { ReadParam(m, iter, &p->allow_universal_access_from_file_urls) && ReadParam(m, iter, &p->allow_file_access_from_file_urls) && ReadParam(m, iter, &p->experimental_webgl_enabled) && - ReadParam(m, iter, &p->show_composited_layer_borders); + ReadParam(m, iter, &p->show_composited_layer_borders) && + ReadParam(m, iter, &p->accelerated_compositing_enabled); } static void Log(const param_type& p, std::wstring* l) { l->append(L"<WebPreferences>"); |