surface: drop wlr_surface_get_matrix

This commit is contained in:
emersion 2018-03-15 18:35:22 +01:00
parent 8b58e1a3ad
commit 1914a1aa2b
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
2 changed files with 0 additions and 26 deletions

View File

@ -100,20 +100,6 @@ struct wlr_renderer;
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.

View File

@ -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;
}