Bug 1479939 - Ensure we tell WR to remove the compositable pipelines when clearing resources. r?sotaro draft
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 02 Aug 2018 00:17:36 -0400
changeset 825860 816e0e08ca0e987934c7b341da2ac8f68198c7da
parent 825566 3cb90f16402bc5e1203e2771dc93553b8377fa40
push id118187
push userkgupta@mozilla.com
push dateThu, 02 Aug 2018 13:25:18 +0000
reviewerssotaro
bugs1479939
milestone63.0a1
Bug 1479939 - Ensure we tell WR to remove the compositable pipelines when clearing resources. r?sotaro MozReview-Commit-ID: AxuvERUalhb
gfx/layers/wr/WebRenderBridgeParent.cpp
--- a/gfx/layers/wr/WebRenderBridgeParent.cpp
+++ b/gfx/layers/wr/WebRenderBridgeParent.cpp
@@ -1705,16 +1705,17 @@ WebRenderBridgeParent::ClearResources()
     }
   }
   mTextureHosts.clear();
   for (const auto& entry : mAsyncCompositables) {
     wr::PipelineId pipelineId = wr::AsPipelineId(entry.first);
     RefPtr<WebRenderImageHost> host = entry.second;
     host->ClearWrBridge();
     mAsyncImageManager->RemoveAsyncImagePipeline(pipelineId, txn);
+    txn.RemovePipeline(pipelineId);
   }
   mAsyncCompositables.clear();
   for (const auto& entry : mSharedSurfaceIds) {
     wr::ExternalImageId id = wr::ToExternalImageId(entry);
     mAsyncImageManager->HoldExternalImage(mPipelineId, mWrEpoch, id);
   }
   mSharedSurfaceIds.clear();