Call PrintWindow for the first time of capturing to capture the window frames correctly.
This will fix artifacts on the captured window frames, especially for cmd, which sometimes leaks glimpss of other window's content. BUG= R=sergeyu@chromium.org Review URL: https://webrtc-codereview.appspot.com/8989004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5616 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
00073aafa8
commit
f0fc72f70e
@ -217,11 +217,11 @@ void WindowCapturerWin::Capture(const DesktopRegion& region) {
|
||||
// When composition is enabled the DC returned by GetWindowDC() doesn't always
|
||||
// have window frame rendered correctly. Windows renders it only once and then
|
||||
// caches the result between captures. We hack it around by calling
|
||||
// PrintWindow() whenever window size changes - it somehow affects what we
|
||||
// get from BitBlt() on the subsequent captures.
|
||||
// PrintWindow() whenever window size changes, including the first time of
|
||||
// capturing - it somehow affects what we get from BitBlt() on the subsequent
|
||||
// captures.
|
||||
|
||||
if (!IsAeroEnabled() ||
|
||||
(!previous_size_.is_empty() && !previous_size_.equals(frame->size()))) {
|
||||
if (!IsAeroEnabled() || !previous_size_.equals(frame->size())) {
|
||||
result = PrintWindow(window_, mem_dc, 0);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user