Bug 463938: Fix smooth downscaling for images on Linux. r=vlad a=beltzner

This commit is contained in:
Michael Ventnor 2008-11-14 10:42:31 -08:00
parent d22f52dce3
commit 2152d87327

View File

@ -635,8 +635,12 @@ nsThebesImage::Draw(gfxContext* aContext,
// get blurry edges. CAIRO_EXTEND_PAD would also work here, if
// available
//
// This effectively disables smooth upscaling for images.
pattern->SetFilter(0);
// This effectively disables smooth upscaling for images. So only set the
// FAST filter on upscaling. We must NEVER use FAST on downscaling otherwise
// very ugly images will result all over chrome and the web.
// xx is x scaling, yy is y scaling. Lower number is higher scale.
if (userSpaceToImageSpace.xx < 1.0 || userSpaceToImageSpace.yy < 1.0)
pattern->SetFilter(0);
break;
case gfxASurface::SurfaceTypeQuartz: