Bug 1494528 - Call GPUProcessManager::EnsureGPUReady() before accessing gfxVars::UseWebRender() r=aosmond

This commit is contained in:
sotaro 2018-09-28 09:06:26 +09:00
Родитель 7ed849f7d2
Коммит 6d9aae580d
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -1313,6 +1313,12 @@ nsBaseWidget::CreateCompositorSession(int aWidth,
do { do {
CreateCompositorVsyncDispatcher(); CreateCompositorVsyncDispatcher();
gfx::GPUProcessManager* gpu = gfx::GPUProcessManager::Get();
// Make sure GPU process is ready for use.
// If it failed to connect to GPU process, GPU process usage is disabled in EnsureGPUReady().
// It could update gfxVars and gfxConfigs.
gpu->EnsureGPUReady();
// If widget type does not supports acceleration, we use ClientLayerManager // If widget type does not supports acceleration, we use ClientLayerManager
// even when gfxVars::UseWebRender() is true. WebRender could coexist only // even when gfxVars::UseWebRender() is true. WebRender could coexist only
// with BasicCompositor. // with BasicCompositor.
@ -1338,7 +1344,6 @@ nsBaseWidget::CreateCompositorSession(int aWidth,
} }
bool retry = false; bool retry = false;
gfx::GPUProcessManager* gpu = gfx::GPUProcessManager::Get();
mCompositorSession = gpu->CreateTopLevelCompositor( mCompositorSession = gpu->CreateTopLevelCompositor(
this, this,
lm, lm,