From 3e0a0f3c3acef811bc355af766b2a46c625fecd2 Mon Sep 17 00:00:00 2001
From: random human <random.bored.human@gmail.com>
Date: Thu, 4 Oct 2018 02:01:04 +0530
Subject: 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.
---
 include/wlr/types/wlr_surface.h | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'include/wlr')

diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h
index 063f9e26..ef789b82 100644
--- a/include/wlr/types/wlr_surface.h
+++ b/include/wlr/types/wlr_surface.h
@@ -229,4 +229,12 @@ struct wlr_surface *wlr_surface_from_resource(struct wl_resource *resource);
 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.
+ */
+void wlr_surface_get_effective_damage(struct wlr_surface *surface,
+	pixman_region32_t *damage);
+
 #endif
-- 
cgit v1.2.3