From 5d9ca27acab5eff1f68dc9d1cc8965db48367246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 22 Jul 2016 17:48:03 +0800 Subject: [PATCH] compositor: Add surface commit signal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonas Ã…dahl Reviewed-by: Daniel Stone --- libweston/compositor.c | 3 +++ libweston/compositor.h | 1 + 2 files changed, 4 insertions(+) diff --git a/libweston/compositor.c b/libweston/compositor.c index eb75c5f1..8123543b 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -455,6 +455,7 @@ weston_surface_create(struct weston_compositor *compositor) return NULL; wl_signal_init(&surface->destroy_signal); + wl_signal_init(&surface->commit_signal); surface->compositor = compositor; surface->ref_count = 1; @@ -2888,6 +2889,8 @@ weston_surface_commit_state(struct weston_surface *surface, wl_list_insert_list(&surface->feedback_list, &state->feedback_list); wl_list_init(&state->feedback_list); + + wl_signal_emit(&surface->commit_signal, surface); } static void diff --git a/libweston/compositor.h b/libweston/compositor.h index 47193385..92195674 100644 --- a/libweston/compositor.h +++ b/libweston/compositor.h @@ -1015,6 +1015,7 @@ struct weston_surface { struct wl_resource *resource; struct wl_signal destroy_signal; /* callback argument: this surface */ struct weston_compositor *compositor; + struct wl_signal commit_signal; /** Damage in local coordinates from the client, for tex upload. */ pixman_region32_t damage;