Bug 1420279 - Make nsDisplayXULImage::CreateWebRenderCommands use scaled image containers more often. r=tnikkel

This commit is contained in:
Andrew Osmond 2017-11-23 18:17:17 -05:00
Родитель 9472bdfa62
Коммит b3cd891730
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -572,8 +572,12 @@ nsDisplayXULImage::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBui
mozilla::layers::WebRenderLayerManager* aManager,
nsDisplayListBuilder* aDisplayListBuilder)
{
ContainerLayerParameters parameter;
if (GetLayerState(aDisplayListBuilder, aManager, parameter) != LAYER_ACTIVE) {
nsImageBoxFrame* imageFrame = static_cast<nsImageBoxFrame*>(mFrame);
if (!imageFrame->CanOptimizeToImageLayer()) {
return false;
}
if (!imageFrame->mImageRequest) {
return false;
}
@ -585,7 +589,7 @@ nsDisplayXULImage::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBui
flags |= imgIContainer::FLAG_HIGH_QUALITY_SCALING;
}
DrawResult result = static_cast<nsImageBoxFrame*>(mFrame)->
DrawResult result = imageFrame->
CreateWebRenderCommands(aBuilder, aResources, aSc, aManager, this, ToReferenceFrame(), flags);
nsDisplayItemGenericImageGeometry::UpdateDrawResult(this, result);