View Single Post
Old 20 June 2008, 06:31   #16
eLowar
Citizen of Elthesh
eLowar's Avatar
 
Join Date: Sep 2003
Location: London, UK
Posts: 949
For the technically inclined and/or those interested (or maybe someone wants to make a nicer build), the only change I made to the source code was to mozilla/gfx/src/thebes/nsThebesImage.cpp:

Code:
573,601c573
<     switch (target->GetType()) {
<     case gfxASurface::SurfaceTypeXlib:
<     case gfxASurface::SurfaceTypeXcb:
<         // See bug 324698.  This is a workaround for EXTEND_PAD not being
<         // implemented correctly on linux in the X server.
<         //
<         // 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, if
<         // available
<         //
<         // This effectively disables smooth upscaling for images.
<         if (xscale > 1.0 || yscale > 1.0 || ctxHasNonTranslation)
<             pat->SetFilter(0);
<         break;
<
<     case gfxASurface::SurfaceTypeQuartz:
<     case gfxASurface::SurfaceTypeQuartzImage:
<         // Do nothing, Mac seems to be OK. Really?
<         break;
<
<     default:
<         // turn on EXTEND_PAD.
<         // This is what we really want for all surface types, if the
<         // implementation was universally good.
<         if (xscale != 1.0 || yscale != 1.0 || ctxHasNonTranslation)
<             pat->SetExtend(gfxPattern::EXTEND_PAD);
<         break;
<     }
---
>     pat->SetFilter(0);
Edit: Hmm, I guess it would've made sense to leave in the check for upscaling and keep filtering when downscaling. Ah well, maybe next time.

Last edited by eLowar; 20 June 2008 at 06:39.
eLowar is offline  
 
Page generated in 0.04788 seconds with 9 queries