aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-08-15 08:52:30 -0400
committerDrew DeVault <sir@cmpwn.com>2017-08-15 08:52:30 -0400
commitf60b53c6e3c91aefa432ce75deb89560a8e5c0d7 (patch)
tree1b15b4fad27ed24894d19d882a4c41941e4d5569 /include
parent09faf4ff6430bd93fec4269b35c7a87d14e9e8b3 (diff)
Change how surface matricies are calculated
Diffstat (limited to 'include')
-rw-r--r--include/wlr/types/wlr_surface.h14
1 files changed, 12 insertions, 2 deletions
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