From 7964bdae760a5417fe18cd893f91bd85c7123173 Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Sat, 4 Dec 2021 20:05:32 +0300 Subject: surface: fix non-buffer damage handling This commit fixes the way the damage that doesn't come directly from the client is handled. --- include/wlr/types/wlr_surface.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h index ae3ae80f..4255a1f2 100644 --- a/include/wlr/types/wlr_surface.h +++ b/include/wlr/types/wlr_surface.h @@ -111,6 +111,11 @@ struct wlr_surface { * positions need to be damaged. */ pixman_region32_t buffer_damage; + /** + * The last commit's damage caused by surface and its subsurfaces' + * movement, in surface-local coordinates. + */ + pixman_region32_t external_damage; /** * The current opaque region, in surface-local coordinates. It is clipped to * the surface bounds. If the surface's buffer is using a fully opaque @@ -273,9 +278,10 @@ void wlr_surface_for_each_surface(struct wlr_surface *surface, wlr_surface_iterator_func_t iterator, void *user_data); /** - * Get the effective damage to the surface in terms of surface local - * coordinates. This includes damage induced by resizing and moving the - * surface. The damage is not expected to be bounded by the surface itself. + * Get the effective surface damage in surface-local coordinate space. Besides + * buffer damage, this includes damage induced by resizing and moving the + * surface and its subsurfaces. The resulting damage is not expected to be + * bounded by the surface itself. */ void wlr_surface_get_effective_damage(struct wlr_surface *surface, pixman_region32_t *damage); -- cgit v1.2.3