зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1388634 - Set correct sampling filter when pushing image. r=kats
MozReview-Commit-ID: BkKbL2l0AYb --HG-- extra : rebase_source : 0fb6b785ddf00df2aa1452c3b16cbad3978386df
This commit is contained in:
Родитель
7aac93a5cc
Коммит
1d1cb1f032
|
@ -368,9 +368,9 @@ WebRenderLayerManager::PushImage(nsDisplayItem* aItem,
|
|||
return false;
|
||||
}
|
||||
|
||||
wr::ImageRendering filter = wr::ImageRendering::Auto;
|
||||
auto r = aSc.ToRelativeLayoutRect(aRect);
|
||||
aBuilder.PushImage(r, r, filter, key.value());
|
||||
SamplingFilter sampleFilter = nsLayoutUtils::GetSamplingFilterForFrame(aItem->Frame());
|
||||
aBuilder.PushImage(r, r, wr::ToImageRendering(sampleFilter), key.value());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -557,9 +557,10 @@ WebRenderLayerManager::PushItemAsImage(nsDisplayItem* aItem,
|
|||
}
|
||||
|
||||
wr::LayoutRect dest = aSc.ToRelativeLayoutRect(imageRect + offset);
|
||||
SamplingFilter sampleFilter = nsLayoutUtils::GetSamplingFilterForFrame(aItem->Frame());
|
||||
aBuilder.PushImage(dest,
|
||||
dest,
|
||||
wr::ImageRendering::Auto,
|
||||
wr::ToImageRendering(sampleFilter),
|
||||
fallbackData->GetKey().value());
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -657,9 +657,11 @@ nsImageRenderer::BuildWebRenderDisplayItems(nsPresContext* aPresContext,
|
|||
|
||||
LayoutDeviceSize gapSize = LayoutDeviceSize::FromAppUnits(
|
||||
aRepeatSize - aDest.Size(), appUnitsPerDevPixel);
|
||||
|
||||
SamplingFilter samplingFilter = nsLayoutUtils::GetSamplingFilterForFrame(mForFrame);
|
||||
aBuilder.PushImage(fill, clip,
|
||||
wr::ToLayoutSize(destRect.Size()), wr::ToLayoutSize(gapSize),
|
||||
wr::ImageRendering::Auto, key.value());
|
||||
wr::ToImageRendering(samplingFilter), key.value());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
Загрузка…
Ссылка в новой задаче