From da855d65d1fbdd714190cab2c46130f7422f3699 Mon Sep 17 00:00:00 2001 From: Cosmin Sabou Date: Thu, 18 Jul 2019 12:54:25 +0300 Subject: [PATCH] Backed out changeset 2095b5ca1769 (bug 1566956) for causing Bug 1567002. a=backout --- dom/media/ipc/RemoteVideoDecoder.cpp | 19 ++----------------- gfx/layers/ipc/PVideoBridge.ipdl | 3 --- gfx/layers/ipc/VideoBridgeParent.h | 5 ----- 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/dom/media/ipc/RemoteVideoDecoder.cpp b/dom/media/ipc/RemoteVideoDecoder.cpp index 928a0a87b1fa..e3e82720700f 100644 --- a/dom/media/ipc/RemoteVideoDecoder.cpp +++ b/dom/media/ipc/RemoteVideoDecoder.cpp @@ -35,15 +35,11 @@ class KnowsCompositorVideo : public layers::KnowsCompositor { public: NS_INLINE_DECL_THREADSAFE_REFCOUNTING(KnowsCompositorVideo, override) - VideoBridgeChild* GetVideoBridge() { + layers::TextureForwarder* GetTextureForwarder() override { return mTextureFactoryIdentifier.mParentProcessType == GeckoProcessType_GPU ? VideoBridgeChild::GetSingletonToGPUProcess() : VideoBridgeChild::GetSingletonToParentProcess(); } - - layers::TextureForwarder* GetTextureForwarder() override { - return GetVideoBridge(); - } layers::LayersIPCActor* GetLayersIPCActor() override { return GetTextureForwarder(); } @@ -409,18 +405,7 @@ MediaResult RemoteVideoDecoderParent::ProcessDecodedData( MediaDataIPDL(data->mOffset, data->mTime, data->mTimecode, data->mDuration, data->mKeyframe), video->mDisplay, size, sd, video->mFrameID); - if (mKnowsCompositor) { - RefPtr parent = this; - mKnowsCompositor->GetVideoBridge()->SendFlush()->Then( - GetCurrentThreadSerialEventTarget(), __func__, - [parent, output](bool) { Unused << parent->SendOutput(output); }, - [parent](ResponseRejectReason&& aReason) { - parent->Error(NS_ERROR_DOM_MEDIA_NEED_NEW_DECODER); - }); - - } else { - Unused << SendOutput(output); - } + Unused << SendOutput(output); } return NS_OK; diff --git a/gfx/layers/ipc/PVideoBridge.ipdl b/gfx/layers/ipc/PVideoBridge.ipdl index 5d9026560647..5a4270981be7 100644 --- a/gfx/layers/ipc/PVideoBridge.ipdl +++ b/gfx/layers/ipc/PVideoBridge.ipdl @@ -26,9 +26,6 @@ sync protocol PVideoBridge parent: async PTexture(SurfaceDescriptor aSharedData, ReadLockDescriptor aReadLock, LayersBackend aBackend, TextureFlags aTextureFlags, uint64_t aSerial); - - async Flush() returns (bool result); - }; } // namespace diff --git a/gfx/layers/ipc/VideoBridgeParent.h b/gfx/layers/ipc/VideoBridgeParent.h index b649bc35ea5d..7e382958580b 100644 --- a/gfx/layers/ipc/VideoBridgeParent.h +++ b/gfx/layers/ipc/VideoBridgeParent.h @@ -33,11 +33,6 @@ class VideoBridgeParent final : public PVideoBridgeParent, const uint64_t& aSerial); bool DeallocPTextureParent(PTextureParent* actor); - mozilla::ipc::IPCResult RecvFlush(FlushResolver&& aResolver) { - aResolver(true); - return IPC_OK(); - } - // HostIPCAllocator base::ProcessId GetChildProcessId() override { return OtherPid(); } void NotifyNotUsed(PTextureParent* aTexture,