Set updated_rect for frames generated by WindowCapturer implementationsw

Previous updated_rect wasn't set for frames generated by WindowCapturer
implementation. That makes them unustable with chromoting host that
uses update_rect. With that change the frames will always contain
updated_rect that coveras the whole frame.

Change by Ronak Vora <ronakvora@google.com>

R=wez@chromium.org

Review URL: https://webrtc-codereview.appspot.com/22079004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6912 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
sergeyu@chromium.org 2014-08-15 23:13:23 +00:00
parent 353cd37ae9
commit d402875fa5
3 changed files with 9 additions and 0 deletions

View File

@ -224,6 +224,9 @@ void WindowCapturerMac::Capture(const DesktopRegion& region) {
CFRelease(cf_data);
CFRelease(window_image);
frame->mutable_updated_region()->SetRect(
DesktopRect::MakeSize(frame->size()));
callback_->OnCaptureCompleted(frame);
if (full_screen_chrome_window_detector_)

View File

@ -251,6 +251,9 @@ void WindowCapturerWin::Capture(const DesktopRegion& region) {
previous_size_ = frame->size();
frame->mutable_updated_region()->SetRect(
DesktopRect::MakeSize(frame->size()));
if (!result) {
LOG(LS_ERROR) << "Both PrintWindow() and BitBlt() failed.";
frame.reset();

View File

@ -302,6 +302,9 @@ void WindowCapturerLinux::Capture(const DesktopRegion& region) {
x_server_pixel_buffer_.CaptureRect(DesktopRect::MakeSize(frame->size()),
frame);
frame->mutable_updated_region()->SetRect(
DesktopRect::MakeSize(frame->size()));
callback_->OnCaptureCompleted(frame);
}