mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 803826 - Restore the layer builder pointer on return from PaintForFrame. r=mattwoodrow
It's possible for nsDisplayList::PaintForFrame to reset the layer builder pointer on a layer manager it didn't create. Instead of setting it to null, store the existing pointer and restore it on return.
This commit is contained in:
parent
df166e73aa
commit
7f25a0bb58
@ -1014,6 +1014,9 @@ void nsDisplayList::PaintForFrame(nsDisplayListBuilder* aBuilder,
|
||||
layerManager = new BasicLayerManager();
|
||||
}
|
||||
|
||||
// Store the existing layer builder to reinstate it on return.
|
||||
FrameLayerBuilder *oldBuilder = layerManager->GetLayerBuilder();
|
||||
|
||||
FrameLayerBuilder *layerBuilder = new FrameLayerBuilder();
|
||||
layerBuilder->Init(aBuilder, layerManager);
|
||||
|
||||
@ -1050,13 +1053,13 @@ void nsDisplayList::PaintForFrame(nsDisplayListBuilder* aBuilder,
|
||||
nsRefPtr<ContainerLayer> root = layerBuilder->
|
||||
BuildContainerLayerFor(aBuilder, layerManager, aForFrame, nullptr, *this,
|
||||
containerParameters, nullptr);
|
||||
|
||||
|
||||
if (widgetTransaction) {
|
||||
aForFrame->ClearInvalidationStateBits();
|
||||
}
|
||||
|
||||
if (!root) {
|
||||
layerManager->RemoveUserData(&gLayerManagerLayerBuilder);
|
||||
layerManager->SetUserData(&gLayerManagerLayerBuilder, oldBuilder);
|
||||
return;
|
||||
}
|
||||
// Root is being scaled up by the X/Y resolution. Scale it back down.
|
||||
@ -1135,7 +1138,7 @@ void nsDisplayList::PaintForFrame(nsDisplayListBuilder* aBuilder,
|
||||
}
|
||||
|
||||
nsCSSRendering::DidPaint();
|
||||
layerManager->RemoveUserData(&gLayerManagerLayerBuilder);
|
||||
layerManager->SetUserData(&gLayerManagerLayerBuilder, oldBuilder);
|
||||
}
|
||||
|
||||
uint32_t nsDisplayList::Count() const {
|
||||
|
Loading…
Reference in New Issue
Block a user