diff options
Diffstat (limited to 'modules/desktop_capture/desktop_capturer.cc')
-rw-r--r-- | modules/desktop_capture/desktop_capturer.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/modules/desktop_capture/desktop_capturer.cc b/modules/desktop_capture/desktop_capturer.cc index 8d8bdd5835..735aa4d530 100644 --- a/modules/desktop_capture/desktop_capturer.cc +++ b/modules/desktop_capture/desktop_capturer.cc @@ -54,10 +54,8 @@ bool DesktopCapturer::IsOccluded(const DesktopVector& pos) { std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateWindowCapturer( const DesktopCaptureOptions& options) { #if defined(RTC_ENABLE_WIN_WGC) - // TODO(bugs.webrtc.org/11760): Add a WebRTC field trial (or similar - // mechanism) check here that leads to use of the WGC capturer once it is - // fully implemented. - if (rtc::rtc_win::GetVersion() >= rtc::rtc_win::Version::VERSION_WIN10_RS5) { + if (options.allow_wgc_capturer() && + rtc::rtc_win::GetVersion() >= rtc::rtc_win::Version::VERSION_WIN10_RS5) { return WgcCapturerWin::CreateRawWindowCapturer(options); } #endif // defined(RTC_ENABLE_WIN_WGC) @@ -80,10 +78,8 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateWindowCapturer( std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateScreenCapturer( const DesktopCaptureOptions& options) { #if defined(RTC_ENABLE_WIN_WGC) - // TODO(bugs.webrtc.org/11760): Add a WebRTC field trial (or similar - // mechanism) check here that leads to use of the WGC capturer once it is - // fully implemented. - if (rtc::rtc_win::GetVersion() >= rtc::rtc_win::Version::VERSION_WIN10_RS5) { + if (options.allow_wgc_capturer() && + rtc::rtc_win::GetVersion() >= rtc::rtc_win::Version::VERSION_WIN10_RS5) { return WgcCapturerWin::CreateRawScreenCapturer(options); } #endif // defined(RTC_ENABLE_WIN_WGC) |