Bug 1438408 - Shutdown RenderThread if it exists r=nical

This commit is contained in:
sotaro 2018-02-16 09:04:07 +09:00
Родитель 8819d6c766
Коммит e32352899f
2 изменённых файлов: 6 добавлений и 2 удалений

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

@ -462,7 +462,9 @@ GPUParent::ActorDestroy(ActorDestroyReason aWhy)
dom::VideoDecoderManagerParent::ShutdownVideoBridge();
CompositorThreadHolder::Shutdown();
VRListenerThreadHolder::Shutdown();
if (gfxVars::UseWebRender()) {
// There is a case that RenderThread exists when gfxVars::UseWebRender() is false.
// This could happen when WebRender was fallbacked to compositor.
if (wr::RenderThread::Get()) {
wr::RenderThread::ShutDown();
wr::WebRenderAPI::ShutdownExternalLogHandler();

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

@ -1052,7 +1052,9 @@ gfxPlatform::ShutdownLayersIPC()
// This has to happen after shutting down the child protocols.
layers::CompositorThreadHolder::Shutdown();
gfx::VRListenerThreadHolder::Shutdown();
if (gfxVars::UseWebRender()) {
// There is a case that RenderThread exists when gfxVars::UseWebRender() is false.
// This could happen when WebRender was fallbacked to compositor.
if (wr::RenderThread::Get()) {
wr::RenderThread::ShutDown();
Preferences::UnregisterCallback(WebRenderDebugPrefChangeCallback, WR_DEBUG_PREF);