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 <alcooper@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#40337}
diff --git a/modules/desktop_capture/desktop_capture_options.h b/modules/desktop_capture/desktop_capture_options.h
index 9796b5f..ee823d2 100644
--- a/modules/desktop_capture/desktop_capture_options.h
+++ b/modules/desktop_capture/desktop_capture_options.h
@@ -159,10 +159,6 @@
}
#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 @@
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 2017c60..f9efd93 100644
--- a/modules/desktop_capture/desktop_capturer.cc
+++ b/modules/desktop_capture/desktop_capturer.cc
@@ -65,7 +65,7 @@
std::unique_ptr<DesktopCapturer> 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> 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);
}