Bug 1319521 - Properly tear down the LayerTreeState for content. r=gfx?

We were never actually removing the LayerTreeState entry for content layer trees.
In non-webrender codepaths, this happens when a PLayerTransaction belonging to
a CrossProcessCompositorBridge is torn down (see CrossProcessCompositorBridge::
DeallocPLayerTransactionParent). The equivalent of that in the webrender world
is in DeallocPWebRenderBridgeParent, so we should do the same.
This commit is contained in:
Kartikaya Gupta
2016-11-23 10:46:46 -05:00
parent 0b07504fdb
commit e6df8d5b7e

View File

@@ -228,13 +228,7 @@ CrossProcessCompositorBridgeParent::DeallocPWebRenderBridgeParent(PWebRenderBrid
MOZ_RELEASE_ASSERT(false);
#endif
WebRenderBridgeParent* parent = static_cast<WebRenderBridgeParent*>(aActor);
{
MonitorAutoLock lock(*sIndirectLayerTreesLock);
auto it = sIndirectLayerTrees.find(parent->PipelineId());
if (it != sIndirectLayerTrees.end()) {
it->second.mWRBridge = nullptr;
}
}
EraseLayerState(parent->PipelineId());
parent->Release(); // IPDL reference
return true;
}