# HG changeset patch # User Nicolas Silva # Date 1518453788 18000 # Node ID f53e340b051cec79c3dab594fe87e8e805ba2fab # Parent a408b8f2f7ab1eed9023ff549f3d80d4c052e83b Bug 1436058 - Don't remove a WebRender pipeline if we re-created one with the same id. r=kats Patch originally attached to - and reviewed by sotaro on - bug 1432708. MozReview-Commit-ID: 300BOHFNrbe diff --git a/gfx/layers/wr/AsyncImagePipelineManager.cpp b/gfx/layers/wr/AsyncImagePipelineManager.cpp --- a/gfx/layers/wr/AsyncImagePipelineManager.cpp +++ b/gfx/layers/wr/AsyncImagePipelineManager.cpp @@ -402,15 +402,19 @@ AsyncImagePipelineManager::PipelineRende void AsyncImagePipelineManager::PipelineRemoved(const wr::PipelineId& aPipelineId) { if (mDestroyed) { return; } if (auto entry = mPipelineTexturesHolders.Lookup(wr::AsUint64(aPipelineId))) { - // Remove Pipeline - entry.Remove(); + if (entry.Data()->mDestroyedEpoch.isSome()) { + // Remove Pipeline + entry.Remove(); + } + // If mDestroyedEpoch contains nothing it means we reused the same pipeline id (probably because + // we moved the tab to another window). In this case we need to keep the holder. } } } // namespace layers } // namespace mozilla