compositor: Add surface commit signal

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Jonas Ådahl 2016-07-22 17:48:03 +08:00
parent 30d61d89c1
commit 5d9ca27aca
2 changed files with 4 additions and 0 deletions

View File

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

View File

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