summaryrefslogtreecommitdiffstats
path: root/gfx/ipc/GPUChild.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /gfx/ipc/GPUChild.cpp
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip
Merging upstream version 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.cpp19
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();
}