summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorvangelis@chromium.org <vangelis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-24 04:37:41 +0000
committervangelis@chromium.org <vangelis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-24 04:37:41 +0000
commit9115d5f9caf0b7269610bfb1f9c76ec4ae5c3bd3 (patch)
tree0d777a9eaa91cda803b7faaab9270825cff4b4d0 /content
parent9d9a691086865e10ce776d8a3fc5c341dd628a44 (diff)
downloadchromium_src-9115d5f9caf0b7269610bfb1f9c76ec4ae5c3bd3.zip
chromium_src-9115d5f9caf0b7269610bfb1f9c76ec4ae5c3bd3.tar.gz
chromium_src-9115d5f9caf0b7269610bfb1f9c76ec4ae5c3bd3.tar.bz2
Re-enables accelerated compositing for background extensions. Background extensions only attempt to create a GL context if needed (e.g. they create a visible view) so this change has no effect on extensions without visible presence.
Tested by: 1. Adding a few extensions without visible presence to my profile 2. Tracing startup to make sure that no GL contexts are created 3. Verified that the GPU process size does not change when enabling / disabling the extensions BUG=222567 Review URL: https://chromiumcodereview.appspot.com/12973006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190192 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/renderer/render_view_impl.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index db3b307..2154257 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1935,10 +1935,24 @@ WebView* RenderViewImpl::createView(
WebUserGestureIndicator::consumeUserGesture();
+ webkit_glue::WebPreferences transferred_preferences = webkit_preferences_;
+
+ // Unless accelerated compositing has been explicitly disabled from the
+ // command line (e.g. via the blacklist or about:flags) re-enable it for
+ // new views that get spawned by this view. This gets around the issue that
+ // background extension pages disable accelerated compositing via web prefs
+ // but can themselves spawn a visible render view which should be allowed
+ // use gpu acceleration.
+ if (!webkit_preferences_.accelerated_compositing_enabled) {
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ if (!command_line.HasSwitch(switches::kDisableAcceleratedCompositing))
+ transferred_preferences.accelerated_compositing_enabled = true;
+ }
+
RenderViewImpl* view = RenderViewImpl::Create(
routing_id_,
renderer_preferences_,
- webkit_preferences_,
+ transferred_preferences,
shared_popup_counter_,
routing_id,
surface_id,