[PATCH weston 1/4] compositor: Create the inverse of the output matrix

Derek Foreman derekf at osg.samsung.com
Tue Mar 24 09:36:13 PDT 2015


Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---
 src/compositor.c | 2 ++
 src/compositor.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/compositor.c b/src/compositor.c
index 47da818..623dff3 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -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
diff --git a/src/compositor.h b/src/compositor.h
index 24ed4fc..be32312 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -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;
-- 
2.1.4



More information about the wayland-devel mailing list