From f60b53c6e3c91aefa432ce75deb89560a8e5c0d7 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Tue, 15 Aug 2017 08:52:30 -0400 Subject: Change how surface matricies are calculated --- include/wlr/types/wlr_surface.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h index 811097ad..9b13d9cc 100644 --- a/include/wlr/types/wlr_surface.h +++ b/include/wlr/types/wlr_surface.h @@ -55,7 +55,17 @@ struct wlr_renderer; struct wlr_surface *wlr_surface_create(struct wl_resource *res, struct wlr_renderer *renderer); void wlr_surface_flush_damage(struct wlr_surface *surface); -void wlr_surface_get_matrix(struct wlr_surface *surface, float (*matrix)[16], - const float (*projection)[16], int x, int y); +/** + * Gets a matrix you can pass into wlr_render_with_matrix to display this + * surface. `matrix` is the output matrix, `projection` is the wlr_output + * projection matrix, and `transform` is any additional transformations you want + * to perform on the surface (or NULL/the identity matrix if you don't). + * `transform` is used before the surface is scaled, so its geometry extends + * from 0 to 1 in both dimensions. + */ +void wlr_surface_get_matrix(struct wlr_surface *surface, + float (*matrix)[16], + const float (*projection)[16], + const float (*transform)[16]); #endif -- cgit v1.2.3