Bug 1432531 - Move FlushAsyncPaints so it is unconditionally run in CompositorBridgeChild::Destroy. r=nical

--HG--
extra : rebase_source : a6d6739d363ee144b8c721bccf62bcb139339880
This commit is contained in:
Ryan Hunt 2018-07-03 09:44:40 -05:00
Родитель d2ed5b485a
Коммит f3f8439588
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -156,6 +156,9 @@ CompositorBridgeChild::Destroy()
mLayerManager = nullptr;
}
// Flush async paints before we destroy texture data.
FlushAsyncPaints();
if (!mCanSend) {
// We may have already called destroy but still have lingering references
// or CompositorBridgeChild::ActorDestroy was called. Ensure that we do our
@ -182,9 +185,6 @@ CompositorBridgeChild::Destroy()
wrBridge->Destroy(/* aIsSync */ false);
}
// Flush async paints before we destroy texture data.
FlushAsyncPaints();
const ManagedContainer<PTextureChild>& textures = ManagedPTextureChild();
for (auto iter = textures.ConstIter(); !iter.Done(); iter.Next()) {
RefPtr<TextureClient> texture = TextureClient::AsTextureClient(iter.Get()->GetKey());