From 58e97b86003e1b34677eaf0d9aae556c4cf7b2f6 Mon Sep 17 00:00:00 2001 From: henrika Date: Thu, 22 Jun 2023 14:53:52 +0200 Subject: [PATCH] Removes AllowWgcDesktopCapturer feature flag This flag is no longer used in Chrome and can now be removed. Bug: chromium:1314868 Change-Id: Id91b3352dc7ec0543d54894cc206a6e0c7667e9e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/309960 Commit-Queue: Alexander Cooper Reviewed-by: Alexander Cooper Cr-Commit-Position: refs/heads/main@{#40337} --- modules/desktop_capture/desktop_capture_options.h | 5 ----- modules/desktop_capture/desktop_capturer.cc | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/modules/desktop_capture/desktop_capture_options.h b/modules/desktop_capture/desktop_capture_options.h index 9796b5fca2..ee823d296f 100644 --- a/modules/desktop_capture/desktop_capture_options.h +++ b/modules/desktop_capture/desktop_capture_options.h @@ -159,10 +159,6 @@ class RTC_EXPORT DesktopCaptureOptions { } #if defined(RTC_ENABLE_WIN_WGC) - // TODO(henrika): to be removed. - bool allow_wgc_capturer() const { return allow_wgc_capturer_; } - void set_allow_wgc_capturer(bool allow) { allow_wgc_capturer_ = allow; } - // This flag enables the WGC capturer for capturing the screen. // This capturer should offer similar or better performance than the cropping // capturer without the disadvantages listed above. However, the WGC capturer @@ -248,7 +244,6 @@ class RTC_EXPORT DesktopCaptureOptions { bool allow_directx_capturer_ = false; bool allow_cropping_window_capturer_ = false; #if defined(RTC_ENABLE_WIN_WGC) - bool allow_wgc_capturer_ = false; bool allow_wgc_screen_capturer_ = false; bool allow_wgc_window_capturer_ = false; bool allow_wgc_capturer_fallback_ = false; diff --git a/modules/desktop_capture/desktop_capturer.cc b/modules/desktop_capture/desktop_capturer.cc index 2017c60670..f9efd93a64 100644 --- a/modules/desktop_capture/desktop_capturer.cc +++ b/modules/desktop_capture/desktop_capturer.cc @@ -65,7 +65,7 @@ bool DesktopCapturer::IsOccluded(const DesktopVector& pos) { std::unique_ptr DesktopCapturer::CreateWindowCapturer( const DesktopCaptureOptions& options) { #if defined(RTC_ENABLE_WIN_WGC) - if ((options.allow_wgc_capturer() || options.allow_wgc_window_capturer()) && + if (options.allow_wgc_window_capturer() && IsWgcSupported(CaptureType::kWindow)) { return WgcCapturerWin::CreateRawWindowCapturer(options); } @@ -89,7 +89,7 @@ std::unique_ptr DesktopCapturer::CreateWindowCapturer( std::unique_ptr DesktopCapturer::CreateScreenCapturer( const DesktopCaptureOptions& options) { #if defined(RTC_ENABLE_WIN_WGC) - if ((options.allow_wgc_capturer() || options.allow_wgc_screen_capturer()) && + if (options.allow_wgc_screen_capturer() && IsWgcSupported(CaptureType::kScreen)) { return WgcCapturerWin::CreateRawScreenCapturer(options); }