aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-11-04 23:21:37 +0100
committeremersion <contact@emersion.fr>2018-11-04 23:21:37 +0100
commit0e85b92250f8f6f01134a2d53f735567896f2ec8 (patch)
treeac429fd879f4473a1cfb0d314750b20ef3ff2dce
parentd19648a304dd7c6731ce53a7b7a265019f5b4473 (diff)
Use wlr_surface_get_effective_damage
-rw-r--r--sway/desktop/output.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index 2b90f151..d48ddef3 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -415,16 +415,10 @@ static void damage_surface_iterator(struct sway_output *output,
int center_y = box.y + box.height/2;
if (pixman_region32_not_empty(&surface->buffer_damage)) {
- enum wl_output_transform transform =
- wlr_output_transform_invert(surface->current.transform);
-
pixman_region32_t damage;
pixman_region32_init(&damage);
- pixman_region32_copy(&damage, &surface->buffer_damage);
- wlr_region_transform(&damage, &damage, transform,
- surface->current.buffer_width, surface->current.buffer_height);
- wlr_region_scale(&damage, &damage,
- output->wlr_output->scale / (float)surface->current.scale);
+ 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