From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- .../libwebrtc/modules/desktop_capture/mac/desktop_frame_provider.h | 2 ++ .../libwebrtc/modules/desktop_capture/mac/screen_capturer_mac.mm | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'third_party/libwebrtc/modules/desktop_capture/mac') diff --git a/third_party/libwebrtc/modules/desktop_capture/mac/desktop_frame_provider.h b/third_party/libwebrtc/modules/desktop_capture/mac/desktop_frame_provider.h index aad28d2f30..64ef5750ec 100644 --- a/third_party/libwebrtc/modules/desktop_capture/mac/desktop_frame_provider.h +++ b/third_party/libwebrtc/modules/desktop_capture/mac/desktop_frame_provider.h @@ -46,6 +46,8 @@ class DesktopFrameProvider { // Expected to be called before stopping the CGDisplayStreamRef streams. void Release(); + bool allow_iosurface() const { return allow_iosurface_; } + private: SequenceChecker thread_checker_; const bool allow_iosurface_; diff --git a/third_party/libwebrtc/modules/desktop_capture/mac/screen_capturer_mac.mm b/third_party/libwebrtc/modules/desktop_capture/mac/screen_capturer_mac.mm index 1f4a62f7cd..785a15dfa4 100644 --- a/third_party/libwebrtc/modules/desktop_capture/mac/screen_capturer_mac.mm +++ b/third_party/libwebrtc/modules/desktop_capture/mac/screen_capturer_mac.mm @@ -442,6 +442,10 @@ void ScreenCapturerMac::ScreenConfigurationChanged() { bool ScreenCapturerMac::RegisterRefreshAndMoveHandlers() { RTC_DCHECK(thread_checker_.IsCurrent()); + if (!desktop_frame_provider_.allow_iosurface()) { + return true; + } + desktop_config_ = desktop_config_monitor_->desktop_configuration(); for (const auto& config : desktop_config_.displays) { size_t pixel_width = config.pixel_bounds.width(); -- cgit v1.2.3