Files
Michael Froman 51b040b255 Bug 2064200 - Vendor libwebrtc from cd5f3c19d8
Upstream commit: https://webrtc.googlesource.com/src/+/cd5f3c19d89dce8189bde370f2141a76ca7fed80
    [pipewire] Followups from CL 487880.

    - Use RTC_CHECK when possible.
    - Check that the global tracking boolean is correct in ctor/dtor.
    - Explicitly delete move operators.

    Bug: chromium:40236752
    Change-Id: I4f3fc3a64ae442367a23c0f8312f836864bde3fb
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/494800
    Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
    Commit-Queue: Mark Foltz <mfoltz@chromium.org>
    Auto-Submit: Mark Foltz <mfoltz@chromium.org>
    Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#48314}
2026-08-28 09:31:54 +00:00

39 lines
1.5 KiB
Diff

From: stransky <stransky@redhat.com>
Date: Tue, 29 Aug 2023 12:43:00 +0000
Subject: Bug 1821629 [DMABuf] Don't use DMABuf if it's disabled by Firefox gfx
config r=ng,webrtc-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D172224
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/158a888cad8869a2f0026fa7cfaaa13ecbfcf2ed
---
.../linux/wayland/shared_screencast_stream.cc | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
index a818ce37c1..44daf1fe03 100644
--- a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
+++ b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
@@ -61,6 +61,13 @@
#include "rtc_base/thread_annotations.h"
#include "rtc_base/time_utils.h"
+// Wrapper for gfxVars::UseDMABuf() as we can't include gfxVars here.
+// We don't want to use dmabuf of known broken systems.
+// See FEATURE_DMABUF for details.
+namespace mozilla::gfx {
+bool IsDMABufEnabled();
+}
+
namespace webrtc {
namespace {
@@ -432,7 +439,7 @@ void SharedScreenCastStreamPrivate::OnStreamParamChanged(
RTC_LOG(LS_INFO) << sb.Release();
}
- const int buffer_types = has_modifier
+ const int buffer_types = has_modifier && mozilla::gfx::IsDMABufEnabled()
? (1 << SPA_DATA_DmaBuf) | (1 << SPA_DATA_MemFd)
: (1 << SPA_DATA_MemFd);