diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-11-28 23:10:30 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-11-28 23:10:30 +0100 |
commit | 088c3cf890cc2d96f2093e2116612cbf65bfaeea (patch) | |
tree | b4d3c68155f2de43432dd00c167d3029732be146 /gfx/ipc | |
parent | ec3829bf7266ebec111f41268c6c491356576df1 (diff) | |
parent | fe11e14d3cfc2900facf152257acda87280b6cdc (diff) | |
download | UXP-088c3cf890cc2d96f2093e2116612cbf65bfaeea.tar UXP-088c3cf890cc2d96f2093e2116612cbf65bfaeea.tar.gz UXP-088c3cf890cc2d96f2093e2116612cbf65bfaeea.tar.lz UXP-088c3cf890cc2d96f2093e2116612cbf65bfaeea.tar.xz UXP-088c3cf890cc2d96f2093e2116612cbf65bfaeea.zip |
Merge branch 'master' into Sync-weave
Diffstat (limited to 'gfx/ipc')
-rw-r--r-- | gfx/ipc/GPUParent.cpp | 16 | ||||
-rw-r--r-- | gfx/ipc/GPUParent.h | 2 | ||||
-rw-r--r-- | gfx/ipc/GPUProcessManager.cpp | 71 | ||||
-rw-r--r-- | gfx/ipc/GPUProcessManager.h | 5 | ||||
-rw-r--r-- | gfx/ipc/PGPU.ipdl | 3 |
5 files changed, 1 insertions, 96 deletions
diff --git a/gfx/ipc/GPUParent.cpp b/gfx/ipc/GPUParent.cpp index b693f4728..9ff6cba9e 100644 --- a/gfx/ipc/GPUParent.cpp +++ b/gfx/ipc/GPUParent.cpp @@ -28,8 +28,6 @@ #include "nsThreadManager.h" #include "prenv.h" #include "ProcessUtils.h" -#include "VRManager.h" -#include "VRManagerParent.h" #include "VsyncBridgeParent.h" #if defined(XP_WIN) # include "DeviceManagerD3D9.h" @@ -100,7 +98,6 @@ GPUParent::Init(base::ProcessId aParentPid, CompositorThreadHolder::Start(); APZThreadUtils::SetControllerThread(CompositorThreadHolder::Loop()); APZCTreeManager::InitializeGlobalState(); - VRManager::ManagerInit(); LayerTreeOwnerTracker::Initialize(); mozilla::ipc::SetThisProcessName("GPU Process"); #ifdef XP_WIN @@ -203,13 +200,6 @@ GPUParent::RecvInitImageBridge(Endpoint<PImageBridgeParent>&& aEndpoint) } bool -GPUParent::RecvInitVRManager(Endpoint<PVRManagerParent>&& aEndpoint) -{ - VRManagerParent::CreateForGPUProcess(Move(aEndpoint)); - return true; -} - -bool GPUParent::RecvUpdatePref(const GfxPrefSetting& setting) { gfxPrefs::Pref* pref = gfxPrefs::all()[setting.index()]; @@ -302,12 +292,6 @@ GPUParent::RecvNewContentImageBridge(Endpoint<PImageBridgeParent>&& aEndpoint) } bool -GPUParent::RecvNewContentVRManager(Endpoint<PVRManagerParent>&& aEndpoint) -{ - return VRManagerParent::CreateForContent(Move(aEndpoint)); -} - -bool GPUParent::RecvNewContentVideoDecoderManager(Endpoint<PVideoDecoderManagerParent>&& aEndpoint) { return dom::VideoDecoderManagerParent::CreateForContent(Move(aEndpoint)); diff --git a/gfx/ipc/GPUParent.h b/gfx/ipc/GPUParent.h index 126efce50..3c0494bd4 100644 --- a/gfx/ipc/GPUParent.h +++ b/gfx/ipc/GPUParent.h @@ -32,7 +32,6 @@ public: const DevicePrefs& devicePrefs) override; bool RecvInitVsyncBridge(Endpoint<PVsyncBridgeParent>&& aVsyncEndpoint) override; bool RecvInitImageBridge(Endpoint<PImageBridgeParent>&& aEndpoint) override; - bool RecvInitVRManager(Endpoint<PVRManagerParent>&& aEndpoint) override; bool RecvUpdatePref(const GfxPrefSetting& pref) override; bool RecvUpdateVar(const GfxVarUpdate& pref) override; bool RecvNewWidgetCompositor( @@ -43,7 +42,6 @@ public: const IntSize& aSurfaceSize) override; bool RecvNewContentCompositorBridge(Endpoint<PCompositorBridgeParent>&& aEndpoint) override; bool RecvNewContentImageBridge(Endpoint<PImageBridgeParent>&& aEndpoint) override; - bool RecvNewContentVRManager(Endpoint<PVRManagerParent>&& aEndpoint) override; bool RecvNewContentVideoDecoderManager(Endpoint<PVideoDecoderManagerParent>&& aEndpoint) override; bool RecvGetDeviceStatus(GPUDeviceData* aOutStatus) override; bool RecvAddLayerTreeIdMapping(nsTArray<LayerTreeIdMapping>&& aMappings) override; diff --git a/gfx/ipc/GPUProcessManager.cpp b/gfx/ipc/GPUProcessManager.cpp index 0b55cd9b7..8aaf0f1d0 100644 --- a/gfx/ipc/GPUProcessManager.cpp +++ b/gfx/ipc/GPUProcessManager.cpp @@ -22,8 +22,6 @@ #endif #include "nsBaseWidget.h" #include "nsContentUtils.h" -#include "VRManagerChild.h" -#include "VRManagerParent.h" #include "VsyncBridgeChild.h" #include "VsyncIOThreadHolder.h" #include "VsyncSource.h" @@ -197,36 +195,6 @@ GPUProcessManager::EnsureImageBridgeChild() } void -GPUProcessManager::EnsureVRManager() -{ - if (VRManagerChild::IsCreated()) { - return; - } - - EnsureGPUReady(); - - if (!mGPUChild) { - VRManagerChild::InitSameProcess(); - return; - } - - ipc::Endpoint<PVRManagerParent> parentPipe; - ipc::Endpoint<PVRManagerChild> childPipe; - nsresult rv = PVRManager::CreateEndpoints( - mGPUChild->OtherPid(), - base::GetCurrentProcId(), - &parentPipe, - &childPipe); - if (NS_FAILED(rv)) { - DisableGPUProcess("Failed to create PVRManager endpoints"); - return; - } - - mGPUChild->SendInitVRManager(Move(parentPipe)); - VRManagerChild::InitWithGPUProcess(Move(childPipe)); -} - -void GPUProcessManager::OnProcessLaunchComplete(GPUProcessHost* aHost) { MOZ_ASSERT(mProcess && mProcess == aHost); @@ -488,7 +456,6 @@ GPUProcessManager::CreateTopLevelCompositor(nsBaseWidget* aWidget, EnsureGPUReady(); EnsureImageBridgeChild(); - EnsureVRManager(); if (mGPUChild) { RefPtr<CompositorSession> session = CreateRemoteSession( @@ -599,12 +566,10 @@ bool GPUProcessManager::CreateContentBridges(base::ProcessId aOtherProcess, ipc::Endpoint<PCompositorBridgeChild>* aOutCompositor, ipc::Endpoint<PImageBridgeChild>* aOutImageBridge, - ipc::Endpoint<PVRManagerChild>* aOutVRBridge, ipc::Endpoint<dom::PVideoDecoderManagerChild>* aOutVideoManager) { if (!CreateContentCompositorBridge(aOtherProcess, aOutCompositor) || - !CreateContentImageBridge(aOtherProcess, aOutImageBridge) || - !CreateContentVRManager(aOtherProcess, aOutVRBridge)) + !CreateContentImageBridge(aOtherProcess, aOutImageBridge)) { return false; } @@ -692,40 +657,6 @@ GPUProcessManager::GPUProcessPid() return gpuPid; } -bool -GPUProcessManager::CreateContentVRManager(base::ProcessId aOtherProcess, - ipc::Endpoint<PVRManagerChild>* aOutEndpoint) -{ - EnsureVRManager(); - - base::ProcessId gpuPid = mGPUChild - ? mGPUChild->OtherPid() - : base::GetCurrentProcId(); - - ipc::Endpoint<PVRManagerParent> parentPipe; - ipc::Endpoint<PVRManagerChild> childPipe; - nsresult rv = PVRManager::CreateEndpoints( - gpuPid, - aOtherProcess, - &parentPipe, - &childPipe); - if (NS_FAILED(rv)) { - gfxCriticalNote << "Could not create content compositor bridge: " << hexa(int(rv)); - return false; - } - - if (mGPUChild) { - mGPUChild->SendNewContentVRManager(Move(parentPipe)); - } else { - if (!VRManagerParent::CreateForContent(Move(parentPipe))) { - return false; - } - } - - *aOutEndpoint = Move(childPipe); - return true; -} - void GPUProcessManager::CreateContentVideoDecoderManager(base::ProcessId aOtherProcess, ipc::Endpoint<dom::PVideoDecoderManagerChild>* aOutEndpoint) diff --git a/gfx/ipc/GPUProcessManager.h b/gfx/ipc/GPUProcessManager.h index 84ed03609..5d4279094 100644 --- a/gfx/ipc/GPUProcessManager.h +++ b/gfx/ipc/GPUProcessManager.h @@ -45,7 +45,6 @@ namespace gfx { class GPUChild; class GPUProcessListener; -class PVRManagerChild; class VsyncBridgeChild; class VsyncIOThreadHolder; @@ -91,7 +90,6 @@ public: base::ProcessId aOtherProcess, ipc::Endpoint<PCompositorBridgeChild>* aOutCompositor, ipc::Endpoint<PImageBridgeChild>* aOutImageBridge, - ipc::Endpoint<PVRManagerChild>* aOutVRBridge, ipc::Endpoint<dom::PVideoDecoderManagerChild>* aOutVideoManager); // This returns a reference to the APZCTreeManager to which @@ -156,8 +154,6 @@ private: ipc::Endpoint<PCompositorBridgeChild>* aOutEndpoint); bool CreateContentImageBridge(base::ProcessId aOtherProcess, ipc::Endpoint<PImageBridgeChild>* aOutEndpoint); - bool CreateContentVRManager(base::ProcessId aOtherProcess, - ipc::Endpoint<PVRManagerChild>* aOutEndpoint); void CreateContentVideoDecoderManager(base::ProcessId aOtherProcess, ipc::Endpoint<dom::PVideoDecoderManagerChild>* aOutEndPoint); @@ -182,7 +178,6 @@ private: void ShutdownVsyncIOThread(); void EnsureImageBridgeChild(); - void EnsureVRManager(); RefPtr<CompositorSession> CreateRemoteSession( nsBaseWidget* aWidget, diff --git a/gfx/ipc/PGPU.ipdl b/gfx/ipc/PGPU.ipdl index d36c51394..a2c035c75 100644 --- a/gfx/ipc/PGPU.ipdl +++ b/gfx/ipc/PGPU.ipdl @@ -6,7 +6,6 @@ include GraphicsMessages; include protocol PCompositorBridge; include protocol PImageBridge; -include protocol PVRManager; include protocol PVsyncBridge; include protocol PVideoDecoderManager; @@ -47,7 +46,6 @@ parent: async InitVsyncBridge(Endpoint<PVsyncBridgeParent> endpoint); async InitImageBridge(Endpoint<PImageBridgeParent> endpoint); - async InitVRManager(Endpoint<PVRManagerParent> endpoint); // Called to update a gfx preference or variable. async UpdatePref(GfxPrefSetting pref); @@ -63,7 +61,6 @@ parent: // Create a new content-process compositor bridge. async NewContentCompositorBridge(Endpoint<PCompositorBridgeParent> endpoint); async NewContentImageBridge(Endpoint<PImageBridgeParent> endpoint); - async NewContentVRManager(Endpoint<PVRManagerParent> endpoint); async NewContentVideoDecoderManager(Endpoint<PVideoDecoderManagerParent> endpoint); // Called to notify the GPU process of who owns a layersId. |