tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit e70958ce27bb1f27d44d1700a2e7e632c5be5dfd
parent 59cfd304555dad8bc0a1775250ce49f9baa8f1d4
Author: Dan Baker <dbaker@mozilla.com>
Date:   Thu, 23 Oct 2025 15:11:14 -0600

Bug 1995393 - Vendor libwebrtc from 0a53c16218

Upstream commit: https://webrtc.googlesource.com/src/+/0a53c16218d0cac9784abb2f0b82a8a19c8e0e64
    [WGC] Wait longer for the first frame of a stream

    There seems to have circumstances where the time to obtain the first
    frame of a frame pool takes longer than expected, which results in
    screen capture failures due to too many "kFrameDropped" errors. This CL
    leverages the FrameArrived event to avoid polling the frame pool until
    the first frame is available.

    The new histograms will be added in
    https://chromium-review.googlesource.com/c/chromium/src/+/6821716

    Bug: chromium:433569403
    Change-Id: Ib6f77331508772412a84eb5c63399e716b7d0049
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/402945
    Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
    Commit-Queue: Gabriel Brito <gabrielbrito@microsoft.com>
    Reviewed-by: Alexander Cooper <alcooper@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#45336}

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/modules/desktop_capture/BUILD.gn | 1+
Mthird_party/libwebrtc/modules/desktop_capture/win/wgc_capture_session.cc | 178+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
Mthird_party/libwebrtc/modules/desktop_capture/win/wgc_capture_session.h | 69++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Mthird_party/libwebrtc/moz-patch-stack/s0027.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0034.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0076.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0080.patch | 6+++---
Mthird_party/libwebrtc/moz-patch-stack/s0102.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0114.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0119.patch | 2+-
11 files changed, 246 insertions(+), 24 deletions(-)

diff --git a/third_party/libwebrtc/README.mozilla.last-vendor b/third_party/libwebrtc/README.mozilla.last-vendor @@ -1,4 +1,4 @@ # ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc -libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-23T21:08:22.854567+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-23T21:11:03.731490+00:00. # base of lastest vendoring -04ad566fb6 +0a53c16218 diff --git a/third_party/libwebrtc/modules/desktop_capture/BUILD.gn b/third_party/libwebrtc/modules/desktop_capture/BUILD.gn @@ -577,6 +577,7 @@ rtc_library("desktop_capture") { ] libs += [ "dwmapi.lib" ] deps += [ + "../../api/units:time_delta", "../../rtc_base:rtc_event", "../../rtc_base:threading", "../../rtc_base/win:hstring", diff --git a/third_party/libwebrtc/modules/desktop_capture/win/wgc_capture_session.cc b/third_party/libwebrtc/modules/desktop_capture/win/wgc_capture_session.cc @@ -8,8 +8,6 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "modules/desktop_capture/win/wgc_capture_session.h" - #include <DispatcherQueue.h> #include <windows.graphics.capture.interop.h> #include <windows.graphics.directX.direct3d11.interop.h> @@ -21,15 +19,19 @@ #include <memory> #include <utility> +#include "api/make_ref_counted.h" #include "api/sequence_checker.h" +#include "api/units/time_delta.h" #include "modules/desktop_capture/desktop_capture_options.h" #include "modules/desktop_capture/desktop_frame.h" #include "modules/desktop_capture/desktop_geometry.h" #include "modules/desktop_capture/shared_desktop_frame.h" #include "modules/desktop_capture/win/screen_capture_utils.h" +#include "modules/desktop_capture/win/wgc_capture_session.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" #include "rtc_base/thread.h" +#include "rtc_base/time_utils.h" #include "rtc_base/win/create_direct3d_device.h" #include "rtc_base/win/get_activation_factory.h" #include "rtc_base/win/windows_version.h" @@ -46,6 +48,10 @@ namespace { constexpr auto kPixelFormat = ABI::Windows::Graphics::DirectX:: DirectXPixelFormat::DirectXPixelFormat_B8G8R8A8UIntNormalized; +// We must wait a little longer for the first frame to avoid failing the +// capture when there is a longer startup time. +constexpr int kFirstFrameTimeoutMs = 5000; + // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. enum class StartCaptureResult { @@ -56,7 +62,7 @@ enum class StartCaptureResult { kD3dDelayLoadFailed = 4, kD3dDeviceCreationFailed = 5, kFramePoolActivationFailed = 6, - // kFramePoolCastFailed = 7, (deprecated) + kFramePoolCastFailed = 7, // kGetItemSizeFailed = 8, (deprecated) kCreateFramePoolFailed = 9, kCreateCaptureSessionFailed = 10, @@ -80,7 +86,17 @@ enum class GetFrameResult { kResizeMappedTextureFailed = 10, kRecreateFramePoolFailed = 11, kFramePoolEmpty = 12, - kMaxValue = kFramePoolEmpty + kWaitForFirstFrameFailed = 13, + kMaxValue = kWaitForFirstFrameFailed +}; + +enum class WaitForFirstFrameResult { + kSuccess = 0, + kTryGetNextFrameFailed = 1, + kAddFrameArrivedCallbackFailed = 2, + kWaitingTimedOut = 3, + kRemoveFrameArrivedCallbackFailed = 4, + kMaxValue = kRemoveFrameArrivedCallbackFailed }; void RecordStartCaptureResult(StartCaptureResult error) { @@ -95,6 +111,19 @@ void RecordGetFrameResult(GetFrameResult error) { static_cast<int>(error), static_cast<int>(GetFrameResult::kMaxValue)); } +void RecordGetFirstFrameTime(int64_t elapsed_time_ms) { + RTC_HISTOGRAM_COUNTS( + "WebRTC.DesktopCapture.Win.WgcCaptureSessionTimeToFirstFrame", + elapsed_time_ms, /*min=*/1, /*max=*/5000, /*bucket_count=*/100); +} + +void RecordWaitForFirstFrameResult(WaitForFirstFrameResult error) { + RTC_HISTOGRAM_ENUMERATION( + "WebRTC.DesktopCapture.Win.WgcCaptureSessionWaitForFirstFrameResult", + static_cast<int>(error), + static_cast<int>(WaitForFirstFrameResult::kMaxValue)); +} + bool SizeHasChanged(ABI::Windows::Graphics::SizeInt32 size_new, ABI::Windows::Graphics::SizeInt32 size_old) { return (size_new.Height != size_old.Height || @@ -107,6 +136,23 @@ bool DoesWgcSkipStaticFrames() { } // namespace +WgcCaptureSession::RefCountedEvent::RefCountedEvent(bool manual_reset, + bool initially_signaled) + : Event(manual_reset, initially_signaled) {} + +WgcCaptureSession::RefCountedEvent::~RefCountedEvent() = default; + +WgcCaptureSession::AgileFrameArrivedHandler::AgileFrameArrivedHandler( + scoped_refptr<RefCountedEvent> event) + : frame_arrived_event_(event) {} + +IFACEMETHODIMP WgcCaptureSession::AgileFrameArrivedHandler::Invoke( + ABI::Windows::Graphics::Capture::IDirect3D11CaptureFramePool* sender, + IInspectable* args) { + frame_arrived_event_->Set(); + return S_OK; +} + WgcCaptureSession::WgcCaptureSession(intptr_t source_id, ComPtr<ID3D11Device> d3d11_device, ComPtr<WGC::IGraphicsCaptureItem> item, @@ -119,7 +165,7 @@ WgcCaptureSession::WgcCaptureSession(intptr_t source_id, } WgcCaptureSession::~WgcCaptureSession() { - RemoveEventHandler(); + RemoveEventHandlers(); } HRESULT WgcCaptureSession::StartCapture(const DesktopCaptureOptions& options) { @@ -178,8 +224,20 @@ HRESULT WgcCaptureSession::StartCapture(const DesktopCaptureOptions& options) { return hr; } - hr = frame_pool_statics->Create(direct3d_device_.Get(), kPixelFormat, - kNumBuffers, size_, &frame_pool_); + // Cast to FramePoolStatics2 so we can use CreateFreeThreaded and avoid the + // need to have a DispatcherQueue. Sometimes, the time to obtain the first + // frame ever in a stream can take longer. To avoid timeouts, + // CreateFreeThreaded is needed so that the frame processing done by WGC can + // happen on a different thread while the main thread is waiting for it. + ComPtr<WGC::IDirect3D11CaptureFramePoolStatics2> frame_pool_statics2; + hr = frame_pool_statics->QueryInterface(IID_PPV_ARGS(&frame_pool_statics2)); + if (FAILED(hr)) { + RecordStartCaptureResult(StartCaptureResult::kFramePoolCastFailed); + return hr; + } + + hr = frame_pool_statics2->CreateFreeThreaded( + direct3d_device_.Get(), kPixelFormat, kNumBuffers, size_, &frame_pool_); if (FAILED(hr)) { RecordStartCaptureResult(StartCaptureResult::kCreateFramePoolFailed); return hr; @@ -233,7 +291,58 @@ HRESULT WgcCaptureSession::StartCapture(const DesktopCaptureOptions& options) { return hr; } +bool WgcCaptureSession::WaitForFirstFrame() { + RTC_CHECK(!has_first_frame_arrived_); + + ComPtr<WGC::IDirect3D11CaptureFrame> capture_frame = nullptr; + // Flush the `frame_pool_` buffers so that we can receive the most recent + // frames. + for (int i = 0; i < kNumBuffers; ++i) { + HRESULT hr = frame_pool_->TryGetNextFrame(&capture_frame); + if (FAILED(hr)) { + RTC_LOG(LS_ERROR) << "TryGetNextFrame failed: " << hr; + RecordWaitForFirstFrameResult( + WaitForFirstFrameResult::kTryGetNextFrameFailed); + return false; + } + } + + if (FAILED(AddFrameArrivedEventHandler())) { + RecordWaitForFirstFrameResult( + WaitForFirstFrameResult::kAddFrameArrivedCallbackFailed); + return false; + } + + RTC_CHECK(has_first_frame_arrived_event_); + int64_t first_frame_event_wait_start = TimeMillis(); + // Only start the frame polling once the first frame becomes available. + if (!has_first_frame_arrived_event_->Wait( + TimeDelta::Millis(kFirstFrameTimeoutMs))) { + RecordGetFirstFrameTime(kFirstFrameTimeoutMs); + RecordWaitForFirstFrameResult(WaitForFirstFrameResult::kWaitingTimedOut); + RTC_LOG(LS_ERROR) << "Timed out after waiting " << kFirstFrameTimeoutMs + << " ms for the first frame."; + return false; + } + + RecordGetFirstFrameTime(TimeMillis() - first_frame_event_wait_start); + RecordWaitForFirstFrameResult(WaitForFirstFrameResult::kSuccess); + has_first_frame_arrived_ = true; + RemoveFrameArrivedEventHandler(); + return true; +} + void WgcCaptureSession::EnsureFrame() { + // We need to wait for the first frame because it might take some extra time + // for the `frame_pool_` to be populated and capture may fail because of too + // many `kFrameDropped` errors. + if (!has_first_frame_arrived_) { + if (!WaitForFirstFrame()) { + RecordGetFrameResult(GetFrameResult::kWaitForFirstFrameFailed); + return; + } + } + // Try to process the captured frame and copy it to the `queue_`. HRESULT hr = ProcessFrame(); if (SUCCEEDED(hr)) { @@ -289,8 +398,16 @@ bool WgcCaptureSession::GetFrame(std::unique_ptr<DesktopFrame>* output_frame, // if we know that the source will not be capturable. This can happen e.g. // when captured window is minimized and if EnsureFrame() was called in this // state a large amount of kFrameDropped errors would be logged. - if (source_should_be_capturable) + if (source_should_be_capturable) { EnsureFrame(); + } else { + // If the source is not capturable, we must reset `has_first_frame_arrived_` + // so that the next time the source becomes capturable we can wait for the + // first frame again. + if (has_first_frame_arrived_) { + has_first_frame_arrived_ = false; + } + } // Return a NULL frame and false as `result` if we still don't have a valid // frame. This will lead to a DesktopCapturer::Result::ERROR_PERMANENT being @@ -589,7 +706,7 @@ HRESULT WgcCaptureSession::ProcessFrame() { // Mark resized frames as damaged. damage_region_.SetRect(DesktopRect::MakeSize(current_frame->size())); } - } else{ + } else { // Mark a `damage_region_` even if there is no previous frame. This // condition does not create any increased overhead but is useful while // using FullScreenWindowDetector, where it would create a new @@ -613,7 +730,7 @@ HRESULT WgcCaptureSession::OnItemClosed(WGC::IGraphicsCaptureItem* sender, RTC_LOG(LS_INFO) << "Capture target has been closed."; item_closed_ = true; - RemoveEventHandler(); + RemoveItemClosedEventHandler(); // Do not attempt to free resources in the OnItemClosed handler, as this // causes a race where we try to delete the item that is calling us. Removing @@ -623,16 +740,53 @@ HRESULT WgcCaptureSession::OnItemClosed(WGC::IGraphicsCaptureItem* sender, return S_OK; } -void WgcCaptureSession::RemoveEventHandler() { +void WgcCaptureSession::RemoveEventHandlers() { + RemoveItemClosedEventHandler(); + RemoveFrameArrivedEventHandler(); +} + +void WgcCaptureSession::RemoveItemClosedEventHandler() { HRESULT hr; if (item_ && item_closed_token_) { hr = item_->remove_Closed(*item_closed_token_); item_closed_token_.reset(); - if (FAILED(hr)) + if (FAILED(hr)) { RTC_LOG(LS_WARNING) << "Failed to remove Closed event handler: " << hr; + } + } +} + +void WgcCaptureSession::RemoveFrameArrivedEventHandler() { + RTC_DCHECK(frame_pool_); + if (frame_arrived_token_) { + HRESULT hr = frame_pool_->remove_FrameArrived(*frame_arrived_token_); + frame_arrived_token_.reset(); + has_first_frame_arrived_event_ = nullptr; + if (FAILED(hr)) { + RTC_LOG(LS_WARNING) << "Failed to remove FrameArrived event handler: " + << hr; + } } } +HRESULT WgcCaptureSession::AddFrameArrivedEventHandler() { + RTC_DCHECK(frame_pool_); + HRESULT hr = E_FAIL; + frame_arrived_token_ = std::make_unique<EventRegistrationToken>(); + has_first_frame_arrived_event_ = make_ref_counted<RefCountedEvent>( + /*manual_reset=*/true, /*initially_signaled=*/false); + auto frame_arrived_handler = Microsoft::WRL::Make<AgileFrameArrivedHandler>( + has_first_frame_arrived_event_); + hr = frame_pool_->add_FrameArrived(frame_arrived_handler.Get(), + frame_arrived_token_.get()); + if (FAILED(hr)) { + RTC_LOG(LS_WARNING) << "Failed to add FrameArrived event handler: " << hr; + frame_arrived_token_.reset(); + has_first_frame_arrived_event_ = nullptr; + } + return hr; +} + bool WgcCaptureSession::FrameContentCanBeCompared() { DesktopFrame* current_frame = queue_.current_frame(); DesktopFrame* previous_frame = queue_.previous_frame(); diff --git a/third_party/libwebrtc/modules/desktop_capture/win/wgc_capture_session.h b/third_party/libwebrtc/modules/desktop_capture/win/wgc_capture_session.h @@ -16,17 +16,20 @@ #include <windows.graphics.capture.h> #include <windows.graphics.h> #include <wrl/client.h> +#include <wrl/implements.h> #include <cstdint> #include <memory> #include <optional> +#include "api/scoped_refptr.h" #include "api/sequence_checker.h" #include "modules/desktop_capture/desktop_capture_options.h" #include "modules/desktop_capture/desktop_frame.h" #include "modules/desktop_capture/desktop_region.h" #include "modules/desktop_capture/screen_capture_frame_queue.h" #include "modules/desktop_capture/shared_desktop_frame.h" +#include "rtc_base/event.h" namespace webrtc { @@ -68,6 +71,41 @@ class WgcCaptureSession final { static constexpr int kNumBuffers = 2; private: + class RefCountedEvent : public RefCountedNonVirtual<RefCountedEvent>, + public Event { + public: + RefCountedEvent(bool manual_reset, bool initially_signaled); + + private: + friend class RefCountedNonVirtual<RefCountedEvent>; + ~RefCountedEvent(); + }; + + // Handles the arrival of new frames in the Direct3D11CaptureFramePool. + // Whenever `Direct3D11CaptureFramePool.FrameArrived` is called, + // `AgileFrameArrivedHandler::Invoke` will also be called. This class needs to + // implement the IAgileObject interface so that we can create a WGC frame pool + // with `Direct3D11CaptureFramePool::CreateFreeThreaded` and be able to call + // `Invoke` on a thread different from the one that created this class' + // instance. See more: + class AgileFrameArrivedHandler + : public Microsoft::WRL::RuntimeClass< + Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, + ABI::Windows::Foundation::ITypedEventHandler< + ABI::Windows::Graphics::Capture::Direct3D11CaptureFramePool*, + IInspectable*>, + IAgileObject> { + public: + AgileFrameArrivedHandler(scoped_refptr<RefCountedEvent> event); + + IFACEMETHODIMP Invoke( + ABI::Windows::Graphics::Capture::IDirect3D11CaptureFramePool* sender, + IInspectable* args) override; + + private: + scoped_refptr<RefCountedEvent> frame_arrived_event_; + }; + // Initializes `mapped_texture_` with the properties of the `src_texture`, // overrides the values of some necessary properties like the // D3D11_CPU_ACCESS_READ flag. Also has optional parameters for what size @@ -83,6 +121,13 @@ class WgcCaptureSession final { ABI::Windows::Graphics::Capture::IGraphicsCaptureItem* sender, IInspectable* event_args); + // Waits for the first frame to arrive in the `frame_pool_`. We should wait + // for a frame if either this is the first frame ever obtained from the + // `frame_pool_` or if this is the first frame obtained after a capture + // interruption - e.g. when a captured window is brought back after being + // minimized. + bool WaitForFirstFrame(); + // Wraps calls to ProcessFrame and deals with the uniqe start-up phase // ensuring that we always have one captured frame available. void EnsureFrame(); @@ -90,13 +135,17 @@ class WgcCaptureSession final { // Process the captured frame and copy it to the `queue_`. HRESULT ProcessFrame(); - void RemoveEventHandler(); + void RemoveEventHandlers(); + void RemoveItemClosedEventHandler(); + void RemoveFrameArrivedEventHandler(); + HRESULT AddFrameArrivedEventHandler(); bool FrameContentCanBeCompared(); bool allow_zero_hertz() const { return allow_zero_hertz_; } std::unique_ptr<EventRegistrationToken> item_closed_token_; + std::unique_ptr<EventRegistrationToken> frame_arrived_token_; // A Direct3D11 Device provided by the caller. We use this to create an // IDirect3DDevice, and also to create textures that will hold the image data. @@ -166,6 +215,24 @@ class WgcCaptureSession final { // screen. bool is_window_source_; + // To be shared between `WgcCaptureSession` and `AgileFrameHandler`. + // AgileFrameHandler will set this event in a WGC working thread and + // `WgcCaptureSession` will check its state in desktopCaptureThread. This is + // necessary to avoid race conditions where the desktopCaptureThread preempts + // the WGC worker thread and destroys the `WgcCaptureSession` while a new + // frame is being processed In this situation, the `AgileFrameHandler` would + // end accessing invalid memory, which was previously owned by + // `WgcCaptureSession`. + // + // Will be signaled when the first frame is available in the `frame_pool_` and + // should not reset for the lifetime of `WgcCaptureSession`. + scoped_refptr<RefCountedEvent> has_first_frame_arrived_event_; + + // Records if the first frame arrived in a stream arrived. Will be reset if a + // source becomes momentarilly non-capturable - e.g. a window that gets + // minimized. + bool has_first_frame_arrived_ = false; + SequenceChecker sequence_checker_; }; diff --git a/third_party/libwebrtc/moz-patch-stack/s0027.patch b/third_party/libwebrtc/moz-patch-stack/s0027.patch @@ -871,7 +871,7 @@ index 075e2a8110..1f3a66667a 100644 } else { cflags = [ diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn -index 1ba95f7e81..ff3f4d5b93 100644 +index a3110d134f..d41f2ccb2b 100644 --- a/modules/desktop_capture/BUILD.gn +++ b/modules/desktop_capture/BUILD.gn @@ -344,37 +344,12 @@ rtc_library("desktop_capture") { diff --git a/third_party/libwebrtc/moz-patch-stack/s0034.patch b/third_party/libwebrtc/moz-patch-stack/s0034.patch @@ -263,7 +263,7 @@ index e90ef0e06a..0e96125f40 100644 cflags = [ "-mfpu=neon" ] } diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn -index ff3f4d5b93..b95f1aa2d0 100644 +index d41f2ccb2b..9ea19a8b48 100644 --- a/modules/desktop_capture/BUILD.gn +++ b/modules/desktop_capture/BUILD.gn @@ -10,7 +10,7 @@ import("//build/config/linux/gtk/gtk.gni") diff --git a/third_party/libwebrtc/moz-patch-stack/s0076.patch b/third_party/libwebrtc/moz-patch-stack/s0076.patch @@ -11,7 +11,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/0ec1b33b95dbb2d39 2 files changed, 7 insertions(+) diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn -index b95f1aa2d0..6f18642622 100644 +index 9ea19a8b48..6e2b55c4ad 100644 --- a/modules/desktop_capture/BUILD.gn +++ b/modules/desktop_capture/BUILD.gn @@ -388,6 +388,9 @@ rtc_library("desktop_capture") { diff --git a/third_party/libwebrtc/moz-patch-stack/s0080.patch b/third_party/libwebrtc/moz-patch-stack/s0080.patch @@ -11,10 +11,10 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/0aac94794aad2ddb6 1 file changed, 6 insertions(+) diff --git a/modules/desktop_capture/win/wgc_capture_session.cc b/modules/desktop_capture/win/wgc_capture_session.cc -index dc744d46c6..6c1f93425e 100644 +index 01ec96b6c1..05c5bb4381 100644 --- a/modules/desktop_capture/win/wgc_capture_session.cc +++ b/modules/desktop_capture/win/wgc_capture_session.cc -@@ -200,6 +200,11 @@ HRESULT WgcCaptureSession::StartCapture(const DesktopCaptureOptions& options) { +@@ -258,6 +258,11 @@ HRESULT WgcCaptureSession::StartCapture(const DesktopCaptureOptions& options) { } } @@ -26,7 +26,7 @@ index dc744d46c6..6c1f93425e 100644 // By default, the WGC capture API adds a yellow border around the captured // window or display to indicate that a capture is in progress. The section // below is an attempt to remove this yellow border to make the capture -@@ -211,6 +216,7 @@ HRESULT WgcCaptureSession::StartCapture(const DesktopCaptureOptions& options) { +@@ -269,6 +274,7 @@ HRESULT WgcCaptureSession::StartCapture(const DesktopCaptureOptions& options) { &session3))) { session3->put_IsBorderRequired(options.wgc_require_border()); } diff --git a/third_party/libwebrtc/moz-patch-stack/s0102.patch b/third_party/libwebrtc/moz-patch-stack/s0102.patch @@ -560,7 +560,7 @@ index 0e96125f40..c72b3714c4 100644 } diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn -index 6f18642622..4b5acc5bdb 100644 +index 6e2b55c4ad..94a3be6ad1 100644 --- a/modules/desktop_capture/BUILD.gn +++ b/modules/desktop_capture/BUILD.gn @@ -6,8 +6,8 @@ diff --git a/third_party/libwebrtc/moz-patch-stack/s0114.patch b/third_party/libwebrtc/moz-patch-stack/s0114.patch @@ -17,7 +17,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/506d4efaf2dc29472 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn -index 4b5acc5bdb..484a47894b 100644 +index 94a3be6ad1..75196a1bc6 100644 --- a/modules/desktop_capture/BUILD.gn +++ b/modules/desktop_capture/BUILD.gn @@ -553,6 +553,10 @@ rtc_library("desktop_capture") { diff --git a/third_party/libwebrtc/moz-patch-stack/s0119.patch b/third_party/libwebrtc/moz-patch-stack/s0119.patch @@ -65,7 +65,7 @@ index 87e1884583..420a754edd 100644 static std::unique_ptr<Call> Create(CallConfig config); diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn -index 484a47894b..5c843cfc2b 100644 +index 75196a1bc6..bcc2c87ce8 100644 --- a/modules/desktop_capture/BUILD.gn +++ b/modules/desktop_capture/BUILD.gn @@ -390,6 +390,11 @@ rtc_library("desktop_capture") {