diff options
Diffstat (limited to 'render')
-rw-r--r-- | render/gles2/pass.c | 7 | ||||
-rw-r--r-- | render/pixman/pass.c | 3 | ||||
-rw-r--r-- | render/vulkan/pass.c | 9 |
3 files changed, 12 insertions, 7 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); } diff --git a/render/pixman/pass.c b/render/pixman/pass.c index 4b85889b..5fe73b05 100644 --- a/render/pixman/pass.c +++ b/render/pixman/pass.c @@ -162,7 +162,8 @@ static void render_pass_add_rect(struct wlr_render_pass *wlr_pass, const struct wlr_render_rect_options *options) { struct wlr_pixman_render_pass *pass = get_render_pass(wlr_pass); struct wlr_pixman_buffer *buffer = pass->buffer; - struct wlr_box box = options->box; + struct wlr_box box; + wlr_render_rect_options_get_box(options, pass->buffer->buffer, &box); pixman_op_t op = get_pixman_blending(options->color.a == 1 ? WLR_RENDER_BLEND_MODE_NONE : options->blend_mode); diff --git a/render/vulkan/pass.c b/render/vulkan/pass.c index 505fd36a..afdcae80 100644 --- a/render/vulkan/pass.c +++ b/render/vulkan/pass.c @@ -428,11 +428,14 @@ static void render_pass_add_rect(struct wlr_render_pass *wlr_pass, int clip_rects_len; const pixman_box32_t *clip_rects = pixman_region32_rectangles(&clip, &clip_rects_len); + struct wlr_box box; + wlr_render_rect_options_get_box(options, pass->render_buffer->wlr_buffer, &box); + switch (options->blend_mode) { case WLR_RENDER_BLEND_MODE_PREMULTIPLIED:; float proj[9], matrix[9]; wlr_matrix_identity(proj); - wlr_matrix_project_box(matrix, &options->box, WL_OUTPUT_TRANSFORM_NORMAL, 0, proj); + wlr_matrix_project_box(matrix, &box, WL_OUTPUT_TRANSFORM_NORMAL, 0, proj); wlr_matrix_multiply(matrix, pass->projection, matrix); struct wlr_vk_pipeline *pipe = setup_get_or_create_pipeline( @@ -479,8 +482,8 @@ static void render_pass_add_rect(struct wlr_render_pass *wlr_pass, }; VkClearRect clear_rect = { .rect = { - .offset = { options->box.x, options->box.y }, - .extent = { options->box.width, options->box.height }, + .offset = { box.x, box.y }, + .extent = { box.width, box.height }, }, .layerCount = 1, }; |