From 4863ee5ef1737a4495fd2852d90cb3a475d8adad Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 20 Jun 2023 01:07:46 +0100 Subject: [PATCH] surface: Move presentation-feedback discard to commit There's no reason for it to belong in attach, really. Signed-off-by: Daniel Stone --- libweston/compositor.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libweston/compositor.c b/libweston/compositor.c index f36ac4775..12fd9e1d3 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -2679,7 +2679,6 @@ weston_surface_attach(struct weston_surface *surface, surface->compositor->renderer->attach(surface, buffer); weston_surface_calculate_size_from_buffer(surface); - weston_presentation_feedback_discard_list(&surface->feedback_list); if (buffer) surface->is_opaque = pixel_format_is_opaque(buffer->pixel_format); @@ -4038,6 +4037,10 @@ weston_surface_commit_state(struct weston_surface *surface, /* zwp_surface_synchronization_v1.get_release */ weston_buffer_release_move(&surface->buffer_release_ref, &state->buffer_release_ref); + + /* wp_presentation.feedback */ + weston_presentation_feedback_discard_list(&surface->feedback_list); + weston_surface_attach(surface, state->buffer); } weston_surface_state_set_buffer(state, NULL);