mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Support compositor bridges from the content process to the GPU process. (bug 1282348 part 8, r=billm)
This commit is contained in:
parent
cce407eb5f
commit
8b62f958d0
@ -83,6 +83,12 @@ GPUParent::RecvNewWidgetCompositor(Endpoint<layers::PCompositorBridgeParent>&& a
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
GPUParent::RecvNewContentCompositorBridge(Endpoint<PCompositorBridgeParent>&& aEndpoint)
|
||||
{
|
||||
return CompositorBridgeParent::CreateForContent(Move(aEndpoint));
|
||||
}
|
||||
|
||||
void
|
||||
GPUParent::ActorDestroy(ActorDestroyReason aWhy)
|
||||
{
|
||||
|
@ -28,6 +28,7 @@ public:
|
||||
const CSSToLayoutDeviceScale& aScale,
|
||||
const bool& aUseExternalSurface,
|
||||
const IntSize& aSurfaceSize) override;
|
||||
bool RecvNewContentCompositorBridge(Endpoint<PCompositorBridgeParent>&& aEndpoint) override;
|
||||
|
||||
void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
};
|
||||
|
@ -283,8 +283,12 @@ GPUProcessManager::CreateContentCompositorBridge(base::ProcessId aOtherProcess,
|
||||
ipc::Endpoint<PCompositorBridgeParent> parentPipe;
|
||||
ipc::Endpoint<PCompositorBridgeChild> childPipe;
|
||||
|
||||
base::ProcessId gpuPid = mGPUChild
|
||||
? mGPUChild->OtherPid()
|
||||
: base::GetCurrentProcId();
|
||||
|
||||
nsresult rv = PCompositorBridge::CreateEndpoints(
|
||||
base::GetCurrentProcId(),
|
||||
gpuPid,
|
||||
aOtherProcess,
|
||||
&parentPipe,
|
||||
&childPipe);
|
||||
@ -293,8 +297,12 @@ GPUProcessManager::CreateContentCompositorBridge(base::ProcessId aOtherProcess,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!CompositorBridgeParent::CreateForContent(Move(parentPipe)))
|
||||
return false;
|
||||
if (mGPUChild) {
|
||||
mGPUChild->SendNewContentCompositorBridge(Move(parentPipe));
|
||||
} else {
|
||||
if (!CompositorBridgeParent::CreateForContent(Move(parentPipe)))
|
||||
return false;
|
||||
}
|
||||
|
||||
*aOutEndpoint = Move(childPipe);
|
||||
return true;
|
||||
|
@ -37,6 +37,9 @@ parent:
|
||||
CSSToLayoutDeviceScale scale,
|
||||
bool useExternalSurface,
|
||||
IntSize surfaceSize);
|
||||
|
||||
// Create a new content-process compositor bridge.
|
||||
async NewContentCompositorBridge(Endpoint<PCompositorBridgeParent> endpoint);
|
||||
};
|
||||
|
||||
} // namespace gfx
|
||||
|
Loading…
Reference in New Issue
Block a user