compositor: Create the inverse of the output matrix
authorDerek Foreman <derekf@osg.samsung.com>
Tue, 24 Mar 2015 16:36:13 +0000 (11:36 -0500)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 27 Mar 2015 07:16:41 +0000 (09:16 +0200)
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
src/compositor.c
src/compositor.h

index 47da8183d58c5ebedcfc62e4e75a412548aee88a..623dff3139b7ee170da03e04d8040e43bb9089c3 100644 (file)
@@ -4003,6 +4003,8 @@ weston_output_update_matrix(struct weston_output *output)
                                    output->current_scale, 1);
 
        output->dirty = 0;
+
+       weston_matrix_invert(&output->inverse_matrix, &output->matrix);
 }
 
 static void
index 24ed4fc035adb19e2a3321d1d575ac66a14687fd..be323123a59ae1a15cb56b2abe90006ec25db4e6 100644 (file)
@@ -185,6 +185,8 @@ struct weston_output {
 
        /** From global to output buffer coordinates. */
        struct weston_matrix matrix;
+       /** From output buffer to global coordinates. */
+       struct weston_matrix inverse_matrix;
 
        struct wl_list animation_list;
        int32_t x, y, width, height;