Commit 4573aaf7 authored by cmumford's avatar cmumford Committed by Commit bot

Revert of Tab (and AuraWindow) Capture: Capture refresh frame after Resume()...

Revert of Tab (and AuraWindow) Capture: Capture refresh frame after Resume() (patchset #2 id:20001 of https://codereview.chromium.org/2603533002/ )

Reason for revert:
Speculative revert because WebContentsVideoCaptureDeviceTest.StopWithRendererWorkToDo is crashing with media::ThreadSafeCaptureOracle calling CopyRGBToVideoFrame.

https://uberchromegw.corp.google.com/i/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/56009

Original issue's description:
> Tab (and AuraWindow) Capture: Capture refresh frame after Resume()
>
> Adds a refresh frame capture upon Resume(). This solves a problem where
> the tab capture device can be suspended for a significant length of time
> and then resumed; but if the content of the tab isn't changing when the
> resume takes place, no compositor events will be firing to cause any new
> frames to be captured. Thus, the content in the video stream could be
> very stale. Issuing a refresh frame capture guarantees the video stream
> will be up-to-date immediately after a resume.
>
> BUG=643964
>
> Review-Url: https://codereview.chromium.org/2603533002

TBR=xjz@chromium.org,miu@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=643964

Review-Url: https://codereview.chromium.org/2604833003
Cr-Commit-Position: refs/heads/master@{#440810}
parent ced8fb1c
......@@ -117,9 +117,6 @@ void AuraWindowCaptureMachine::InternalResume() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DVLOG(1) << "Resuming frame capture and delivery.";
frame_capture_active_ = true;
// Whenever capture resumes, capture a refresh frame immediately to make sure
// no content updates are missing from the video stream.
MaybeCaptureForRefresh();
}
void AuraWindowCaptureMachine::Stop(const base::Closure& callback) {
......
......@@ -877,9 +877,6 @@ void WebContentsCaptureMachine::RenewFrameSubscription(bool had_target) {
subscription_.reset(new ContentCaptureSubscription(
*rwh, oracle_proxy_, base::Bind(&WebContentsCaptureMachine::Capture,
weak_ptr_factory_.GetWeakPtr())));
// Whenever the target changes, capture a refresh frame immediately to make
// sure the latest frame in the video stream has the correct content.
subscription_->MaybeCaptureForRefresh();
}
}
......
......@@ -1234,12 +1234,10 @@ TEST_F(MAYBE_WebContentsVideoCaptureDeviceTest, SuspendsAndResumes) {
SimulateDrawEvent();
base::RunLoop().RunUntilIdle();
// Resume capture and expect a GREEN update frame to be captured.
client_observer()->SetIsExpectingFrames(true);
// Resume capture and then draw a BLUE frame and wait for it to be captured.
device()->Resume();
ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorGREEN));
// Draw a BLUE frame and wait for it to be captured.
base::RunLoop().RunUntilIdle();
client_observer()->SetIsExpectingFrames(true);
source()->SetSolidColor(SK_ColorBLUE);
SimulateDrawEvent();
ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorBLUE));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment