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

Issue 233093006: Stop disabling force_compositing_mode for background RenderViews. (Closed)

Created:
6 years, 8 months ago by danakj
Modified:
6 years, 8 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, chromium-apps-reviews_chromium.org, enne (OOO), jamesr
Visibility:
Public.

Description

Stop disabling force_compositing_mode for background RenderViews. When a RenderView's WebContents are a VIEW_TYPE_BACKGROUND_CONTENTS or a VIEW_TYPE_EXTENSION_BACKGROUND_PAGE, the RenderView is in the background and never visible. Currently we disable force_compositing_mode to prevent allocating a GPU context for the view. Since force_compositing_mode is the standard and we are deleting other code paths, we should stop trying to disable the setting. Instead, add a new parameter to the ViewMsg_New IPC for |background|, and for a RenderView that |is_background|, when the RenderWidget makes an OutputSurface for the compositor, it creates a new NullOutputSurface which declares itself as a delegated compositor without a GPU context. This puts the compositor into a similar state to software compositing, but since the renderer never presents frames, the OutputSurface provides no way of getting frames to the browser process. R=jam@chromium.org, piman@chromium.org BUG=362165 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=264075

Patch Set 1 #

Patch Set 2 : background: test #

Total comments: 4

Patch Set 3 : background: test2 #

Patch Set 4 : background: #

Patch Set 5 : background: typo #

Patch Set 6 : background: WebContentsDelegate #

Total comments: 8

Patch Set 7 : background: rebase #

Patch Set 8 : jamreview #

Patch Set 9 : background: rebase #

Patch Set 10 : tests #

Patch Set 11 : background: testsbetter #

Patch Set 12 : background: not hidden #

Patch Set 13 : background: codemoved #

Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -51 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/extensions/extension_webkit_preferences.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/browser/extensions/gpu_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -10 lines 0 comments Download
M chrome/browser/tab_contents/background_contents.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/tab_contents/background_contents.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_delegate.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_delegate.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 1 chunk +6 lines, -0 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/browser/web_contents_delegate.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/browser/web_contents_delegate.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/test/render_view_test.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +12 lines, -16 lines 0 comments Download
M content/renderer/render_view_impl_params.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl_params.cc View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M content/renderer/render_widget.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +8 lines, -1 line 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +18 lines, -6 lines 0 comments Download
M content/renderer/render_widget_fullscreen.cc View 1 chunk +1 line, -2 lines 0 comments Download
M content/renderer/render_widget_unittest.cc View 1 2 1 chunk +6 lines, -4 lines 0 comments Download
M extensions/browser/extension_host.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M extensions/browser/extension_host.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
danakj
Hi, please tell me if I've done anything crazy/wrong here :)
6 years, 8 months ago (2014-04-10 19:55:40 UTC) #1
jam
just a nit regarding not bringing in the "background" concept to src\content. also do this ...
6 years, 8 months ago (2014-04-10 20:27:48 UTC) #2
danakj
Thanks, never_visible is nice, and doesn't confuse things with background tabs :) https://codereview.chromium.org/233093006/diff/20001/content/public/browser/content_browser_client.h File content/public/browser/content_browser_client.h ...
6 years, 8 months ago (2014-04-10 20:37:12 UTC) #3
piman
LGTM. Does this prevent the compositor from allocating shm for tiles and stuff? Or is ...
6 years, 8 months ago (2014-04-10 21:27:18 UTC) #4
danakj
On 2014/04/10 21:27:18, piman wrote: > LGTM. > Does this prevent the compositor from allocating ...
6 years, 8 months ago (2014-04-10 22:01:47 UTC) #5
danakj
On 2014/04/10 22:01:47, danakj wrote: > On 2014/04/10 21:27:18, piman wrote: > > LGTM. > ...
6 years, 8 months ago (2014-04-10 22:12:39 UTC) #6
danakj
On 2014/04/10 22:12:39, danakj wrote: > On 2014/04/10 22:01:47, danakj wrote: > > On 2014/04/10 ...
6 years, 8 months ago (2014-04-10 22:20:53 UTC) #7
vangelis
On 2014/04/10 22:20:53, danakj wrote: > On 2014/04/10 22:12:39, danakj wrote: > > On 2014/04/10 ...
6 years, 8 months ago (2014-04-10 23:13:29 UTC) #8
piman
On Thu, Apr 10, 2014 at 4:13 PM, <vangelis@google.com> wrote: > On 2014/04/10 22:20:53, danakj ...
6 years, 8 months ago (2014-04-10 23:20:59 UTC) #9
jam
sorry should have mentioned this earlier, but it strikes me now that this should be ...
6 years, 8 months ago (2014-04-11 18:06:39 UTC) #10
danakj
Ok patch set 6 does two things: - DCHECKs and ensures background WebContents (NeverVisible) also ...
6 years, 8 months ago (2014-04-14 22:19:54 UTC) #11
danakj
+cevans for view_messages.h (adding param to tell renderer it will never be shown, allow it ...
6 years, 8 months ago (2014-04-14 22:22:44 UTC) #12
danakj
+mek for extensions code
6 years, 8 months ago (2014-04-14 22:22:56 UTC) #13
Marijn Kruisselbrink
On 2014/04/14 22:22:56, danakj wrote: > +mek for extensions code extensions code lgtm
6 years, 8 months ago (2014-04-14 22:28:05 UTC) #14
danakj
+avi for chrome/browser/tab_contents/
6 years, 8 months ago (2014-04-14 22:36:54 UTC) #15
piman
6 years, 8 months ago (2014-04-14 22:40:24 UTC) #16
piman
lgtm
6 years, 8 months ago (2014-04-14 22:40:26 UTC) #17
jam
lgtm with comments https://codereview.chromium.org/233093006/diff/100001/chrome/browser/tab_contents/background_contents.cc File chrome/browser/tab_contents/background_contents.cc (right): https://codereview.chromium.org/233093006/diff/100001/chrome/browser/tab_contents/background_contents.cc#newcode130 chrome/browser/tab_contents/background_contents.cc:130: extensions::GetViewType(web_contents)); this seems like a redundant ...
6 years, 8 months ago (2014-04-14 22:43:01 UTC) #18
danakj
https://codereview.chromium.org/233093006/diff/100001/chrome/browser/tab_contents/background_contents.cc File chrome/browser/tab_contents/background_contents.cc (right): https://codereview.chromium.org/233093006/diff/100001/chrome/browser/tab_contents/background_contents.cc#newcode130 chrome/browser/tab_contents/background_contents.cc:130: extensions::GetViewType(web_contents)); On 2014/04/14 22:43:01, jam wrote: > this seems ...
6 years, 8 months ago (2014-04-14 22:47:29 UTC) #19
kenrb
lgtm for IPC security review.
6 years, 8 months ago (2014-04-15 15:28:29 UTC) #20
danakj
This change appears to break the EphemeralAppBrowserTest.ReceiveMessagesWhenLaunched because the background renderer now thinking it is ...
6 years, 8 months ago (2014-04-15 17:55:16 UTC) #21
danakj
On 2014/04/15 17:55:16, danakj wrote: > This change appears to break the > EphemeralAppBrowserTest.ReceiveMessagesWhenLaunched because ...
6 years, 8 months ago (2014-04-15 17:57:37 UTC) #22
danakj
So, IsNeverVisible and IsHidden need to be orthogonal things (at least for this patch set ...
6 years, 8 months ago (2014-04-15 19:57:58 UTC) #23
danakj
The CQ bit was checked by danakj@chromium.org
6 years, 8 months ago (2014-04-15 20:50:50 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/233093006/210001
6 years, 8 months ago (2014-04-15 20:51:26 UTC) #25
piman
lgtm
6 years, 8 months ago (2014-04-15 21:21:33 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/danakj@chromium.org/233093006/210001
6 years, 8 months ago (2014-04-16 01:25:17 UTC) #27
commit-bot: I haz the power
6 years, 8 months ago (2014-04-16 02:37:07 UTC) #28
Message was sent while issue was closed.
Change committed as 264075

Powered by Google App Engine
This is Rietveld 408576698