[cairo] Xlib/Xcb and EXTEND_PAD

Zack Weinberg zweinberg at mozilla.com
Mon Jan 19 11:15:45 PST 2009

Thomas Jaeger <thjaeger at gmail.com> wrote:
> I've been trying to figure out why firefox uses nearest-neighbor
> interpolation for upscaling, and it turns out that it would need to
> use EXTEND_PAD to get correct results with a bilinear filter [1]

It actually needs to use EXTEND_PAD, period.  You can get image
artifacts with EXTEND_NONE even with nearest-neighbor filtering. [2]
Unfortunately, we can't use it at all...

> My testing suggests that both EXTEND_PAD and EXTEND_REFLECT are
> supported by XRender in current X servers, so wouldn't it make sense
> to disable the fallback (at least conditionally depending on the X
> server version)?

... because whether or not Render's equivalent of
EXTEND_PAD/EXTEND_REFLECT actually *work* is dependent on the exact
version of your X server and video drivers.  Render protocol 0.10 isn't
good enough.  There are some cairo-only test cases in [2].

I would love to find a good overall solution but I haven't got one.


> [1] https://bugzilla.mozilla.org/show_bug.cgi?id=422179
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=468496

More information about the cairo mailing list