Bug 1376590 - When disabling the GPU process, ensure its dependencies are initialized for the same process. r=dvander

This commit is contained in:
Andrew Osmond 2017-06-28 11:31:42 -07:00
parent df4d5a917f
commit e3fd385077
2 changed files with 17 additions and 3 deletions

View File

@ -179,6 +179,13 @@ GPUProcessManager::DisableGPUProcess(const char* aMessage)
DestroyProcess();
ShutdownVsyncIOThread();
// We may have been in the middle of guaranteeing our various services are
// available when one failed. Some callers may fallback to using the same
// process equivalent, and we need to make sure those services are setup
// correctly. We cannot re-enter DisableGPUProcess from this call because we
// know that it is disabled in the config above.
EnsureProtocolsReady();
}
bool
@ -200,6 +207,14 @@ GPUProcessManager::EnsureGPUReady()
return false;
}
void
GPUProcessManager::EnsureProtocolsReady()
{
EnsureCompositorManagerChild();
EnsureImageBridgeChild();
EnsureVRManager();
}
void
GPUProcessManager::EnsureCompositorManagerChild()
{
@ -641,9 +656,7 @@ GPUProcessManager::CreateTopLevelCompositor(nsBaseWidget* aWidget,
{
uint64_t layerTreeId = AllocateLayerTreeId();
EnsureCompositorManagerChild();
EnsureImageBridgeChild();
EnsureVRManager();
EnsureProtocolsReady();
RefPtr<CompositorSession> session;

View File

@ -221,6 +221,7 @@ private:
void EnsureVsyncIOThread();
void ShutdownVsyncIOThread();
void EnsureProtocolsReady();
void EnsureCompositorManagerChild();
void EnsureImageBridgeChild();
void EnsureVRManager();