compositor: Fix rendering with shm transformed buffers
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Wed, 28 Nov 2012 15:10:26 +0000 (17:10 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 30 Nov 2012 19:15:23 +0000 (14:15 -0500)
commit0396ba204d4d20612bc57699ea755df627c8aa8f
treedb9e3fb70f331e7647ea7243de23547a4389ee7e
parenta85292e73c0bb9fca46e123c92c6f6550c57924d
compositor: Fix rendering with shm transformed buffers

The implementation of buffer transformation didn't handle transformed
shm buffers properly. The partial texture upload was broken since the
damage is in surface coordinates that don't necessarily match the
buffer's coordinates. It also wouldn't handle the buffer stride
properly, resulting in incorrect rendering if it didn't match the
buffer's width.

The logic used for converting texture coordinates was generalized and
moved out of the renderer, since this conversion may be useful in other
places, such as the backends.
src/compositor.c
src/compositor.h
src/gl-renderer.c