Bug 1750557 - Clear RenderTextureHosts in RenderThread::ShutDownTask() r=gfx-reviewers,aosmond

Need to destroy RenderTextureHosts in RenderThread::ShutDownTask().

Differential Revision: https://phabricator.services.mozilla.com/D136124
This commit is contained in:
sotaro 2022-01-19 00:05:48 +00:00
Родитель f2f55d39bc
Коммит 5de1ee0b12
1 изменённых файлов: 9 добавлений и 0 удалений

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

@ -156,6 +156,15 @@ void RenderThread::ShutDownTask(layers::SynchronousTask* aTask) {
MOZ_ASSERT(IsInRenderThread());
LOG("RenderThread::ShutDownTask()");
{
// Clear RenderTextureHosts
MutexAutoLock lock(mRenderTextureMapLock);
mRenderTexturesDeferred.clear();
mRenderTextures.clear();
mSyncObjectNeededRenderTextures.clear();
mRenderTextureOps.clear();
}
// Let go of our handle to the (internally ref-counted) thread pool.
mThreadPool.Release();
mThreadPoolLP.Release();