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

Issue 853883007: Add occlusion support to WebContentsImpl and RenderWidgetHostView (Closed)

Created:
5 years, 11 months ago by ccameron
Modified:
5 years, 11 months ago
Reviewers:
Avi (use Gerrit), miu
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add occlusion support to WebContentsImpl and RenderWidgetHostView Add a WasOccluded and WasUnOccluded methods to WebContentsImpl, and call them on Mac when window occlusion changes. Filter these methods based on whether or not the WebContentsImpl is being captured, and send them to the RenderWidgetHostView. Add tests to make sure that this and the effect of capture on visibility don't regress. Implement WasOccluded and WasUnOccluded only on Mac, where the calls have the effect of telling the RenderWidgetHostImpl that it is hidden (to drop the power consumption) and freezing but not removing the CALayer used by the ui::Compositor (so that content is present when the window is revealed). Move the call to ui::Compositor::SetRootLayer to the browser compositor suspend function to ensure no new frames are drawn after suspend (this may have the effect of skipping the last-visible frame, but it will be re-drawn on reveal anyway). BUG=310374 Committed: https://crrev.com/8807c38fee5e34d7811d96191989eed8a4653e50 Cr-Commit-Position: refs/heads/master@{#311989}

Patch Set 1 #

Patch Set 2 : Another try #

Patch Set 3 : Clean up #

Total comments: 7

Patch Set 4 : Incorporate review feedback #

Total comments: 2

Patch Set 5 : Incorporate review feedback #

Total comments: 1

Patch Set 6 : Remove mac comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -37 lines) Patch
M content/browser/renderer_host/render_widget_host_view_base.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 6 chunks +22 lines, -14 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 4 chunks +27 lines, -13 lines 0 comments Download
M content/browser/web_contents/web_contents_impl_unittest.cc View 1 1 chunk +60 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_view_mac.mm View 1 2 chunks +2 lines, -10 lines 0 comments Download
M content/public/browser/render_widget_host_view.h View 1 2 3 4 5 1 chunk +8 lines, -0 lines 0 comments Download
M content/test/test_render_view_host.h View 1 3 chunks +4 lines, -0 lines 0 comments Download
M content/test/test_render_view_host.cc View 1 3 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (2 generated)
ccameron
This turned out to be fairly simple (& is unrelated to the design doc circulated ...
5 years, 11 months ago (2015-01-16 19:01:11 UTC) #2
Avi (use Gerrit)
LGTM for cocoa stuff, but miu needs to look at the graphics side of things. ...
5 years, 11 months ago (2015-01-16 20:15:13 UTC) #3
ccameron
Thanks -- updated. https://codereview.chromium.org/853883007/diff/40001/content/browser/renderer_host/render_widget_host_view_mac.mm File content/browser/renderer_host/render_widget_host_view_mac.mm (right): https://codereview.chromium.org/853883007/diff/40001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode622 content/browser/renderer_host/render_widget_host_view_mac.mm:622: browser_compositor_->compositor()->SetRootLayer(NULL); On 2015/01/16 20:15:13, Avi wrote: ...
5 years, 11 months ago (2015-01-16 21:43:40 UTC) #4
Avi (use Gerrit)
https://codereview.chromium.org/853883007/diff/60001/content/public/browser/render_widget_host_view.h File content/public/browser/render_widget_host_view.h (right): https://codereview.chromium.org/853883007/diff/60001/content/public/browser/render_widget_host_view.h#newcode97 content/public/browser/render_widget_host_view.h:97: // covered up by other windows on Mac), and ...
5 years, 11 months ago (2015-01-16 21:47:11 UTC) #5
ccameron
Updated. https://codereview.chromium.org/853883007/diff/60001/content/public/browser/render_widget_host_view.h File content/public/browser/render_widget_host_view.h (right): https://codereview.chromium.org/853883007/diff/60001/content/public/browser/render_widget_host_view.h#newcode97 content/public/browser/render_widget_host_view.h:97: // covered up by other windows on Mac), ...
5 years, 11 months ago (2015-01-16 21:54:07 UTC) #6
Avi (use Gerrit)
Yep, that looks nice. LGTM still, and it's good to hear that we're going to ...
5 years, 11 months ago (2015-01-16 21:58:21 UTC) #7
miu
lgtm Thanks for also adding the unit testing around the tab capture case. Peace of ...
5 years, 11 months ago (2015-01-16 22:24:51 UTC) #8
ccameron
Thanks all. Pulled the Mac comment.
5 years, 11 months ago (2015-01-16 22:54:00 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/853883007/100001
5 years, 11 months ago (2015-01-16 22:55:11 UTC) #11
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 11 months ago (2015-01-17 00:29:49 UTC) #12
commit-bot: I haz the power
5 years, 11 months ago (2015-01-17 00:30:35 UTC) #13
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/8807c38fee5e34d7811d96191989eed8a4653e50
Cr-Commit-Position: refs/heads/master@{#311989}

Powered by Google App Engine
This is Rietveld 408576698