[RFC weston 13/16] compositor: Add a function to test if images transformed by a matrix should be bilinearly filtered

Bill Spitzak spitzak at gmail.com
Fri Oct 3 13:13:23 PDT 2014

On 10/03/2014 11:05 AM, Pekka Paalanen wrote:

>> The really lovely part about pixman is that (if I'm "getting" it
>> correctly) you transform the source image instead of transforming
>> destination vertices.  So pixman needs things exactly backwards.
> Yeah, backwards sounds familiar. Just reverse the polarity... err,
> invert the matrix. It's only 3x3 at that point, and pixman can
> probably do it. We can optimize it later if needed. Or if it looks
> like the inverse form is more popular in general, we could just
> construct that to begin with. Later. :-)

Since pixman is trying to figure out what color to make a particular 
output pixel, it needs the inverse matrix because that is how it 
translates the xy of an output pixel to a location in the input image.

OpenGL and other libraries invert the matrix internally as they need 
this same information when doing texture mapping.

I think you will have to keep track of both the matrix and the inverse 
one. The inverse is needed to translate input events to client space.

More information about the wayland-devel mailing list