From f1ea63ff05acfca1bba35eaf9b6926799afe1ce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Wed, 18 Jul 2012 12:02:51 -0400 Subject: [PATCH] compositor: Don't record surface damage when we move or transform surfaces surface->damage is for when the contents of the surface changes. Instead, use weston_surface_damage_below() to repaint the damaged area. We avoid unecessary uploading shm and hw cursor contents this way. --- src/compositor.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 4d53a6b4..bc36d40c 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -447,10 +447,7 @@ weston_surface_update_transform(struct weston_surface *surface) weston_surface_update_transform_disable(surface); } - /* weston_surface_damage() without update */ - pixman_region32_union_rect(&surface->damage, &surface->damage, - 0, 0, surface->geometry.width, - surface->geometry.height); + weston_surface_damage_below(surface); if (weston_surface_is_mapped(surface)) weston_surface_assign_output(surface);