util/matrix: Drop wlr_ prefix

This commit is contained in:
Alexander Orzechowski 2025-01-27 14:26:40 -05:00
parent 7775f55e3a
commit 97b01d9b9b
4 changed files with 19 additions and 20 deletions

View file

@ -126,7 +126,7 @@ static void render(const struct wlr_box *box, const pixman_region32_t *clip, GLi
static void set_proj_matrix(GLint loc, struct wlr_gles2_buffer *buffer, const struct wlr_box *box) {
float gl_matrix[9];
wlr_matrix_project_box(gl_matrix, box);
matrix_project_box(gl_matrix, box);
matrix_projection(gl_matrix, buffer->buffer->width, buffer->buffer->height);
glUniformMatrix3fv(loc, 1, GL_FALSE, gl_matrix);
}
@ -134,14 +134,14 @@ static void set_proj_matrix(GLint loc, struct wlr_gles2_buffer *buffer, const st
static void set_tex_matrix(GLint loc, enum wl_output_transform trans,
const struct wlr_fbox *box) {
float tex_matrix[9];
wlr_matrix_project_fbox(tex_matrix, box);
matrix_project_fbox(tex_matrix, box);
// since textures have a different origin point we have to transform
// differently if we are rotating
if (trans & WL_OUTPUT_TRANSFORM_90) {
wlr_matrix_transform(tex_matrix, wlr_output_transform_invert(trans));
matrix_transform(tex_matrix, wlr_output_transform_invert(trans));
} else {
wlr_matrix_transform(tex_matrix, trans);
matrix_transform(tex_matrix, trans);
}
glUniformMatrix3fv(loc, 1, GL_FALSE, tex_matrix);

View file

@ -619,7 +619,7 @@ static void render_pass_add_rect(struct wlr_render_pass *wlr_pass,
switch (options->blend_mode) {
case WLR_RENDER_BLEND_MODE_PREMULTIPLIED:;
float matrix[9];
wlr_matrix_project_box(matrix, &box);
matrix_project_box(matrix, &box);
matrix_projection(matrix,
pass->render_buffer->wlr_buffer->width,
pass->render_buffer->wlr_buffer->height);
@ -711,8 +711,8 @@ static void render_pass_add_texture(struct wlr_render_pass *wlr_pass,
float alpha = wlr_render_texture_options_get_alpha(options);
float matrix[9];
wlr_matrix_project_box(matrix, &dst_box);
wlr_matrix_transform(matrix, options->transform);
matrix_project_box(matrix, &dst_box);
matrix_transform(matrix, options->transform);
matrix_projection(matrix,
pass->render_buffer->wlr_buffer->width,
pass->render_buffer->wlr_buffer->height);