/*static*/ void VRManagerChild::InitSameProcess() { MOZ_ASSERT(NS_IsMainThread()); MOZ_ASSERT(!sVRManagerChildSingleton); sVRManagerChildSingleton = new VRManagerChild(); sVRManagerParentSingleton = VRManagerParent::CreateSameProcess(); sVRManagerChildSingleton->Open(sVRManagerParentSingleton->GetIPCChannel(), mozilla::layers::CompositorThreadHolder::Loop(), mozilla::ipc::ChildSide); }
/*static*/ void VRManagerChild::StartUpSameProcess() { NS_ASSERTION(NS_IsMainThread(), "Should be on the main Thread!"); if (sVRManagerChildSingleton == nullptr) { sVRManagerChildSingleton = new VRManagerChild(); sVRManagerParentSingleton = VRManagerParent::CreateSameProcess(); sVRManagerChildSingleton->Open(sVRManagerParentSingleton->GetIPCChannel(), mozilla::layers::CompositorThreadHolder::Loop(), mozilla::ipc::ChildSide); } }
void UiCompositorControllerChild::OpenForSameProcess() { MOZ_ASSERT(sParent); MOZ_ASSERT(!sChild); MOZ_ASSERT(IsOnUiThread()); if (!Open(sParent->GetIPCChannel(), mozilla::layers::CompositorThreadHolder::Loop(), mozilla::ipc::ChildSide)) { sParent = nullptr; return; } AddRef(); sChild = this; DoCachedResize(); }