Is interpolation of image-border specified by Render?

Clemens Eisserer linuxhippy at
Fri Oct 17 15:58:37 PDT 2008


I am compositing a transformed source with RepeatPad (and billinear
interpolation) and a mask (nearest) to get sharp edges.
What I do for now is I draw a rect in the mask as large as the source
and apply the same transformation.

However this requires me to have a mask as large or larger as the
source and fillrects touching a large area.
I've experimented with having a smaller mask and appling an additional
scale to the mask and it seems to work fine when using nearest
It seems the mask-border is exactly as if the image would be as large
as the source, and only the content of the mask is interpolated with
nearest, the upper image shows the result (with a 2x2 mask scaled up):

However I am worried how consistent this is across different drivers,
can I rely on this behaviour if I handle rouding errors caused by the
fixed-point transformation matrix?
Is it specified which pixels may be touched?
How hard is it for drivers to have a mask with nearest and a source
with billinear?

Thank you in advance, Clemens

More information about the xorg mailing list