aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
Diffstat (limited to 'rootston')
-rw-r--r--rootston/output.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/rootston/output.c b/rootston/output.c
index bd38f3ab..9aa7de65 100644
--- a/rootston/output.c
+++ b/rootston/output.c
@@ -708,16 +708,11 @@ static void damage_from_surface(struct wlr_surface *surface, int sx, int sy,
int center_x = box.x + box.width/2;
int center_y = box.y + box.height/2;
- 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,
- wlr_output->scale / (float)surface->current.scale);
+ wlr_surface_get_effective_damage(surface, &damage);
+
+ wlr_region_scale(&damage, &damage, wlr_output->scale);
if (ceil(wlr_output->scale) > surface->current.scale) {
// When scaling up a surface, it'll become blurry so we need to
// expand the damage region