diff options
author | Kirill Primak <vyivel@posteo.net> | 2021-12-04 20:39:13 +0300 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-12-06 16:44:34 +0100 |
commit | 03a29ed36df22f39198168c95d940a59578daa49 (patch) | |
tree | f180b830f0fbbbfda6b88597f1168f0d66432f12 /sway | |
parent | b518b1295cc0eb4237f695ee31bb8e0bba773a20 (diff) |
output: remove surface buffer damage check
A surface can have effective damage even without any buffer damage
committed.
Diffstat (limited to 'sway')
-rw-r--r-- | sway/desktop/output.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index ed6bc064..e0d76349 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -633,21 +633,19 @@ static void damage_surface_iterator(struct sway_output *output, struct wlr_box box = *_box; scale_box(&box, output->wlr_output->scale); - if (pixman_region32_not_empty(&surface->buffer_damage)) { - pixman_region32_t damage; - pixman_region32_init(&damage); - wlr_surface_get_effective_damage(surface, &damage); - wlr_region_scale(&damage, &damage, output->wlr_output->scale); - if (ceil(output->wlr_output->scale) > surface->current.scale) { - // When scaling up a surface, it'll become blurry so we need to - // expand the damage region - wlr_region_expand(&damage, &damage, - ceil(output->wlr_output->scale) - surface->current.scale); - } - pixman_region32_translate(&damage, box.x, box.y); - wlr_output_damage_add(output->damage, &damage); - pixman_region32_fini(&damage); - } + pixman_region32_t damage; + pixman_region32_init(&damage); + wlr_surface_get_effective_damage(surface, &damage); + wlr_region_scale(&damage, &damage, output->wlr_output->scale); + if (ceil(output->wlr_output->scale) > surface->current.scale) { + // When scaling up a surface, it'll become blurry so we need to + // expand the damage region + wlr_region_expand(&damage, &damage, + ceil(output->wlr_output->scale) - surface->current.scale); + } + pixman_region32_translate(&damage, box.x, box.y); + wlr_output_damage_add(output->damage, &damage); + pixman_region32_fini(&damage); if (whole) { wlr_output_damage_add_box(output->damage, &box); |