mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 11:15:34 +00:00
Bug 1423424 - Don't use empty image containers in image layers. r=tnikkel
Prior to bug 1368776, when no surface was obtained for the container, no container was returned. Since we prefer an empty image container with WebRender to avoid fallback, this was changed, but regressed non-WebRender behaviour. Now on the non-WebRender path, we check if there is anything in the container before accepting it.
This commit is contained in:
parent
64183553f6
commit
990c86e27e
@ -1685,7 +1685,7 @@ nsDisplayImage::BuildLayer(nsDisplayListBuilder* aBuilder,
|
||||
|
||||
RefPtr<ImageContainer> container =
|
||||
mImage->GetImageContainer(aManager, flags);
|
||||
if (!container) {
|
||||
if (!container || !container->HasCurrentImage()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -4551,7 +4551,12 @@ nsDisplayImageContainer::GetContainer(LayerManager* aManager,
|
||||
flags |= imgIContainer::FLAG_SYNC_DECODE;
|
||||
}
|
||||
|
||||
return image->GetImageContainer(aManager, flags);
|
||||
RefPtr<ImageContainer> container = image->GetImageContainer(aManager, flags);
|
||||
if (!container || !container->HasCurrentImage()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return container.forget();
|
||||
}
|
||||
|
||||
bool
|
||||
|
Loading…
Reference in New Issue
Block a user