mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1132072 - Handle RequestNotifyLayerTreeReady when RenderFrameParent not ready (r=dvander)
This commit is contained in:
parent
7319a01bdc
commit
71d65e32e7
@ -276,6 +276,7 @@ TabParent::TabParent(nsIContentParent* aManager,
|
||||
, mInitedByParent(false)
|
||||
, mTabId(aTabId)
|
||||
, mCreatingWindow(false)
|
||||
, mNeedLayerTreeReadyNotification(false)
|
||||
{
|
||||
MOZ_ASSERT(aManager);
|
||||
}
|
||||
@ -2315,6 +2316,12 @@ TabParent::RecvGetRenderFrameInfo(PRenderFrameParent* aRenderFrame,
|
||||
RenderFrameParent* renderFrame = static_cast<RenderFrameParent*>(aRenderFrame);
|
||||
renderFrame->GetTextureFactoryIdentifier(aTextureFactoryIdentifier);
|
||||
*aLayersId = renderFrame->GetLayersId();
|
||||
|
||||
if (mNeedLayerTreeReadyNotification) {
|
||||
RequestNotifyLayerTreeReady();
|
||||
mNeedLayerTreeReadyNotification = false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2617,11 +2624,11 @@ TabParent::RequestNotifyLayerTreeReady()
|
||||
{
|
||||
RenderFrameParent* frame = GetRenderFrame();
|
||||
if (!frame) {
|
||||
return false;
|
||||
mNeedLayerTreeReadyNotification = true;
|
||||
} else {
|
||||
CompositorParent::RequestNotifyLayerTreeReady(frame->GetLayersId(),
|
||||
new LayerTreeUpdateObserver());
|
||||
}
|
||||
|
||||
CompositorParent::RequestNotifyLayerTreeReady(frame->GetLayersId(),
|
||||
new LayerTreeUpdateObserver());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -512,6 +512,11 @@ private:
|
||||
// CreateWindow response. Then TabChild loads them immediately.
|
||||
nsTArray<FrameScriptInfo> mDelayedFrameScripts;
|
||||
|
||||
// If the user called RequestNotifyLayerTreeReady and the RenderFrameParent
|
||||
// wasn't ready yet, we set this flag and call RequestNotifyLayerTreeReady
|
||||
// again once the RenderFrameParent arrives.
|
||||
bool mNeedLayerTreeReadyNotification;
|
||||
|
||||
private:
|
||||
// This is used when APZ needs to find the TabParent associated with a layer
|
||||
// to dispatch events.
|
||||
|
Loading…
Reference in New Issue
Block a user