diff options
author | emersion <contact@emersion.fr> | 2018-03-15 18:35:22 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-03-15 18:35:22 +0100 |
commit | 1914a1aa2b4f3c5678bbbf7d734352a6f51bec58 (patch) | |
tree | 1988ce0f00148720517c049b44c06b9526ff8a69 | |
parent | 8b58e1a3ad45f3e791a15b070d5544f3fc4e6a7e (diff) |
surface: drop wlr_surface_get_matrix
-rw-r--r-- | include/wlr/types/wlr_surface.h | 14 | ||||
-rw-r--r-- | types/wlr_surface.c | 12 |
2 files changed, 0 insertions, 26 deletions
diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h index 2bfd1bc9..5c5b012f 100644 --- a/include/wlr/types/wlr_surface.h +++ b/include/wlr/types/wlr_surface.h @@ -101,20 +101,6 @@ struct wlr_surface *wlr_surface_create(struct wl_resource *res, struct wlr_renderer *renderer); /** - * 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 mat[static 9], - const float projection[static 9], - const float transform[static 9]); - - -/** * Set the lifetime role for this surface. Returns 0 on success or -1 if the * role cannot be set. */ diff --git a/types/wlr_surface.c b/types/wlr_surface.c index cf00a1e6..b3e0dcd8 100644 --- a/types/wlr_surface.c +++ b/types/wlr_surface.c @@ -628,18 +628,6 @@ struct wlr_surface *wlr_surface_create(struct wl_resource *res, return surface; } -void wlr_surface_get_matrix(struct wlr_surface *surface, float mat[static 9], - const float projection[static 9], const float transform[static 9]) { - int width = surface->texture->width; - int height = surface->texture->height; - wlr_matrix_identity(mat); - if (transform != NULL) { - wlr_matrix_multiply(mat, mat, transform); - } - wlr_matrix_scale(mat, width, height); - wlr_matrix_multiply(mat, projection, mat); -} - bool wlr_surface_has_buffer(struct wlr_surface *surface) { return surface->texture && surface->texture->valid; } |