DescriptionAdd 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 #Messages
Total messages: 13 (2 generated)
|