Bug 1771344 - Add TextureClient::IsValid() check to PersistentBufferProviderShared::SetKnowsCompositor() r=gfx-reviewers,lsalzman

Device reset in test_device_reset.html replaces CompositorBridgeChild to a new one. And shutting down old CompositorBridgeChild also destroys TextureClients.

Differential Revision: https://phabricator.services.mozilla.com/D164175
This commit is contained in:
sotaro 2022-12-13 01:01:15 +00:00
Родитель 5fd296e7b8
Коммит 67f424d382
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -257,7 +257,7 @@ bool PersistentBufferProviderShared::SetKnowsCompositor(
// Get rid of everything else
Destroy();
if (prevTexture) {
if (prevTexture && prevTexture->IsValid()) {
RefPtr<TextureClient> newTexture =
CreateTexture(aKnowsCompositor, mFormat, mSize, mWillReadFrequently);