зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1500454 - remove PVideoDecoder, etc from dom namespace. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D15156 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
ef297735b5
Коммит
c0a8a08f40
|
@ -25,6 +25,7 @@
|
||||||
#include "mozilla/Unused.h"
|
#include "mozilla/Unused.h"
|
||||||
#include "mozilla/StaticPrefs.h"
|
#include "mozilla/StaticPrefs.h"
|
||||||
#include "mozilla/TelemetryIPC.h"
|
#include "mozilla/TelemetryIPC.h"
|
||||||
|
#include "mozilla/VideoDecoderManagerChild.h"
|
||||||
#include "mozilla/devtools/HeapSnapshotTempFileHelperChild.h"
|
#include "mozilla/devtools/HeapSnapshotTempFileHelperChild.h"
|
||||||
#include "mozilla/docshell/OfflineCacheUpdateChild.h"
|
#include "mozilla/docshell/OfflineCacheUpdateChild.h"
|
||||||
#include "mozilla/dom/ClientManager.h"
|
#include "mozilla/dom/ClientManager.h"
|
||||||
|
@ -34,7 +35,6 @@
|
||||||
#include "mozilla/dom/ContentBridgeParent.h"
|
#include "mozilla/dom/ContentBridgeParent.h"
|
||||||
#include "mozilla/dom/ContentProcessMessageManager.h"
|
#include "mozilla/dom/ContentProcessMessageManager.h"
|
||||||
#include "mozilla/dom/DOMPrefs.h"
|
#include "mozilla/dom/DOMPrefs.h"
|
||||||
#include "mozilla/dom/VideoDecoderManagerChild.h"
|
|
||||||
#include "mozilla/dom/ContentParent.h"
|
#include "mozilla/dom/ContentParent.h"
|
||||||
#include "mozilla/dom/DataTransfer.h"
|
#include "mozilla/dom/DataTransfer.h"
|
||||||
#include "mozilla/dom/DocGroup.h"
|
#include "mozilla/dom/DocGroup.h"
|
||||||
|
|
|
@ -8,16 +8,14 @@
|
||||||
#include "base/thread.h"
|
#include "base/thread.h"
|
||||||
#include "mozilla/layers/SynchronousTask.h"
|
#include "mozilla/layers/SynchronousTask.h"
|
||||||
#include "mozilla/StaticPrefs.h"
|
#include "mozilla/StaticPrefs.h"
|
||||||
|
|
||||||
#include "RemoteMediaDataDecoder.h"
|
|
||||||
#include "VideoDecoderChild.h"
|
#include "VideoDecoderChild.h"
|
||||||
#include "VideoDecoderManagerChild.h"
|
#include "VideoDecoderManagerChild.h"
|
||||||
|
|
||||||
|
#include "RemoteMediaDataDecoder.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
using base::Thread;
|
using base::Thread;
|
||||||
using dom::VideoDecoderChild;
|
|
||||||
using dom::VideoDecoderManagerChild;
|
|
||||||
using namespace ipc;
|
using namespace ipc;
|
||||||
using namespace layers;
|
using namespace layers;
|
||||||
using namespace gfx;
|
using namespace gfx;
|
||||||
|
|
|
@ -11,7 +11,6 @@ include LayersSurfaces;
|
||||||
using mozilla::layers::LayersBackend from "mozilla/layers/LayersTypes.h";
|
using mozilla::layers::LayersBackend from "mozilla/layers/LayersTypes.h";
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
|
||||||
|
|
||||||
struct VideoDataIPDL
|
struct VideoDataIPDL
|
||||||
{
|
{
|
||||||
|
@ -59,5 +58,4 @@ child:
|
||||||
async Error(nsresult error);
|
async Error(nsresult error);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace dom
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
|
@ -13,7 +13,6 @@ using mozilla::CreateDecoderParams::Option from "PlatformDecoderModule.h";
|
||||||
using mozilla::CreateDecoderParams::OptionSet from "PlatformDecoderModule.h";
|
using mozilla::CreateDecoderParams::OptionSet from "PlatformDecoderModule.h";
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
|
||||||
|
|
||||||
sync protocol PVideoDecoderManager
|
sync protocol PVideoDecoderManager
|
||||||
{
|
{
|
||||||
|
@ -36,5 +35,4 @@ parent:
|
||||||
async DeallocateSurfaceDescriptorGPUVideo(SurfaceDescriptorGPUVideo sd);
|
async DeallocateSurfaceDescriptorGPUVideo(SurfaceDescriptorGPUVideo sd);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace dom
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
#include "GPUVideoImage.h"
|
#include "GPUVideoImage.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
|
||||||
|
|
||||||
using base::Thread;
|
using base::Thread;
|
||||||
using namespace ipc;
|
using namespace ipc;
|
||||||
|
@ -127,7 +126,7 @@ void VideoDecoderChild::ActorDestroy(ActorDestroyReason aWhy) {
|
||||||
// it'll be safe for MediaFormatReader to recreate decoders
|
// it'll be safe for MediaFormatReader to recreate decoders
|
||||||
RefPtr<VideoDecoderChild> ref = this;
|
RefPtr<VideoDecoderChild> ref = this;
|
||||||
GetManager()->RunWhenRecreated(
|
GetManager()->RunWhenRecreated(
|
||||||
NS_NewRunnableFunction("dom::VideoDecoderChild::ActorDestroy", [=]() {
|
NS_NewRunnableFunction("VideoDecoderChild::ActorDestroy", [=]() {
|
||||||
MediaResult error(NS_ERROR_DOM_MEDIA_NEED_NEW_DECODER);
|
MediaResult error(NS_ERROR_DOM_MEDIA_NEED_NEW_DECODER);
|
||||||
error.SetGPUCrashTimeStamp(ref->mGPUCrashTime);
|
error.SetGPUCrashTimeStamp(ref->mGPUCrashTime);
|
||||||
if (ref->mInitialized) {
|
if (ref->mInitialized) {
|
||||||
|
@ -326,5 +325,4 @@ VideoDecoderManagerChild* VideoDecoderChild::GetManager() {
|
||||||
return static_cast<VideoDecoderManagerChild*>(Manager());
|
return static_cast<VideoDecoderManagerChild*>(Manager());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace dom
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
|
@ -3,16 +3,15 @@
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
#ifndef include_dom_ipc_VideoDecoderChild_h
|
#ifndef include_ipc_VideoDecoderChild_h
|
||||||
#define include_dom_ipc_VideoDecoderChild_h
|
#define include_ipc_VideoDecoderChild_h
|
||||||
|
|
||||||
#include "MediaResult.h"
|
#include "MediaResult.h"
|
||||||
#include "PlatformDecoderModule.h"
|
#include "PlatformDecoderModule.h"
|
||||||
#include "mozilla/dom/PVideoDecoderChild.h"
|
#include "mozilla/PVideoDecoderChild.h"
|
||||||
#include "IRemoteDecoderChild.h"
|
#include "IRemoteDecoderChild.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
|
||||||
|
|
||||||
class RemoteVideoDecoder;
|
class RemoteVideoDecoder;
|
||||||
class RemoteDecoderModule;
|
class RemoteDecoderModule;
|
||||||
|
@ -88,7 +87,6 @@ class VideoDecoderChild final : public PVideoDecoderChild,
|
||||||
TimeStamp mGPUCrashTime;
|
TimeStamp mGPUCrashTime;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace dom
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
||||||
#endif // include_dom_ipc_VideoDecoderChild_h
|
#endif // include_ipc_VideoDecoderChild_h
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
#include "VideoDecoderManagerChild.h"
|
#include "VideoDecoderManagerChild.h"
|
||||||
#include "VideoDecoderChild.h"
|
#include "VideoDecoderChild.h"
|
||||||
#include "mozilla/dom/ContentChild.h"
|
|
||||||
#include "nsThreadUtils.h"
|
#include "nsThreadUtils.h"
|
||||||
|
#include "mozilla/dom/ContentChild.h"
|
||||||
#include "mozilla/gfx/2D.h"
|
#include "mozilla/gfx/2D.h"
|
||||||
#include "mozilla/ipc/ProtocolUtils.h"
|
#include "mozilla/ipc/ProtocolUtils.h"
|
||||||
#include "mozilla/layers/SynchronousTask.h"
|
#include "mozilla/layers/SynchronousTask.h"
|
||||||
|
@ -16,7 +16,6 @@
|
||||||
#include "base/task.h"
|
#include "base/task.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
|
||||||
|
|
||||||
using namespace ipc;
|
using namespace ipc;
|
||||||
using namespace layers;
|
using namespace layers;
|
||||||
|
@ -60,7 +59,7 @@ static UniquePtr<nsTArray<RefPtr<Runnable>>> sRecreateTasks;
|
||||||
|
|
||||||
if (sVideoDecoderChildThread) {
|
if (sVideoDecoderChildThread) {
|
||||||
sVideoDecoderChildThread->Dispatch(
|
sVideoDecoderChildThread->Dispatch(
|
||||||
NS_NewRunnableFunction("dom::VideoDecoderManagerChild::Shutdown",
|
NS_NewRunnableFunction("VideoDecoderManagerChild::Shutdown",
|
||||||
[]() {
|
[]() {
|
||||||
if (sDecoderManager &&
|
if (sDecoderManager &&
|
||||||
sDecoderManager->CanSend()) {
|
sDecoderManager->CanSend()) {
|
||||||
|
@ -164,7 +163,7 @@ bool VideoDecoderManagerChild::DeallocShmem(mozilla::ipc::Shmem& aShmem) {
|
||||||
RefPtr<VideoDecoderManagerChild> self = this;
|
RefPtr<VideoDecoderManagerChild> self = this;
|
||||||
mozilla::ipc::Shmem shmem = aShmem;
|
mozilla::ipc::Shmem shmem = aShmem;
|
||||||
sVideoDecoderChildThread->Dispatch(
|
sVideoDecoderChildThread->Dispatch(
|
||||||
NS_NewRunnableFunction("dom::VideoDecoderManagerChild::DeallocShmem",
|
NS_NewRunnableFunction("VideoDecoderManagerChild::DeallocShmem",
|
||||||
[self, shmem]() {
|
[self, shmem]() {
|
||||||
if (self->CanSend()) {
|
if (self->CanSend()) {
|
||||||
mozilla::ipc::Shmem shmemCopy = shmem;
|
mozilla::ipc::Shmem shmemCopy = shmem;
|
||||||
|
@ -241,7 +240,7 @@ void VideoDecoderManagerChild::DeallocateSurfaceDescriptorGPUVideo(
|
||||||
SurfaceDescriptorGPUVideo sd = std::move(aSD);
|
SurfaceDescriptorGPUVideo sd = std::move(aSD);
|
||||||
sVideoDecoderChildThread->Dispatch(
|
sVideoDecoderChildThread->Dispatch(
|
||||||
NS_NewRunnableFunction(
|
NS_NewRunnableFunction(
|
||||||
"dom::VideoDecoderManagerChild::DeallocateSurfaceDescriptorGPUVideo",
|
"VideoDecoderManagerChild::DeallocateSurfaceDescriptorGPUVideo",
|
||||||
[ref, sd]() {
|
[ref, sd]() {
|
||||||
if (ref->CanSend()) {
|
if (ref->CanSend()) {
|
||||||
ref->SendDeallocateSurfaceDescriptorGPUVideo(sd);
|
ref->SendDeallocateSurfaceDescriptorGPUVideo(sd);
|
||||||
|
@ -254,5 +253,4 @@ void VideoDecoderManagerChild::HandleFatalError(const char* aMsg) const {
|
||||||
dom::ContentChild::FatalErrorIfNotUsingGPUProcess(aMsg, OtherPid());
|
dom::ContentChild::FatalErrorIfNotUsingGPUProcess(aMsg, OtherPid());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace dom
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
|
@ -3,17 +3,16 @@
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
#ifndef include_dom_ipc_VideoDecoderManagerChild_h
|
#ifndef include_ipc_VideoDecoderManagerChild_h
|
||||||
#define include_dom_ipc_VideoDecoderManagerChild_h
|
#define include_ipc_VideoDecoderManagerChild_h
|
||||||
|
|
||||||
#include "mozilla/RefPtr.h"
|
#include "mozilla/RefPtr.h"
|
||||||
#include "mozilla/dom/PVideoDecoderManagerChild.h"
|
#include "mozilla/PVideoDecoderManagerChild.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace gfx {
|
namespace gfx {
|
||||||
class SourceSurface;
|
class SourceSurface;
|
||||||
}
|
}
|
||||||
namespace dom {
|
|
||||||
|
|
||||||
class VideoDecoderManagerChild final : public PVideoDecoderManagerChild,
|
class VideoDecoderManagerChild final : public PVideoDecoderManagerChild,
|
||||||
public mozilla::ipc::IShmemAllocator {
|
public mozilla::ipc::IShmemAllocator {
|
||||||
|
@ -93,7 +92,6 @@ class VideoDecoderManagerChild final : public PVideoDecoderManagerChild,
|
||||||
bool mCanSend;
|
bool mCanSend;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace dom
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
||||||
#endif // include_dom_ipc_VideoDecoderManagerChild_h
|
#endif // include_ipc_VideoDecoderManagerChild_h
|
||||||
|
|
|
@ -30,8 +30,6 @@ extern const nsCString GetFoundD3D11BlacklistedDLL();
|
||||||
extern const nsCString GetFoundD3D9BlacklistedDLL();
|
extern const nsCString GetFoundD3D9BlacklistedDLL();
|
||||||
#endif // XP_WIN
|
#endif // XP_WIN
|
||||||
|
|
||||||
namespace dom {
|
|
||||||
|
|
||||||
using namespace ipc;
|
using namespace ipc;
|
||||||
using namespace layers;
|
using namespace layers;
|
||||||
using namespace gfx;
|
using namespace gfx;
|
||||||
|
@ -58,7 +56,7 @@ class VideoDecoderManagerThreadHolder {
|
||||||
private:
|
private:
|
||||||
~VideoDecoderManagerThreadHolder() {
|
~VideoDecoderManagerThreadHolder() {
|
||||||
NS_DispatchToMainThread(
|
NS_DispatchToMainThread(
|
||||||
NS_NewRunnableFunction("dom::VideoDecoderManagerThreadHolder::~"
|
NS_NewRunnableFunction("VideoDecoderManagerThreadHolder::~"
|
||||||
"VideoDecoderManagerThreadHolder",
|
"VideoDecoderManagerThreadHolder",
|
||||||
[]() -> void {
|
[]() -> void {
|
||||||
sVideoDecoderManagerThread->Shutdown();
|
sVideoDecoderManagerThread->Shutdown();
|
||||||
|
@ -116,7 +114,7 @@ void VideoDecoderManagerParent::StartupThreads() {
|
||||||
NS_DISPATCH_NORMAL);
|
NS_DISPATCH_NORMAL);
|
||||||
#endif
|
#endif
|
||||||
sVideoDecoderManagerThread->Dispatch(
|
sVideoDecoderManagerThread->Dispatch(
|
||||||
NS_NewRunnableFunction("dom::VideoDecoderManagerParent::StartupThreads",
|
NS_NewRunnableFunction("VideoDecoderManagerParent::StartupThreads",
|
||||||
[]() { layers::VideoBridgeChild::Startup(); }),
|
[]() { layers::VideoBridgeChild::Startup(); }),
|
||||||
NS_DISPATCH_NORMAL);
|
NS_DISPATCH_NORMAL);
|
||||||
|
|
||||||
|
@ -140,9 +138,9 @@ void VideoDecoderManagerParent::ShutdownThreads() {
|
||||||
|
|
||||||
void VideoDecoderManagerParent::ShutdownVideoBridge() {
|
void VideoDecoderManagerParent::ShutdownVideoBridge() {
|
||||||
if (sVideoDecoderManagerThread) {
|
if (sVideoDecoderManagerThread) {
|
||||||
RefPtr<Runnable> task = NS_NewRunnableFunction(
|
RefPtr<Runnable> task =
|
||||||
"dom::VideoDecoderManagerParent::ShutdownVideoBridge",
|
NS_NewRunnableFunction("VideoDecoderManagerParent::ShutdownVideoBridge",
|
||||||
[]() { VideoBridgeChild::Shutdown(); });
|
[]() { VideoBridgeChild::Shutdown(); });
|
||||||
SyncRunnable::DispatchToThread(sVideoDecoderManagerThread, task);
|
SyncRunnable::DispatchToThread(sVideoDecoderManagerThread, task);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -166,7 +164,7 @@ bool VideoDecoderManagerParent::CreateForContent(
|
||||||
|
|
||||||
RefPtr<Runnable> task =
|
RefPtr<Runnable> task =
|
||||||
NewRunnableMethod<Endpoint<PVideoDecoderManagerParent>&&>(
|
NewRunnableMethod<Endpoint<PVideoDecoderManagerParent>&&>(
|
||||||
"dom::VideoDecoderManagerParent::Open", parent,
|
"VideoDecoderManagerParent::Open", parent,
|
||||||
&VideoDecoderManagerParent::Open, std::move(aEndpoint));
|
&VideoDecoderManagerParent::Open, std::move(aEndpoint));
|
||||||
sVideoDecoderManagerThread->Dispatch(task.forget(), NS_DISPATCH_NORMAL);
|
sVideoDecoderManagerThread->Dispatch(task.forget(), NS_DISPATCH_NORMAL);
|
||||||
return true;
|
return true;
|
||||||
|
@ -279,5 +277,4 @@ VideoDecoderManagerParent::RecvDeallocateSurfaceDescriptorGPUVideo(
|
||||||
return IPC_OK();
|
return IPC_OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace dom
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
|
@ -3,13 +3,12 @@
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
#ifndef include_dom_ipc_VideoDecoderManagerParent_h
|
#ifndef include_ipc_VideoDecoderManagerParent_h
|
||||||
#define include_dom_ipc_VideoDecoderManagerParent_h
|
#define include_ipc_VideoDecoderManagerParent_h
|
||||||
|
|
||||||
#include "mozilla/dom/PVideoDecoderManagerParent.h"
|
#include "mozilla/PVideoDecoderManagerParent.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
|
||||||
|
|
||||||
class VideoDecoderManagerThreadHolder;
|
class VideoDecoderManagerThreadHolder;
|
||||||
|
|
||||||
|
@ -62,7 +61,6 @@ class VideoDecoderManagerParent final : public PVideoDecoderManagerParent {
|
||||||
RefPtr<VideoDecoderManagerThreadHolder> mThreadHolder;
|
RefPtr<VideoDecoderManagerThreadHolder> mThreadHolder;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace dom
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
||||||
#endif // include_dom_ipc_VideoDecoderManagerParent_h
|
#endif // include_dom_ipc_VideoDecoderManagerParent_h
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
|
||||||
|
|
||||||
using base::Thread;
|
using base::Thread;
|
||||||
using media::TimeUnit;
|
using media::TimeUnit;
|
||||||
|
@ -280,5 +279,4 @@ bool VideoDecoderParent::OnManagerThread() {
|
||||||
return mParent->OnManagerThread();
|
return mParent->OnManagerThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace dom
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
|
@ -3,19 +3,18 @@
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
#ifndef include_dom_ipc_VideoDecoderParent_h
|
#ifndef include_ipc_VideoDecoderParent_h
|
||||||
#define include_dom_ipc_VideoDecoderParent_h
|
#define include_ipc_VideoDecoderParent_h
|
||||||
|
|
||||||
#include "ImageContainer.h"
|
#include "ImageContainer.h"
|
||||||
#include "MediaData.h"
|
#include "MediaData.h"
|
||||||
#include "PlatformDecoderModule.h"
|
#include "PlatformDecoderModule.h"
|
||||||
#include "VideoDecoderManagerParent.h"
|
#include "VideoDecoderManagerParent.h"
|
||||||
#include "mozilla/MozPromise.h"
|
#include "mozilla/MozPromise.h"
|
||||||
#include "mozilla/dom/PVideoDecoderParent.h"
|
#include "mozilla/PVideoDecoderParent.h"
|
||||||
#include "mozilla/layers/TextureForwarder.h"
|
#include "mozilla/layers/TextureForwarder.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
|
||||||
|
|
||||||
class KnowsCompositorVideo;
|
class KnowsCompositorVideo;
|
||||||
|
|
||||||
|
@ -62,7 +61,6 @@ class VideoDecoderParent final : public PVideoDecoderParent {
|
||||||
bool mDestroyed;
|
bool mDestroyed;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace dom
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
||||||
#endif // include_dom_ipc_VideoDecoderParent_h
|
#endif // include_ipc_VideoDecoderParent_h
|
||||||
|
|
|
@ -25,12 +25,12 @@ EXPORTS.mozilla += [
|
||||||
'RemoteDecoderManagerParent.h',
|
'RemoteDecoderManagerParent.h',
|
||||||
'RemoteDecoderModule.h',
|
'RemoteDecoderModule.h',
|
||||||
'RemoteMediaDataDecoder.h',
|
'RemoteMediaDataDecoder.h',
|
||||||
|
'VideoDecoderManagerChild.h',
|
||||||
|
'VideoDecoderManagerParent.h',
|
||||||
]
|
]
|
||||||
|
|
||||||
EXPORTS.mozilla.dom += [
|
EXPORTS.mozilla.dom += [
|
||||||
'MediaIPCUtils.h',
|
'MediaIPCUtils.h',
|
||||||
'VideoDecoderManagerChild.h',
|
|
||||||
'VideoDecoderManagerParent.h',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
SOURCES += [
|
SOURCES += [
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
#include "mozilla/Assertions.h"
|
#include "mozilla/Assertions.h"
|
||||||
#include "mozilla/Telemetry.h"
|
#include "mozilla/Telemetry.h"
|
||||||
#include "mozilla/TimeStamp.h"
|
#include "mozilla/TimeStamp.h"
|
||||||
|
#include "mozilla/VideoDecoderManagerChild.h"
|
||||||
|
#include "mozilla/VideoDecoderManagerParent.h"
|
||||||
#include "mozilla/dom/MemoryReportRequest.h"
|
#include "mozilla/dom/MemoryReportRequest.h"
|
||||||
#include "mozilla/dom/VideoDecoderManagerChild.h"
|
|
||||||
#include "mozilla/dom/VideoDecoderManagerParent.h"
|
|
||||||
#include "mozilla/gfx/2D.h"
|
#include "mozilla/gfx/2D.h"
|
||||||
#include "mozilla/gfx/gfxVars.h"
|
#include "mozilla/gfx/gfxVars.h"
|
||||||
#include "mozilla/image/ImageMemoryReporter.h"
|
#include "mozilla/image/ImageMemoryReporter.h"
|
||||||
|
@ -397,7 +397,7 @@ mozilla::ipc::IPCResult GPUParent::RecvNewContentVRManager(
|
||||||
|
|
||||||
mozilla::ipc::IPCResult GPUParent::RecvNewContentVideoDecoderManager(
|
mozilla::ipc::IPCResult GPUParent::RecvNewContentVideoDecoderManager(
|
||||||
Endpoint<PVideoDecoderManagerParent>&& aEndpoint) {
|
Endpoint<PVideoDecoderManagerParent>&& aEndpoint) {
|
||||||
if (!dom::VideoDecoderManagerParent::CreateForContent(std::move(aEndpoint))) {
|
if (!VideoDecoderManagerParent::CreateForContent(std::move(aEndpoint))) {
|
||||||
return IPC_FAIL_NO_REASON(this);
|
return IPC_FAIL_NO_REASON(this);
|
||||||
}
|
}
|
||||||
return IPC_OK();
|
return IPC_OK();
|
||||||
|
@ -485,7 +485,7 @@ void GPUParent::ActorDestroy(ActorDestroyReason aWhy) {
|
||||||
mVsyncBridge->Shutdown();
|
mVsyncBridge->Shutdown();
|
||||||
mVsyncBridge = nullptr;
|
mVsyncBridge = nullptr;
|
||||||
}
|
}
|
||||||
dom::VideoDecoderManagerParent::ShutdownVideoBridge();
|
VideoDecoderManagerParent::ShutdownVideoBridge();
|
||||||
CompositorThreadHolder::Shutdown();
|
CompositorThreadHolder::Shutdown();
|
||||||
// There is a case that RenderThread exists when gfxVars::UseWebRender() is
|
// There is a case that RenderThread exists when gfxVars::UseWebRender() is
|
||||||
// false. This could happen when WebRender was fallbacked to compositor.
|
// false. This could happen when WebRender was fallbacked to compositor.
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
#include "mozilla/Sprintf.h"
|
#include "mozilla/Sprintf.h"
|
||||||
#include "mozilla/StaticPtr.h"
|
#include "mozilla/StaticPtr.h"
|
||||||
#include "mozilla/StaticPrefs.h"
|
#include "mozilla/StaticPrefs.h"
|
||||||
|
#include "mozilla/VideoDecoderManagerChild.h"
|
||||||
|
#include "mozilla/VideoDecoderManagerParent.h"
|
||||||
#include "mozilla/dom/ContentParent.h"
|
#include "mozilla/dom/ContentParent.h"
|
||||||
#include "mozilla/gfx/gfxVars.h"
|
#include "mozilla/gfx/gfxVars.h"
|
||||||
#include "mozilla/layers/APZCTreeManagerChild.h"
|
#include "mozilla/layers/APZCTreeManagerChild.h"
|
||||||
|
@ -37,8 +39,6 @@
|
||||||
#include "VsyncBridgeChild.h"
|
#include "VsyncBridgeChild.h"
|
||||||
#include "VsyncIOThreadHolder.h"
|
#include "VsyncIOThreadHolder.h"
|
||||||
#include "VsyncSource.h"
|
#include "VsyncSource.h"
|
||||||
#include "mozilla/dom/VideoDecoderManagerChild.h"
|
|
||||||
#include "mozilla/dom/VideoDecoderManagerParent.h"
|
|
||||||
#include "nsExceptionHandler.h"
|
#include "nsExceptionHandler.h"
|
||||||
#include "nsPrintfCString.h"
|
#include "nsPrintfCString.h"
|
||||||
|
|
||||||
|
@ -767,7 +767,7 @@ bool GPUProcessManager::CreateContentBridges(
|
||||||
ipc::Endpoint<PCompositorManagerChild>* aOutCompositor,
|
ipc::Endpoint<PCompositorManagerChild>* aOutCompositor,
|
||||||
ipc::Endpoint<PImageBridgeChild>* aOutImageBridge,
|
ipc::Endpoint<PImageBridgeChild>* aOutImageBridge,
|
||||||
ipc::Endpoint<PVRManagerChild>* aOutVRBridge,
|
ipc::Endpoint<PVRManagerChild>* aOutVRBridge,
|
||||||
ipc::Endpoint<dom::PVideoDecoderManagerChild>* aOutVideoManager,
|
ipc::Endpoint<PVideoDecoderManagerChild>* aOutVideoManager,
|
||||||
nsTArray<uint32_t>* aNamespaces) {
|
nsTArray<uint32_t>* aNamespaces) {
|
||||||
if (!CreateContentCompositorManager(aOtherProcess, aOutCompositor) ||
|
if (!CreateContentCompositorManager(aOtherProcess, aOutCompositor) ||
|
||||||
!CreateContentImageBridge(aOtherProcess, aOutImageBridge) ||
|
!CreateContentImageBridge(aOtherProcess, aOutImageBridge) ||
|
||||||
|
@ -879,16 +879,16 @@ bool GPUProcessManager::CreateContentVRManager(
|
||||||
|
|
||||||
void GPUProcessManager::CreateContentVideoDecoderManager(
|
void GPUProcessManager::CreateContentVideoDecoderManager(
|
||||||
base::ProcessId aOtherProcess,
|
base::ProcessId aOtherProcess,
|
||||||
ipc::Endpoint<dom::PVideoDecoderManagerChild>* aOutEndpoint) {
|
ipc::Endpoint<PVideoDecoderManagerChild>* aOutEndpoint) {
|
||||||
if (!EnsureGPUReady() || !StaticPrefs::MediaGpuProcessDecoder() ||
|
if (!EnsureGPUReady() || !StaticPrefs::MediaGpuProcessDecoder() ||
|
||||||
!mDecodeVideoOnGpuProcess) {
|
!mDecodeVideoOnGpuProcess) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ipc::Endpoint<dom::PVideoDecoderManagerParent> parentPipe;
|
ipc::Endpoint<PVideoDecoderManagerParent> parentPipe;
|
||||||
ipc::Endpoint<dom::PVideoDecoderManagerChild> childPipe;
|
ipc::Endpoint<PVideoDecoderManagerChild> childPipe;
|
||||||
|
|
||||||
nsresult rv = dom::PVideoDecoderManager::CreateEndpoints(
|
nsresult rv = PVideoDecoderManager::CreateEndpoints(
|
||||||
mGPUChild->OtherPid(), aOtherProcess, &parentPipe, &childPipe);
|
mGPUChild->OtherPid(), aOtherProcess, &parentPipe, &childPipe);
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
gfxCriticalNote << "Could not create content video decoder: "
|
gfxCriticalNote << "Could not create content video decoder: "
|
||||||
|
|
|
@ -24,6 +24,7 @@ class nsBaseWidget;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
class MemoryReportingProcess;
|
class MemoryReportingProcess;
|
||||||
|
class PVideoDecoderManagerChild;
|
||||||
namespace layers {
|
namespace layers {
|
||||||
class IAPZCTreeManager;
|
class IAPZCTreeManager;
|
||||||
class CompositorOptions;
|
class CompositorOptions;
|
||||||
|
@ -42,7 +43,6 @@ class CompositorWidget;
|
||||||
namespace dom {
|
namespace dom {
|
||||||
class ContentParent;
|
class ContentParent;
|
||||||
class TabParent;
|
class TabParent;
|
||||||
class PVideoDecoderManagerChild;
|
|
||||||
} // namespace dom
|
} // namespace dom
|
||||||
namespace ipc {
|
namespace ipc {
|
||||||
class GeckoChildProcessHost;
|
class GeckoChildProcessHost;
|
||||||
|
@ -101,7 +101,7 @@ class GPUProcessManager final : public GPUProcessHost::Listener {
|
||||||
mozilla::ipc::Endpoint<PCompositorManagerChild>* aOutCompositor,
|
mozilla::ipc::Endpoint<PCompositorManagerChild>* aOutCompositor,
|
||||||
mozilla::ipc::Endpoint<PImageBridgeChild>* aOutImageBridge,
|
mozilla::ipc::Endpoint<PImageBridgeChild>* aOutImageBridge,
|
||||||
mozilla::ipc::Endpoint<PVRManagerChild>* aOutVRBridge,
|
mozilla::ipc::Endpoint<PVRManagerChild>* aOutVRBridge,
|
||||||
mozilla::ipc::Endpoint<dom::PVideoDecoderManagerChild>* aOutVideoManager,
|
mozilla::ipc::Endpoint<PVideoDecoderManagerChild>* aOutVideoManager,
|
||||||
nsTArray<uint32_t>* aNamespaces);
|
nsTArray<uint32_t>* aNamespaces);
|
||||||
|
|
||||||
// Maps the layer tree and process together so that aOwningPID is allowed
|
// Maps the layer tree and process together so that aOwningPID is allowed
|
||||||
|
@ -191,7 +191,7 @@ class GPUProcessManager final : public GPUProcessHost::Listener {
|
||||||
mozilla::ipc::Endpoint<PVRManagerChild>* aOutEndpoint);
|
mozilla::ipc::Endpoint<PVRManagerChild>* aOutEndpoint);
|
||||||
void CreateContentVideoDecoderManager(
|
void CreateContentVideoDecoderManager(
|
||||||
base::ProcessId aOtherProcess,
|
base::ProcessId aOtherProcess,
|
||||||
mozilla::ipc::Endpoint<dom::PVideoDecoderManagerChild>* aOutEndPoint);
|
mozilla::ipc::Endpoint<PVideoDecoderManagerChild>* aOutEndPoint);
|
||||||
|
|
||||||
// Called from RemoteCompositorSession. We track remote sessions so we can
|
// Called from RemoteCompositorSession. We track remote sessions so we can
|
||||||
// notify their owning widgets that the session must be restarted.
|
// notify their owning widgets that the session must be restarted.
|
||||||
|
|
|
@ -28,7 +28,7 @@ class GPUVideoImage final : public Image {
|
||||||
friend class gl::GLBlitHelper;
|
friend class gl::GLBlitHelper;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GPUVideoImage(dom::VideoDecoderManagerChild* aManager,
|
GPUVideoImage(VideoDecoderManagerChild* aManager,
|
||||||
const SurfaceDescriptorGPUVideo& aSD, const gfx::IntSize& aSize)
|
const SurfaceDescriptorGPUVideo& aSD, const gfx::IntSize& aSize)
|
||||||
: Image(nullptr, ImageFormat::GPU_VIDEO), mSize(aSize) {
|
: Image(nullptr, ImageFormat::GPU_VIDEO), mSize(aSize) {
|
||||||
// Create the TextureClient immediately since the GPUVideoTextureData
|
// Create the TextureClient immediately since the GPUVideoTextureData
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "GPUVideoTextureClient.h"
|
#include "GPUVideoTextureClient.h"
|
||||||
#include "mozilla/dom/VideoDecoderManagerChild.h"
|
#include "mozilla/VideoDecoderManagerChild.h"
|
||||||
#include "mozilla/gfx/2D.h"
|
#include "mozilla/gfx/2D.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
@ -13,9 +13,9 @@ namespace layers {
|
||||||
|
|
||||||
using namespace gfx;
|
using namespace gfx;
|
||||||
|
|
||||||
GPUVideoTextureData::GPUVideoTextureData(
|
GPUVideoTextureData::GPUVideoTextureData(VideoDecoderManagerChild* aManager,
|
||||||
dom::VideoDecoderManagerChild* aManager,
|
const SurfaceDescriptorGPUVideo& aSD,
|
||||||
const SurfaceDescriptorGPUVideo& aSD, const gfx::IntSize& aSize)
|
const gfx::IntSize& aSize)
|
||||||
: mManager(aManager), mSD(aSD), mSize(aSize) {}
|
: mManager(aManager), mSD(aSD), mSize(aSize) {}
|
||||||
|
|
||||||
GPUVideoTextureData::~GPUVideoTextureData() {}
|
GPUVideoTextureData::~GPUVideoTextureData() {}
|
||||||
|
|
|
@ -13,14 +13,13 @@ namespace mozilla {
|
||||||
namespace gfx {
|
namespace gfx {
|
||||||
class SourceSurface;
|
class SourceSurface;
|
||||||
}
|
}
|
||||||
namespace dom {
|
|
||||||
class VideoDecoderManagerChild;
|
class VideoDecoderManagerChild;
|
||||||
}
|
|
||||||
namespace layers {
|
namespace layers {
|
||||||
|
|
||||||
class GPUVideoTextureData : public TextureData {
|
class GPUVideoTextureData : public TextureData {
|
||||||
public:
|
public:
|
||||||
GPUVideoTextureData(dom::VideoDecoderManagerChild* aManager,
|
GPUVideoTextureData(VideoDecoderManagerChild* aManager,
|
||||||
const SurfaceDescriptorGPUVideo& aSD,
|
const SurfaceDescriptorGPUVideo& aSD,
|
||||||
const gfx::IntSize& aSize);
|
const gfx::IntSize& aSize);
|
||||||
~GPUVideoTextureData();
|
~GPUVideoTextureData();
|
||||||
|
@ -42,7 +41,7 @@ class GPUVideoTextureData : public TextureData {
|
||||||
virtual GPUVideoTextureData* AsGPUVideoTextureData() override { return this; }
|
virtual GPUVideoTextureData* AsGPUVideoTextureData() override { return this; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
RefPtr<dom::VideoDecoderManagerChild> mManager;
|
RefPtr<VideoDecoderManagerChild> mManager;
|
||||||
SurfaceDescriptorGPUVideo mSD;
|
SurfaceDescriptorGPUVideo mSD;
|
||||||
gfx::IntSize mSize;
|
gfx::IntSize mSize;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "GPUVideoTextureHost.h"
|
#include "GPUVideoTextureHost.h"
|
||||||
#include "mozilla/dom/VideoDecoderManagerParent.h"
|
#include "mozilla/VideoDecoderManagerParent.h"
|
||||||
#include "ImageContainer.h"
|
#include "ImageContainer.h"
|
||||||
#include "mozilla/layers/VideoBridgeParent.h"
|
#include "mozilla/layers/VideoBridgeParent.h"
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "mozilla/Poison.h"
|
#include "mozilla/Poison.h"
|
||||||
#include "mozilla/RemoteDecoderManagerChild.h"
|
#include "mozilla/RemoteDecoderManagerChild.h"
|
||||||
#include "mozilla/SharedThreadPool.h"
|
#include "mozilla/SharedThreadPool.h"
|
||||||
|
#include "mozilla/VideoDecoderManagerChild.h"
|
||||||
#include "mozilla/XPCOM.h"
|
#include "mozilla/XPCOM.h"
|
||||||
#include "nsXULAppAPI.h"
|
#include "nsXULAppAPI.h"
|
||||||
|
|
||||||
|
@ -22,7 +23,6 @@
|
||||||
|
|
||||||
#include "mozilla/layers/ImageBridgeChild.h"
|
#include "mozilla/layers/ImageBridgeChild.h"
|
||||||
#include "mozilla/layers/CompositorBridgeParent.h"
|
#include "mozilla/layers/CompositorBridgeParent.h"
|
||||||
#include "mozilla/dom/VideoDecoderManagerChild.h"
|
|
||||||
|
|
||||||
#include "prlink.h"
|
#include "prlink.h"
|
||||||
|
|
||||||
|
@ -815,7 +815,7 @@ nsresult ShutdownXPCOM(nsIServiceManager* aServMgr) {
|
||||||
// are triggered by the NS_XPCOM_SHUTDOWN_OBSERVER_ID notification.
|
// are triggered by the NS_XPCOM_SHUTDOWN_OBSERVER_ID notification.
|
||||||
NS_ProcessPendingEvents(thread);
|
NS_ProcessPendingEvents(thread);
|
||||||
gfxPlatform::ShutdownLayersIPC();
|
gfxPlatform::ShutdownLayersIPC();
|
||||||
mozilla::dom::VideoDecoderManagerChild::Shutdown();
|
mozilla::VideoDecoderManagerChild::Shutdown();
|
||||||
mozilla::RemoteDecoderManagerChild::Shutdown();
|
mozilla::RemoteDecoderManagerChild::Shutdown();
|
||||||
|
|
||||||
mozilla::scache::StartupCache::DeleteSingleton();
|
mozilla::scache::StartupCache::DeleteSingleton();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче