b=381661, reenable bilinear image filtering [mq]: 381661-enable-bilinear.patch ; r=stuart

This commit is contained in:
vladimir@pobox.com 2008-02-23 14:30:57 -08:00
parent 71330113e1
commit 345dc2a2b7
22 changed files with 23 additions and 18 deletions

View File

@ -533,21 +533,26 @@ nsThebesImage::Draw(nsIRenderingContext &aContext,
pat->SetMatrix(mat);
// XXX bug 324698
#ifndef XP_MACOSX
if (xscale > 1.0 || yscale > 1.0) {
if (xscale != 1.0 || yscale != 1.0) {
#if !defined(XP_MACOSX) && !defined(XP_WIN)
// See bug 324698. This is a workaround.
//
// Set the filter to CAIRO_FILTER_FAST if we're scaling up -- otherwise,
// pixman's sampling will sample transparency for the outside edges and we'll
// get blurry edges. CAIRO_EXTEND_PAD would also work here, but it's not
// implemented for image sources.
// get blurry edges. CAIRO_EXTEND_PAD would also work here, if
// available
//
// This effectively disables smooth upscaling for images.
pat->SetFilter(0);
}
#endif
#if defined(XP_WIN)
// turn on EXTEND_PAD only for win32, and only when scaling;
// it's not implemented correctly on linux in the X server.
pat->SetExtend(gfxPattern::EXTEND_PAD);
#endif
}
ctx->NewPath();
ctx->SetPattern(pat);
ctx->Rectangle(destRect);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 888 B

After

Width:  |  Height:  |  Size: 64 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 923 B

After

Width:  |  Height:  |  Size: 64 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 888 B

After

Width:  |  Height:  |  Size: 64 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 936 B

After

Width:  |  Height:  |  Size: 92 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 92 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 888 B

After

Width:  |  Height:  |  Size: 64 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 936 B

After

Width:  |  Height:  |  Size: 92 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 888 B

After

Width:  |  Height:  |  Size: 64 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 923 B

After

Width:  |  Height:  |  Size: 64 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 123 B

View File

@ -128,22 +128,22 @@ fails == 134706-6b.html 134706-6b-ref.html # bug 363248 (via bug 414193, anyway)
== 234686-1.html 234686-ref.html
== 234686-2.html 234686-ref.html
== 234686-3.html 234686-ref.html
fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 234686-4.html 234686-ref.html # bug 371316 or other image scaling issue
fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 234686-5.html 234686-ref.html # bug 371316 or other image scaling issue
== 234686-4.html 234686-ref.html
== 234686-5.html 234686-ref.html
== 234686-6.html 234686-ref.html
== 234686-7.html 234686-ref.html
fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 234686-8.html 234686-ref.html # bug 371316 or other image scaling issue
fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 234686-9.html 234686-ref.html # bug 371316 or other image scaling issue
fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 234686-10.html 234686-ref.html # bug 371316 or other image scaling issue
== 234686-8.html 234686-ref.html
== 234686-9.html 234686-ref.html
== 234686-10.html 234686-ref.html
== 234686-11.html 234686-ref.html
fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 234686-12.html 234686-ref.html # bug 371316 or other image scaling issue
== 234686-12.html 234686-ref.html
== 234686-13.html 234686-ref.html
fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 234686-14.html 234686-ref.html # bug 371316 or other image scaling issue
fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 234686-15.html 234686-ref.html # bug 371316 or other image scaling issue
fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 234686-16.html 234686-ref.html # bug 371316 or other image scaling issue
fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 234686-17.html 234686-ref.html # bug 371316 or other image scaling issue
fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 234686-18.html 234686-ref.html # bug 371316 or other image scaling issue
fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 234686-19.html 234686-ref.html # bug 371316 or other image scaling issue
== 234686-14.html 234686-ref.html
== 234686-15.html 234686-ref.html
== 234686-16.html 234686-ref.html
== 234686-17.html 234686-ref.html
== 234686-18.html 234686-ref.html
== 234686-19.html 234686-ref.html
== 234964-1.html 234964-1-ref.html
== 234964-2.html 234964-2-ref.html
== 235593-1.html 235593-1-ref.html