mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1127727 - Swap callbacks in the Compositor when dragging tabs between windows. r=billm
When remote browsing, swap the MozLayersReady callback in the compositor when dragging tabs between windows.
This commit is contained in:
parent
d444fdc20b
commit
3d76a3308b
@ -973,6 +973,8 @@ nsFrameLoader::SwapWithOtherRemoteLoader(nsFrameLoader* aOther,
|
||||
return rv;
|
||||
}
|
||||
|
||||
mRemoteBrowser->SwapLayerTreeObservers(aOther->mRemoteBrowser);
|
||||
|
||||
nsCOMPtr<nsIBrowserDOMWindow> otherBrowserDOMWindow =
|
||||
aOther->mRemoteBrowser->GetBrowserDOMWindow();
|
||||
nsCOMPtr<nsIBrowserDOMWindow> browserDOMWindow =
|
||||
|
@ -2906,6 +2906,23 @@ TabParent::LayerTreeUpdate(bool aActive)
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
TabParent::SwapLayerTreeObservers(TabParent* aOther)
|
||||
{
|
||||
if (IsDestroyed() || aOther->IsDestroyed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
RenderFrameParent* rfp = GetRenderFrame();
|
||||
RenderFrameParent* otherRfp = aOther->GetRenderFrame();
|
||||
if(!rfp || !otherRfp) {
|
||||
return;
|
||||
}
|
||||
|
||||
CompositorParent::SwapLayerTreeObservers(rfp->GetLayersId(),
|
||||
otherRfp->GetLayersId());
|
||||
}
|
||||
|
||||
bool
|
||||
TabParent::RecvRemotePaintIsReady()
|
||||
{
|
||||
|
@ -399,6 +399,7 @@ public:
|
||||
bool RequestNotifyLayerTreeReady();
|
||||
bool RequestNotifyLayerTreeCleared();
|
||||
bool LayerTreeUpdate(bool aActive);
|
||||
void SwapLayerTreeObservers(TabParent* aOther);
|
||||
|
||||
virtual bool
|
||||
RecvInvokeDragSession(nsTArray<IPCDataTransfer>&& aTransfers,
|
||||
|
@ -1443,6 +1443,19 @@ CompositorParent::DeallocateLayerTreeId(uint64_t aId)
|
||||
NewRunnableFunction(&EraseLayerState, aId));
|
||||
}
|
||||
|
||||
/* static */ void
|
||||
CompositorParent::SwapLayerTreeObservers(uint64_t aLayerId, uint64_t aOtherLayerId)
|
||||
{
|
||||
EnsureLayerTreeMapReady();
|
||||
MonitorAutoLock lock(*sIndirectLayerTreesLock);
|
||||
NS_ASSERTION(sIndirectLayerTrees.find(aLayerId) != sIndirectLayerTrees.end(),
|
||||
"SwapLayerTrees missing layer 1");
|
||||
NS_ASSERTION(sIndirectLayerTrees.find(aOtherLayerId) != sIndirectLayerTrees.end(),
|
||||
"SwapLayerTrees missing layer 2");
|
||||
std::swap(sIndirectLayerTrees[aLayerId].mLayerTreeReadyObserver,
|
||||
sIndirectLayerTrees[aOtherLayerId].mLayerTreeReadyObserver);
|
||||
}
|
||||
|
||||
static void
|
||||
UpdateControllerForLayersId(uint64_t aLayersId,
|
||||
GeckoContentController* aController)
|
||||
|
@ -340,6 +340,7 @@ public:
|
||||
|
||||
static void RequestNotifyLayerTreeReady(uint64_t aLayersId, CompositorUpdateObserver* aObserver);
|
||||
static void RequestNotifyLayerTreeCleared(uint64_t aLayersId, CompositorUpdateObserver* aObserver);
|
||||
static void SwapLayerTreeObservers(uint64_t aLayer, uint64_t aOtherLayer);
|
||||
|
||||
float ComputeRenderIntegrity();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user