compositor-drm: Support overlays with transformed buffers
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Wed, 5 Dec 2012 13:14:04 +0000 (15:14 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 7 Dec 2012 02:56:14 +0000 (21:56 -0500)
commit409eebf34f751f33196cbc694c2a794e7a029f94
tree8845a00822bb6d9b5e5d5903d3e6a746ac57d14d
parent4dd0c412db50e451e2bea04d60e6b7a2b6c9e9da
compositor-drm: Support overlays with transformed buffers

Make overlays work when the client uses a buffer with the same
transformation as the output.

In order to calculate the destination rectangle, the same logic in
weston_surface_to_buffer_float() is needed, but with the output
dimensions instead. For that reason, this patch generalizes this
function into weston_transformed_{coord,rect} and moves it to util.c.
The surface functions are then implemented using those.
src/compositor-drm.c
src/compositor.c
src/compositor.h
src/util.c