aboutsummaryrefslogtreecommitdiff
path: root/render/gles2/pass.c
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-08-28 15:01:05 -0400
committerAlexander Orzechowski <alex@ozal.ski>2023-09-21 02:25:34 -0400
commite9706e62f550f81ca6cc1546aaa3660f654eeb9f (patch)
treec06e5b26ca06638db1ba92203ff1ef73d6f74473 /render/gles2/pass.c
parent5299d973d5f497180b0ccf80d09a4aed4ebbfea2 (diff)
renderer: Use wlr_render_rect_options_get_box
Fixes: #3697
Diffstat (limited to 'render/gles2/pass.c')
-rw-r--r--render/gles2/pass.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/render/gles2/pass.c b/render/gles2/pass.c
index 9bf1747a..0bbc8bd5 100644
--- a/render/gles2/pass.c
+++ b/render/gles2/pass.c
@@ -210,17 +210,18 @@ static void render_pass_add_rect(struct wlr_render_pass *wlr_pass,
struct wlr_gles2_renderer *renderer = pass->buffer->renderer;
const struct wlr_render_color *color = &options->color;
- const struct wlr_box *box = &options->box;
+ struct wlr_box box;
+ wlr_render_rect_options_get_box(options, pass->buffer->buffer, &box);
push_gles2_debug(renderer);
setup_blending(color->a == 1.0 ? WLR_RENDER_BLEND_MODE_NONE : options->blend_mode);
glUseProgram(renderer->shaders.quad.program);
- set_proj_matrix(renderer->shaders.quad.proj, pass->projection_matrix, &options->box);
+ set_proj_matrix(renderer->shaders.quad.proj, pass->projection_matrix, &box);
glUniform4f(renderer->shaders.quad.color, color->r, color->g, color->b, color->a);
- render(box, options->clip, renderer->shaders.quad.pos_attrib);
+ render(&box, options->clip, renderer->shaders.quad.pos_attrib);
pop_gles2_debug(renderer);
}