mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1020169 - Part 2. Register nested LayerTree. r=mattwoodrow
Use PCompositor::NotifyChildCreated which was ill-defined for cross-process case. Assume that for all LayerTrees managed by a CrossProcessCompositorParent all share the same CompositorParent.
This commit is contained in:
parent
e35235cc31
commit
304410dce4
@ -974,7 +974,7 @@ CompositorParent::RecvNotifyChildCreated(const uint64_t& child)
|
||||
}
|
||||
|
||||
void
|
||||
CompositorParent::NotifyChildCreated(uint64_t aChild)
|
||||
CompositorParent::NotifyChildCreated(const uint64_t& aChild)
|
||||
{
|
||||
sIndirectLayerTrees[aChild].mParent = this;
|
||||
sIndirectLayerTrees[aChild].mLayerManager = mLayerManager;
|
||||
@ -1286,14 +1286,15 @@ CrossProcessCompositorParent::DeallocPLayerTransactionParent(PLayerTransactionPa
|
||||
bool
|
||||
CrossProcessCompositorParent::RecvNotifyChildCreated(const uint64_t& child)
|
||||
{
|
||||
const CompositorParent::LayerTreeState* state = CompositorParent::GetIndirectShadowTree(child);
|
||||
if (!state) {
|
||||
return false;
|
||||
for (LayerTreeMap::iterator it = sIndirectLayerTrees.begin();
|
||||
it != sIndirectLayerTrees.end(); it++) {
|
||||
CompositorParent::LayerTreeState* lts = &it->second;
|
||||
if (lts->mParent && lts->mCrossProcessParent == this) {
|
||||
lts->mParent->NotifyChildCreated(child);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
MOZ_ASSERT(state->mParent);
|
||||
state->mParent->NotifyChildCreated(child);
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -119,7 +119,7 @@ public:
|
||||
void ForceIsFirstPaint();
|
||||
void Destroy();
|
||||
|
||||
void NotifyChildCreated(uint64_t aChild);
|
||||
void NotifyChildCreated(const uint64_t& aChild);
|
||||
|
||||
void AsyncRender();
|
||||
|
||||
|
@ -743,7 +743,8 @@ RenderFrameParent::RenderFrameParent(nsFrameLoader* aFrameLoader,
|
||||
// and we'll keep an indirect reference to that tree.
|
||||
*aId = mLayersId = CompositorParent::AllocateLayerTreeId();
|
||||
if (lm && lm->GetBackendType() == LayersBackend::LAYERS_CLIENT) {
|
||||
ClientLayerManager *clientManager = static_cast<ClientLayerManager*>(lm.get());
|
||||
ClientLayerManager *clientManager =
|
||||
static_cast<ClientLayerManager*>(lm.get());
|
||||
clientManager->GetRemoteRenderer()->SendNotifyChildCreated(mLayersId);
|
||||
}
|
||||
if (aScrollingBehavior == ASYNC_PAN_ZOOM) {
|
||||
@ -753,6 +754,7 @@ RenderFrameParent::RenderFrameParent(nsFrameLoader* aFrameLoader,
|
||||
} else if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
ContentChild::GetSingleton()->SendAllocateLayerTreeId(aId);
|
||||
mLayersId = *aId;
|
||||
CompositorChild::Get()->SendNotifyChildCreated(mLayersId);
|
||||
}
|
||||
// Set a default RenderFrameParent
|
||||
mFrameLoader->SetCurrentRemoteFrame(this);
|
||||
|
Loading…
Reference in New Issue
Block a user