mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-29 02:22:20 +00:00
scene: fix double scaling of opaque region for blend mode optimization
This commit is contained in:
parent
341154a5f6
commit
8fdf9dc4f0
@ -1181,16 +1181,19 @@ static void scene_entry_render(struct render_list_entry *entry, const struct ren
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int x = entry->x - data->logical.x;
|
||||||
|
int y = entry->y - data->logical.y;
|
||||||
|
|
||||||
struct wlr_box dst_box = {
|
struct wlr_box dst_box = {
|
||||||
.x = entry->x - data->logical.x,
|
.x = x,
|
||||||
.y = entry->y - data->logical.y,
|
.y = y,
|
||||||
};
|
};
|
||||||
scene_node_get_size(node, &dst_box.width, &dst_box.height);
|
scene_node_get_size(node, &dst_box.width, &dst_box.height);
|
||||||
scale_box(&dst_box, data->scale);
|
scale_box(&dst_box, data->scale);
|
||||||
|
|
||||||
pixman_region32_t opaque;
|
pixman_region32_t opaque;
|
||||||
pixman_region32_init(&opaque);
|
pixman_region32_init(&opaque);
|
||||||
scene_node_opaque_region(node, dst_box.x, dst_box.y, &opaque);
|
scene_node_opaque_region(node, x, y, &opaque);
|
||||||
scale_output_damage(&opaque, data->scale);
|
scale_output_damage(&opaque, data->scale);
|
||||||
pixman_region32_subtract(&opaque, &render_region, &opaque);
|
pixman_region32_subtract(&opaque, &render_region, &opaque);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user