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.
This commit is contained in:
random human 2018-10-04 02:01:04 +05:30
parent 84ecfb546b
commit 3e0a0f3c3a
No known key found for this signature in database
GPG key ID: 73E5A60444CC77A3
3 changed files with 56 additions and 30 deletions

View file

@ -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