Wait for CreateCompositorDevices to finish before creating DeviceAttachmentsD3D11. (bug 1362145, r=bas)

This commit is contained in:
David Anderson 2017-05-05 01:04:19 -07:00
Родитель a991315918
Коммит 30e1319799
4 изменённых файлов: 7 добавлений и 9 удалений

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

@ -208,10 +208,6 @@ GPUParent::RecvInit(nsTArray<GfxPrefSetting>&& prefs,
RecvGetDeviceStatus(&data);
Unused << SendInitComplete(data);
#ifdef XP_WIN
DeviceManagerDx::PreloadAttachmentsOnCompositorThread();
#endif
Telemetry::AccumulateTimeDelta(Telemetry::GPU_PROCESS_INITIALIZATION_TIME_MS, mLaunchTime);
return IPC_OK();
}

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

@ -136,7 +136,12 @@ DeviceManagerDx::CreateCompositorDevices()
mD3D11Module.disown();
MOZ_ASSERT(mCompositorDevice);
return d3d11.IsEnabled();
if (!d3d11.IsEnabled()) {
return false;
}
PreloadAttachmentsOnCompositorThread();
return true;
}
void

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

@ -103,11 +103,11 @@ public:
void ForceDeviceReset(ForcedDeviceResetReason aReason);
void NotifyD3D9DeviceReset();
private:
// Pre-load any compositor resources that are expensive, and are needed when we
// attempt to create a compositor.
static void PreloadAttachmentsOnCompositorThread();
private:
IDXGIAdapter1 *GetDXGIAdapter();
void DisableD3D11AfterCrash();

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

@ -965,9 +965,6 @@ gfxPlatform::InitLayersIPC()
wr::RenderThread::Start();
}
layers::CompositorThreadHolder::Start();
#ifdef XP_WIN
gfx::DeviceManagerDx::PreloadAttachmentsOnCompositorThread();
#endif
}
}