mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 06:48:38 +09:00
parent
f75592fd13
commit
9b1124ccbd
99 changed files with 6 additions and 15647 deletions
|
|
@ -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"
|
||||
|
|
@ -196,36 +194,6 @@ GPUProcessManager::EnsureImageBridgeChild()
|
|||
ImageBridgeChild::InitWithGPUProcess(Move(childPipe));
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue