pixman-renderer: Fix up transform handling
authorAlexander Larsson <alexl@redhat.com>
Wed, 22 May 2013 12:41:36 +0000 (14:41 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 22 May 2013 20:19:36 +0000 (16:19 -0400)
commit1f206b4ce42731677071ca30debf1ebe99a11cde
tree35f8d851343128caad90d2b16775b53248c9460e
parent95289831a1f12651fde85be17e019d5c3e9dd183
pixman-renderer: Fix up transform handling

Rather than storing the shadow_image in the untransformed space
and rotating on copy to hw_buffer we store both on the transformed
space. This means a copy between them is a straight copy, and that
apps supplying correctly transformed surface buffers need not
change them.

We also correctly handle all output transform including the previously
unhandled flipped ones, as well as client supplied buffer_transforms (which
were previously ignored).

We also simplify the actual rendering by just converting any damage
region to output coordinates and set it on a clip and composite
the whole buffer, letting pixman do the rectangle handling. This
means we always do all the transforms, including the surface positioning
as a pixman_image transform. This simplifies the code and sets us up
for handling scaling at a later stage.

The transform looks complicated, but in practice it ends up being
an integer translation almost always, so it will hit the pixman
fastpaths.
src/pixman-renderer.c