Bug 1377595 - Don't clip native themed item images to avoid over invalidation. r=jrmuizel

This commit is contained in:
Nicolas Silva 2017-11-20 10:28:13 +01:00
Родитель 3fe59e0566
Коммит 50104c26e5
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -485,8 +485,11 @@ WebRenderCommandBuilder::GenerateFallbackData(nsDisplayItem* aItem,
// Blob images will only draw the visible area of the blob so we don't need to clip
// them here and can just rely on the webrender clipping.
// TODO We also don't clip native themed widget to avoid over-invalidation during scrolling.
// it would be better to support a sort of straming/tiling scheme for large ones but the hope
// is that we should not have large native themed items.
nsRect paintBounds = itemBounds;
if (useBlobImage) {
if (useBlobImage || aItem->MustPaintOnContentSide()) {
paintBounds = itemBounds;
} else {
paintBounds = aItem->GetClippedBounds(aDisplayListBuilder);