render/pass: accept fractional destination coordinates

Signed-off-by: Loukas Agorgianitis <loukas@agorgianitis.com>
This commit is contained in:
Loukas Agorgianitis 2025-12-08 11:47:15 +02:00
parent 91c08d5a53
commit 5a49f2ae14
No known key found for this signature in database
GPG key ID: DDC6FA7D5BB332E6
13 changed files with 79 additions and 47 deletions

View file

@ -122,10 +122,17 @@ void wlr_output_add_software_cursors_to_render_pass(struct wlr_output *output,
continue;
}
struct wlr_fbox dst_box = (struct wlr_fbox){
.x = box.x,
.y = box.y,
.width = box.width,
.height = box.height,
};
wlr_render_pass_add_texture(render_pass, &(struct wlr_render_texture_options) {
.texture = texture,
.src_box = cursor->src_box,
.dst_box = box,
.dst_box = dst_box,
.clip = &cursor_damage,
.transform = output->transform,
});
@ -249,11 +256,11 @@ static struct wlr_buffer *render_cursor_buffer(struct wlr_output_cursor *cursor)
return NULL;
}
struct wlr_box dst_box = {
struct wlr_fbox dst_box = {
.width = cursor->width,
.height = cursor->height,
};
wlr_box_transform(&dst_box, &dst_box, wlr_output_transform_invert(output->transform),
wlr_fbox_transform(&dst_box, &dst_box, wlr_output_transform_invert(output->transform),
buffer->width, buffer->height);
struct wlr_buffer_pass_options options = {

View file

@ -1452,12 +1452,19 @@ static void scene_entry_render(struct render_list_entry *entry, const struct ren
int x = entry->x - data->logical.x;
int y = entry->y - data->logical.y;
struct wlr_box dst_box = {
struct wlr_box box = {
.x = x,
.y = y,
};
scene_node_get_size(node, &dst_box.width, &dst_box.height);
transform_output_box(&dst_box, data);
scene_node_get_size(node, &box.width, &box.height);
transform_output_box(&box, data);
struct wlr_fbox dst_box = (struct wlr_fbox){
.x = box.x,
.y = box.y,
.width = box.width,
.height = box.height,
};
pixman_region32_t opaque;
pixman_region32_init(&opaque);

View file

@ -256,7 +256,7 @@ static bool frame_dma_copy(struct wlr_screencopy_frame_v1 *frame,
wlr_render_pass_add_texture(pass, &(struct wlr_render_texture_options) {
.texture = src_tex,
.blend_mode = WLR_RENDER_BLEND_MODE_NONE,
.dst_box = (struct wlr_box){
.dst_box = (struct wlr_fbox){
.width = dst_buffer->width,
.height = dst_buffer->height,
},