diff --git a/include/types/wlr_matrix.h b/include/types/wlr_matrix.h index ce599dc1b..e9af2f636 100644 --- a/include/types/wlr_matrix.h +++ b/include/types/wlr_matrix.h @@ -1,7 +1,40 @@ #ifndef TYPES_WLR_MATRIX_H #define TYPES_WLR_MATRIX_H -#include +#include + +struct wlr_box; + +/** Writes the identity matrix into mat */ +void wlr_matrix_identity(float mat[static 9]); + +/** mat ← a × b */ +void wlr_matrix_multiply(float mat[static 9], const float a[static 9], + const float b[static 9]); + +void wlr_matrix_transpose(float mat[static 9], const float a[static 9]); + +/** Writes a 2D translation matrix to mat of magnitude (x, y) */ +void wlr_matrix_translate(float mat[static 9], float x, float y); + +/** Writes a 2D scale matrix to mat of magnitude (x, y) */ +void wlr_matrix_scale(float mat[static 9], float x, float y); + +/** Writes a 2D rotation matrix to mat at an angle of rad radians */ +void wlr_matrix_rotate(float mat[static 9], float rad); + +/** Writes a transformation matrix which applies the specified + * wl_output_transform to mat */ +void wlr_matrix_transform(float mat[static 9], + enum wl_output_transform transform); + +/** Shortcut for the various matrix operations involved in projecting the + * specified wlr_box onto a given orthographic projection with a given + * rotation. The result is written to mat, which can be applied to each + * coordinate of the box to get a new coordinate from [-1,1]. */ +void wlr_matrix_project_box(float mat[static 9], const struct wlr_box *box, + enum wl_output_transform transform, float rotation, + const float projection[static 9]); /** * Writes a 2D orthographic projection matrix to mat of (width, height) with a diff --git a/include/wlr/types/wlr_matrix.h b/include/wlr/types/wlr_matrix.h deleted file mode 100644 index 674cb5382..000000000 --- a/include/wlr/types/wlr_matrix.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This is a deprecated interface of wlroots. It will be removed in a future - * version. - */ - -#ifndef WLR_TYPES_WLR_MATRIX_H -#define WLR_TYPES_WLR_MATRIX_H - -#include - -struct wlr_box; - -/** Writes the identity matrix into mat */ -void wlr_matrix_identity(float mat[static 9]); - -/** mat ← a × b */ -void wlr_matrix_multiply(float mat[static 9], const float a[static 9], - const float b[static 9]); - -void wlr_matrix_transpose(float mat[static 9], const float a[static 9]); - -/** Writes a 2D translation matrix to mat of magnitude (x, y) */ -void wlr_matrix_translate(float mat[static 9], float x, float y); - -/** Writes a 2D scale matrix to mat of magnitude (x, y) */ -void wlr_matrix_scale(float mat[static 9], float x, float y); - -/** Writes a 2D rotation matrix to mat at an angle of rad radians */ -void wlr_matrix_rotate(float mat[static 9], float rad); - -/** Writes a transformation matrix which applies the specified - * wl_output_transform to mat */ -void wlr_matrix_transform(float mat[static 9], - enum wl_output_transform transform); - -/** Shortcut for the various matrix operations involved in projecting the - * specified wlr_box onto a given orthographic projection with a given - * rotation. The result is written to mat, which can be applied to each - * coordinate of the box to get a new coordinate from [-1,1]. */ -void wlr_matrix_project_box(float mat[static 9], const struct wlr_box *box, - enum wl_output_transform transform, float rotation, - const float projection[static 9]); - -#endif diff --git a/render/gles2/pass.c b/render/gles2/pass.c index 71baf2cec..96b66065e 100644 --- a/render/gles2/pass.c +++ b/render/gles2/pass.c @@ -4,7 +4,6 @@ #include #include #include -#include #include #include "render/egl.h" #include "render/gles2.h" diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index 4cdbf3f6e..d10311e1c 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/types/wlr_matrix.c b/types/wlr_matrix.c index 7b6671f57..8f8f73fa1 100644 --- a/types/wlr_matrix.c +++ b/types/wlr_matrix.c @@ -1,7 +1,6 @@ #include #include #include -#include #include #include #include "types/wlr_matrix.h"