Bug 1320628 - Fix background tab crash when e10s is enabled r=nical?

This commit is contained in:
sotaro
2016-11-30 11:59:14 +09:00
parent 3a64eef17f
commit bce64e2754
12 changed files with 129 additions and 26 deletions

View File

@@ -213,7 +213,7 @@ CrossProcessCompositorBridgeParent::AllocPWebRenderBridgeParent(const uint64_t&
WebRenderBridgeParent* root = sIndirectLayerTrees[cbp->RootLayerTreeId()].mWRBridge.get();
WebRenderBridgeParent* parent = new WebRenderBridgeParent(
aPipelineId, nullptr, root->GLContext(), root->WindowState(), root->Compositor());
this, aPipelineId, nullptr, root->GLContext(), root->WindowState(), root->Compositor());
parent->AddRef(); // IPDL reference
sIndirectLayerTrees[aPipelineId].mWRBridge = parent;
*aTextureFactoryIdentifier = parent->Compositor()->GetTextureFactoryIdentifier();
@@ -567,5 +567,19 @@ CrossProcessCompositorBridgeParent::UpdatePaintTime(LayerTransactionParent* aLay
state->mParent->UpdatePaintTime(aLayerTree, aPaintTime);
}
void
CrossProcessCompositorBridgeParent::ObserveLayerUpdate(uint64_t aLayersId, uint64_t aEpoch, bool aActive)
{
MOZ_ASSERT(aLayersId != 0);
CompositorBridgeParent::LayerTreeState* state =
CompositorBridgeParent::GetIndirectShadowTree(aLayersId);
if (!state || !state->mParent) {
return;
}
Unused << state->mParent->SendObserveLayerUpdate(aLayersId, aEpoch, aActive);
}
} // namespace layers
} // namespace mozilla