diff options
Diffstat (limited to 'render/gles2/texture.c')
-rw-r--r-- | render/gles2/texture.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/render/gles2/texture.c b/render/gles2/texture.c index 5e84890f..875affe2 100644 --- a/render/gles2/texture.c +++ b/render/gles2/texture.c @@ -8,7 +8,7 @@ #include <wlr/render.h> #include <wlr/render/egl.h> #include <wlr/render/interface.h> -#include <wlr/render/matrix.h> +#include <wlr/types/wlr_matrix.h> #include <wlr/util/log.h> #include "render/gles2.h" #include "util/signal.h" @@ -264,16 +264,13 @@ static bool gles2_texture_upload_dmabuf(struct wlr_texture *_tex, } static void gles2_texture_get_matrix(struct wlr_texture *_texture, - float (*matrix)[16], const float (*projection)[16], int x, int y) { + float mat[static 9], const float projection[static 9], int x, int y) { struct wlr_gles2_texture *texture = (struct wlr_gles2_texture *)_texture; - float world[16]; - wlr_matrix_identity(matrix); - wlr_matrix_translate(&world, x, y, 0); - wlr_matrix_mul(matrix, &world, matrix); - wlr_matrix_scale(&world, - texture->wlr_texture.width, texture->wlr_texture.height, 1); - wlr_matrix_mul(matrix, &world, matrix); - wlr_matrix_mul(projection, matrix, matrix); + wlr_matrix_identity(mat); + wlr_matrix_translate(mat, x, y); + wlr_matrix_scale(mat, texture->wlr_texture.width, + texture->wlr_texture.height); + wlr_matrix_multiply(mat, projection, mat); } |