Bug 510856. Round out 'visible area of moving content' to device pixel edges to avoid stray subpixel rectangles needing to be repainted. r=dbaron

--HG--
extra : rebase_source : 83e0e490c4b145fb774ad149c7f7a9e6ff8998c7
This commit is contained in:
Robert O'Callahan 2009-09-07 12:35:12 +12:00
Родитель 1da8163981
Коммит e9286e8613
1 изменённых файлов: 4 добавлений и 1 удалений

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

@ -364,8 +364,11 @@ nsDisplayList::OptimizeVisibility(nsDisplayListBuilder* aBuilder,
// the first one we see is a sound overapproximation
movingContentVisibleRegion = *aVisibleRegion;
}
nscoord appUnitsPerPixel = f->PresContext()->AppUnitsPerDevPixel();
nsRect bounds = item->GetBounds(aBuilder).
ToOutsidePixels(appUnitsPerPixel).ToAppUnits(appUnitsPerPixel);
movingContentAccumulatedBounds.UnionRect(movingContentAccumulatedBounds,
item->GetBounds(aBuilder));
bounds);
}
if (item->OptimizeVisibility(aBuilder, aVisibleRegion)) {
AppendToBottom(item);