Make CroppingWindowCapturer respect detect_updated_region on Windows
This change makes CroppingWindowCapturer::CreateCapturer respect the detect_updated_region flag if set in the options it's passed on Windows. Frames captured by the created capturer will now make changes available via DesktopFrame.updated_region(). Bug: webrtc:10833 Change-Id: Ib973bc58745ebf6e216a7b31f82abec3c6dc9556 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147002 Reviewed-by: Jamie Walch <jamiewalch@chromium.org> Commit-Queue: Jamie Walch <jamiewalch@chromium.org> Cr-Commit-Position: refs/heads/master@{#28694}
This commit is contained in:
committed by
Commit Bot
parent
9f17aff35b
commit
fd6d8d7129
@ -9,6 +9,7 @@
|
||||
*/
|
||||
|
||||
#include "modules/desktop_capture/cropping_window_capturer.h"
|
||||
#include "modules/desktop_capture/desktop_capturer_differ_wrapper.h"
|
||||
#include "modules/desktop_capture/win/screen_capture_utils.h"
|
||||
#include "modules/desktop_capture/win/window_capture_utils.h"
|
||||
#include "rtc_base/logging.h"
|
||||
@ -263,8 +264,13 @@ DesktopRect CroppingWindowCapturerWin::GetWindowRectInVirtualScreen() {
|
||||
// static
|
||||
std::unique_ptr<DesktopCapturer> CroppingWindowCapturer::CreateCapturer(
|
||||
const DesktopCaptureOptions& options) {
|
||||
return std::unique_ptr<DesktopCapturer>(
|
||||
std::unique_ptr<DesktopCapturer> capturer(
|
||||
new CroppingWindowCapturerWin(options));
|
||||
if (capturer && options.detect_updated_region()) {
|
||||
capturer.reset(new DesktopCapturerDifferWrapper(std::move(capturer)));
|
||||
}
|
||||
|
||||
return capturer;
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
Reference in New Issue
Block a user