From e9706e62f550f81ca6cc1546aaa3660f654eeb9f Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Mon, 28 Aug 2023 15:01:05 -0400 Subject: renderer: Use wlr_render_rect_options_get_box Fixes: #3697 --- render/gles2/pass.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'render/gles2') 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); } -- cgit v1.2.3