diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-08-10 11:12:33 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-08-10 11:12:33 -0400 |
commit | 73adb49f15a592d25a6ff05f8ae344c6fc0b49d5 (patch) | |
tree | c9c12128a4e96bb9c210cc30cc344f181aa7b746 | |
parent | 3c12a32d1fc29cf06c36717100db41bf6d19ec3a (diff) |
release buffer on surface flush when no damage
-rw-r--r-- | types/wlr_surface.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/types/wlr_surface.c b/types/wlr_surface.c index 7891a55c..25c8e0df 100644 --- a/types/wlr_surface.c +++ b/types/wlr_surface.c @@ -128,7 +128,7 @@ void wlr_surface_flush_damage(struct wlr_surface *surface) { } pixman_region32_t damage = surface->current.surface_damage; if (!pixman_region32_not_empty(&damage)) { - return; + goto release; } int n; pixman_box32_t *rects = pixman_region32_rectangles(&damage, &n); @@ -145,6 +145,7 @@ void wlr_surface_flush_damage(struct wlr_surface *surface) { } pixman_region32_fini(&surface->current.surface_damage); pixman_region32_init(&surface->current.surface_damage); +release: wl_resource_queue_event(surface->current.buffer, WL_BUFFER_RELEASE); } |