mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
output: optimize when drawing whole surface
This commit is contained in:
parent
a114ddbbf3
commit
5a1da1baee
1 changed files with 3 additions and 5 deletions
8
output.c
8
output.c
|
|
@ -85,7 +85,9 @@ damage_surface(struct wlr_surface *surface, int sx, int sy, void *data)
|
|||
.height = surface->current.height * wlr_output->scale,
|
||||
};
|
||||
|
||||
if (pixman_region32_not_empty(&surface->buffer_damage)) {
|
||||
if (ddata->whole) {
|
||||
wlr_output_damage_add_box(output->damage, &box);
|
||||
} else if (pixman_region32_not_empty(&surface->buffer_damage)) {
|
||||
pixman_region32_t damage;
|
||||
pixman_region32_init(&damage);
|
||||
wlr_surface_get_effective_damage(surface, &damage);
|
||||
|
|
@ -102,10 +104,6 @@ damage_surface(struct wlr_surface *surface, int sx, int sy, void *data)
|
|||
wlr_output_damage_add(output->damage, &damage);
|
||||
pixman_region32_fini(&damage);
|
||||
}
|
||||
|
||||
if (ddata->whole) {
|
||||
wlr_output_damage_add_box(output->damage, &box);
|
||||
}
|
||||
}
|
||||
|
||||
/* Used to move all of the data necessary to render a surface from the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue