aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-11-04 14:31:17 +0100
committerGitHub <noreply@github.com>2018-11-04 14:31:17 +0100
commitd7b010024a4e46acb1eb5c54c1ce31dd816fb995 (patch)
treed0bd457e9ebadce5a020369fe3c922a671458125 /rootston
parentcb503973cea7c7929c2fcc6fbeb886f2b8a6fa5a (diff)
parentdec303bea6bdc31941c32074286521b742f932d4 (diff)
Merge pull request #1261 from arandomhuman/damage-control
Fix damage tracking for surfaces with transforms
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