Bug 1320864 - Add DidComposite handling r=nical

This commit is contained in:
sotaro
2016-12-01 13:36:41 +09:00
parent 9b621be741
commit d6ad646b8c
15 changed files with 159 additions and 40 deletions

View File

@@ -215,6 +215,7 @@ CrossProcessCompositorBridgeParent::AllocPWebRenderBridgeParent(const uint64_t&
WebRenderBridgeParent* parent = new WebRenderBridgeParent(
this, aPipelineId, nullptr, root->GLContext(), root->WindowState(), root->Compositor());
parent->AddRef(); // IPDL reference
sIndirectLayerTrees[aPipelineId].mCrossProcessParent = this;
sIndirectLayerTrees[aPipelineId].mWRBridge = parent;
*aTextureFactoryIdentifier = parent->Compositor()->GetTextureFactoryIdentifier();
return parent;
@@ -312,6 +313,9 @@ CrossProcessCompositorBridgeParent::DidComposite(
if (LayerTransactionParent *layerTree = sIndirectLayerTrees[aId].mLayerTree) {
Unused << SendDidComposite(aId, layerTree->GetPendingTransactionId(), aCompositeStart, aCompositeEnd);
layerTree->SetPendingTransactionId(0);
} else if (WebRenderBridgeParent* wrbridge = sIndirectLayerTrees[aId].mWRBridge) {
Unused << SendDidComposite(aId, wrbridge->GetPendingTransactionId(), aCompositeStart, aCompositeEnd);
wrbridge->SetPendingTransactionId(0);
}
}