Comment 332 for bug 217908

Revision history for this message
In , Karlt (karlt) wrote :

(In reply to comment #76)
> cairo seems already to do something like it,
>
> http://mxr.mozilla.org/mozilla-central/source/gfx/cairo/cairo/src/cairo-xlib-display.c#339

Yes, we need to match those buggy_pad_reflect server version tests exactly.

> ... and fallbacks if the server is buggy, doesn't it?

Right. But the fallback that cairo needs to do is quite disastrous to performance. It will read back the image (and the destination, if there is an alpha channel in the image) from the server to software scale and then return to the server.

I assume it's possible to do some fancy FILTER_NEAREST only for the source-image-pixel-width outer border and FILTER_BILINEAR for the interior of the image,
but I'm not sure it's worth it just for older servers.

Simplest is probably to keep the old behavior for older servers, but fix up things with EXTEND_PAD/FILTER_BILINEAR for newer servers.