aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authorrandom human <random.bored.human@gmail.com>2018-10-04 02:01:04 +0530
committerrandom human <random.bored.human@gmail.com>2018-10-04 02:19:09 +0530
commit3e0a0f3c3acef811bc355af766b2a46c625fecd2 (patch)
treed9d803a00006fa1a06fa6e3e487d120843b4130c /rootston
parent84ecfb546bdb2e5b21907d1ef62f6aa7477ff094 (diff)
wlr_surface: add wlr_surface_get_effective_damage
This calculates and returns the effective damage of the surface in surface coordinates, including the client damage (in buffer coordinates), and damage induced by resize or move events.
Diffstat (limited to 'rootston')
-rw-r--r--rootston/output.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/rootston/output.c b/rootston/output.c
index 6a6b25c4..d7c5d821 100644
--- a/rootston/output.c
+++ b/rootston/output.c
@@ -696,13 +696,10 @@ 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 = 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_surface_get_effective_damage(surface, &damage);
+
wlr_region_scale(&damage, &damage,
wlr_output->scale / (float)surface->current.scale);
if (ceil(wlr_output->scale) > surface->current.scale) {