Bug 1672621 - Don't create new texture clients if our forwarder has gone away. r=jya
authorMatt Woodrow <mwoodrow@mozilla.com>
Sun, 25 Oct 2020 07:50:55 +0000
changeset 554350 a4341527c628b3ba77159a421f70da5adf9f8d54
parent 554349 f08534dd3713d20de0090e7d16ae9a465ed891b3
child 554351 2e15f7800a8f373c56290ff6e01a2e4a72be936a
push id37892
push usernbeleuzu@mozilla.com
push dateSun, 25 Oct 2020 21:41:16 +0000
treeherdermozilla-central@61c35792ca70 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1672621
milestone84.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1672621 - Don't create new texture clients if our forwarder has gone away. r=jya Differential Revision: https://phabricator.services.mozilla.com/D94540
gfx/layers/client/TextureClientRecycleAllocator.cpp
--- a/gfx/layers/client/TextureClientRecycleAllocator.cpp
+++ b/gfx/layers/client/TextureClientRecycleAllocator.cpp
@@ -137,17 +137,17 @@ already_AddRefed<TextureClient> TextureC
 already_AddRefed<TextureClient> TextureClientRecycleAllocator::CreateOrRecycle(
     ITextureClientAllocationHelper& aHelper) {
   MOZ_ASSERT(aHelper.mTextureFlags & TextureFlags::RECYCLE);
 
   RefPtr<TextureClientHolder> textureHolder;
 
   {
     MutexAutoLock lock(mLock);
-    if (mIsDestroyed) {
+    if (mIsDestroyed || !mKnowsCompositor->GetTextureForwarder()) {
       return nullptr;
     }
     if (!mPooledClients.empty()) {
       textureHolder = mPooledClients.top();
       mPooledClients.pop();
       // If the texture's allocator is not open or a pooled TextureClient is
       // not compatible, release it.
       if (!textureHolder->GetTextureClient()->GetAllocator()->IPCOpen() ||