summaryrefslogtreecommitdiffstats
path: root/dom/media/ipc
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 /dom/media/ipc
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 'dom/media/ipc')
-rw-r--r--dom/media/ipc/MFCDMChild.cpp7
-rw-r--r--dom/media/ipc/MFCDMChild.h2
-rw-r--r--dom/media/ipc/RDDChild.cpp9
-rw-r--r--dom/media/ipc/RDDParent.cpp16
-rw-r--r--dom/media/ipc/RemoteImageHolder.h12
5 files changed, 24 insertions, 22 deletions
diff --git a/dom/media/ipc/MFCDMChild.cpp b/dom/media/ipc/MFCDMChild.cpp
index 2ba2bdaf4e..9df86b82f4 100644
--- a/dom/media/ipc/MFCDMChild.cpp
+++ b/dom/media/ipc/MFCDMChild.cpp
@@ -7,6 +7,7 @@
#include "mozilla/EMEUtils.h"
#include "mozilla/KeySystemConfig.h"
#include "mozilla/RefPtr.h"
+#include "mozilla/StaticString.h"
#include "mozilla/WMFCDMProxyCallback.h"
#include "nsString.h"
#include "RemoteDecoderManagerChild.h"
@@ -44,7 +45,7 @@ namespace mozilla {
#define INVOKE_ASYNC(method, promiseId, param1) \
do { \
- auto callsite = __func__; \
+ StaticString callsite = __func__; \
using ParamType = std::remove_reference<decltype(param1)>::type; \
mManagerThread->Dispatch(NS_NewRunnableFunction( \
callsite, [self = RefPtr{this}, callsite, promiseId, \
@@ -56,7 +57,7 @@ namespace mozilla {
#define INVOKE_ASYNC2(method, promiseId, param1, param2) \
do { \
- auto callsite = __func__; \
+ StaticString callsite = __func__; \
using ParamType1 = std::remove_reference<decltype(param1)>::type; \
using ParamType2 = std::remove_reference<decltype(param2)>::type; \
mManagerThread->Dispatch(NS_NewRunnableFunction( \
@@ -188,7 +189,7 @@ void MFCDMChild::AssertSendable() {
template <typename PromiseType>
already_AddRefed<PromiseType> MFCDMChild::InvokeAsync(
- std::function<void()>&& aCall, const char* aCallerName,
+ std::function<void()>&& aCall, StaticString aCallerName,
MozPromiseHolder<PromiseType>& aPromise) {
AssertSendable();
diff --git a/dom/media/ipc/MFCDMChild.h b/dom/media/ipc/MFCDMChild.h
index 3396b0c790..ec766cab24 100644
--- a/dom/media/ipc/MFCDMChild.h
+++ b/dom/media/ipc/MFCDMChild.h
@@ -30,7 +30,7 @@ class MFCDMChild final : public PMFCDMChild {
template <typename PromiseType>
already_AddRefed<PromiseType> InvokeAsync(
- std::function<void()>&& aCall, const char* aCallerName,
+ std::function<void()>&& aCall, StaticString aCallerName,
MozPromiseHolder<PromiseType>& aPromise);
using InitPromise = MozPromise<MFCDMInitIPDL, nsresult, true>;
diff --git a/dom/media/ipc/RDDChild.cpp b/dom/media/ipc/RDDChild.cpp
index fb2e14bb4f..6180ec7391 100644
--- a/dom/media/ipc/RDDChild.cpp
+++ b/dom/media/ipc/RDDChild.cpp
@@ -5,6 +5,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "RDDChild.h"
+#include "TelemetryProbesReporter.h"
+#include "VideoUtils.h"
#include "mozilla/FOGIPC.h"
#include "mozilla/RDDProcessManager.h"
#include "mozilla/dom/ContentParent.h"
@@ -142,6 +144,13 @@ mozilla::ipc::IPCResult RDDChild::RecvGetModulesTrust(
mozilla::ipc::IPCResult RDDChild::RecvUpdateMediaCodecsSupported(
const media::MediaCodecsSupported& aSupported) {
+#if defined(XP_MACOSX) || defined(XP_LINUX)
+ // We report this on GPUChild on Windows and Android
+ if (ContainHardwareCodecsSupported(aSupported)) {
+ mozilla::TelemetryProbesReporter::ReportDeviceMediaCodecSupported(
+ aSupported);
+ }
+#endif
dom::ContentParent::BroadcastMediaCodecsSupportedUpdate(
RemoteDecodeIn::RddProcess, aSupported);
return IPC_OK();
diff --git a/dom/media/ipc/RDDParent.cpp b/dom/media/ipc/RDDParent.cpp
index 8892e8fbbe..4b6c1372ce 100644
--- a/dom/media/ipc/RDDParent.cpp
+++ b/dom/media/ipc/RDDParent.cpp
@@ -52,6 +52,10 @@
# include "mozilla/SandboxTestingChild.h"
#endif
+#if defined(XP_MACOSX) || defined(XP_LINUX)
+# include "VideoUtils.h"
+#endif
+
namespace mozilla {
using namespace ipc;
@@ -159,18 +163,6 @@ mozilla::ipc::IPCResult RDDParent::RecvInit(
}
IPCResult RDDParent::RecvUpdateVar(const GfxVarUpdate& aUpdate) {
-#if defined(XP_WIN)
- auto scopeExit = MakeScopeExit(
- [couldUseHWDecoder = gfx::gfxVars::CanUseHardwareVideoDecoding()] {
- if (couldUseHWDecoder != gfx::gfxVars::CanUseHardwareVideoDecoding()) {
- // The capabilities of the system may have changed, force a refresh by
- // re-initializing the WMF PDM.
- WMFDecoderModule::Init();
- Unused << RDDParent::GetSingleton()->SendUpdateMediaCodecsSupported(
- PDMFactory::Supported(true /* force refresh */));
- }
- });
-#endif
gfxVars::ApplyUpdate(aUpdate);
return IPC_OK();
}
diff --git a/dom/media/ipc/RemoteImageHolder.h b/dom/media/ipc/RemoteImageHolder.h
index 981e24d150..36deab1ef1 100644
--- a/dom/media/ipc/RemoteImageHolder.h
+++ b/dom/media/ipc/RemoteImageHolder.h
@@ -58,12 +58,12 @@ class RemoteImageHolder final {
gfx::ColorRange mColorRange = {};
};
- template <>
- struct ipc::IPDLParamTraits<RemoteImageHolder> {
- static void Write(IPC::MessageWriter* aWriter, IProtocol* aActor,
- RemoteImageHolder&& aParam);
- static bool Read(IPC::MessageReader* aReader, IProtocol* aActor,
- RemoteImageHolder* aResult);
+template <>
+struct ipc::IPDLParamTraits<RemoteImageHolder> {
+ static void Write(IPC::MessageWriter* aWriter, IProtocol* aActor,
+ RemoteImageHolder&& aParam);
+ static bool Read(IPC::MessageReader* aReader, IProtocol* aActor,
+ RemoteImageHolder* aResult);
};
} // namespace mozilla