DescriptionWhile screencasting a tab, do not disable rendering updates while hidden.
Approach: There is already a mechanism in WebContentsImpl to prevent WasHidden() from bubbling down to RWHV during tab dragging. This mechanism is extended to also include the span of tab mirroring sessions. A counter is used to account for both dragging a tab and screencasting it at the same time.
Fixed a bug in tab_drag_controller.cc where SetCapturingContents(false) was not being called after a drag in some circumstances.
Note on GTK-specific drag controller change: WebContents::SetCapturingContents(true) is never called, making the Set(false) call a no-op. Removed the Set(false) call and confirmed this did not affect tab dragging behavior on Linux.
BUG=154184
TEST=Win/Mac/Linux: Tested that hidden tabs continue to render with both GPU and software compositing paths. Also, ran through several tab dragging scenarios with and without screencasting engaged.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=180857
Patch Set 1 #Patch Set 2 : Fixed calls to SetCapturingContents() on start/end of drag. #
Total comments: 6
Patch Set 3 : Comment for WebContents::SetCapturingContents() mentions counting. #
Total comments: 3
Patch Set 4 : Split SetCapturingContents into IncrementCapturerCount and DecrementCapturerCount methods. #Patch Set 5 : Finer-grained increment/decrement, per sky@'s comments. #
Total comments: 3
Patch Set 6 : Execute delayed WasHidden() when capturer_count_ goes to zero. #
Messages
Total messages: 19 (0 generated)
|