Wrong coordinate is used in ScreenCapturerWinGdi

Wrong coordinate is used in ScreenCapturerWinGdi in change
https://chromium-review.googlesource.com/c/external/webrtc/+/644787

Bug: webrtc:7950
Change-Id: I8a11a4cedc594ce9c5462578e59b4e31b8c79253
Reviewed-on: https://chromium-review.googlesource.com/655257
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Commit-Queue: Zijie He <zijiehe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#19734}
This commit is contained in:
Zijie He 2017-09-07 06:53:59 -07:00 committed by Commit Bot
parent 8ffb9c388f
commit 9ec5da67f0

View File

@ -195,7 +195,8 @@ bool ScreenCapturerWinGdi::CaptureImage() {
return false;
queue_.ReplaceCurrentFrame(SharedDesktopFrame::Wrap(std::move(buffer)));
}
queue_.current_frame()->set_top_left(screen_rect.top_left());
queue_.current_frame()->set_top_left(
screen_rect.top_left().subtract(GetFullscreenRect().top_left()));
// Select the target bitmap into the memory dc and copy the rect from desktop
// to memory.