diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /gfx/ipc/GPUChild.cpp | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/ipc/GPUChild.cpp')
-rw-r--r-- | gfx/ipc/GPUChild.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gfx/ipc/GPUChild.cpp b/gfx/ipc/GPUChild.cpp index afc9f61ee4..2a9fe23628 100644 --- a/gfx/ipc/GPUChild.cpp +++ b/gfx/ipc/GPUChild.cpp @@ -8,12 +8,15 @@ #include "GPUProcessHost.h" #include "GPUProcessManager.h" #include "GfxInfoBase.h" +#include "TelemetryProbesReporter.h" +#include "VideoUtils.h" #include "VRProcessManager.h" #include "gfxConfig.h" #include "gfxPlatform.h" #include "mozilla/Components.h" #include "mozilla/FOGIPC.h" #include "mozilla/StaticPrefs_dom.h" +#include "mozilla/StaticPrefs_media.h" #include "mozilla/Telemetry.h" #include "mozilla/TelemetryIPC.h" #include "mozilla/dom/CheckerboardReportService.h" @@ -341,8 +344,24 @@ mozilla::ipc::IPCResult GPUChild::RecvBHRThreadHang( mozilla::ipc::IPCResult GPUChild::RecvUpdateMediaCodecsSupported( const media::MediaCodecsSupported& aSupported) { + if (ContainHardwareCodecsSupported(aSupported)) { + mozilla::TelemetryProbesReporter::ReportDeviceMediaCodecSupported( + aSupported); + } +#if defined(XP_WIN) + // Do not propagate HEVC support if the pref is off + media::MediaCodecsSupported trimedSupported = aSupported; + if (aSupported.contains( + mozilla::media::MediaCodecsSupport::HEVCHardwareDecode) && + StaticPrefs::media_wmf_hevc_enabled() != 1) { + trimedSupported -= mozilla::media::MediaCodecsSupport::HEVCHardwareDecode; + } + dom::ContentParent::BroadcastMediaCodecsSupportedUpdate( + RemoteDecodeIn::GpuProcess, trimedSupported); +#else dom::ContentParent::BroadcastMediaCodecsSupportedUpdate( RemoteDecodeIn::GpuProcess, aSupported); +#endif return IPC_OK(); } |