From c592c66625d964e8ed1f3fcfc01a245e4c8a8015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 7 May 2021 12:21:44 +0200 Subject: [PATCH] xwayland/present: Fold xwl_present_flip_notify into its callers No need for them to be separate anymore. Acked-by: Olivier Fourdan --- hw/xwayland/xwayland-present.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c index b41f11859..c525a89ca 100644 --- a/hw/xwayland/xwayland-present.c +++ b/hw/xwayland/xwayland-present.c @@ -326,22 +326,6 @@ xwl_present_event_notify(WindowPtr window, uint64_t event_id, uint64_t ust, uint } } -static void -xwl_present_flip_notify(WindowPtr window, uint64_t event_id, uint64_t ust, uint64_t msc) -{ - struct xwl_present_window *xwl_present_window = xwl_present_window_priv(window); - present_vblank_ptr vblank; - - xorg_list_for_each_entry(vblank, &xwl_present_window->flip_queue, event_queue) { - if (vblank->event_id == event_id) { - assert(!vblank->queued); - assert(vblank->window); - xwl_present_flip_notify_vblank(vblank, ust, msc); - return; - } - } -} - static void xwl_present_idle_notify(WindowPtr window, uint64_t event_id) { @@ -454,8 +438,7 @@ xwl_present_msc_bump(struct xwl_present_window *xwl_present_window) if (event) { event->pending = FALSE; - xwl_present_flip_notify(xwl_present_window->window, (uintptr_t)event, - xwl_present_window->ust, msc); + xwl_present_flip_notify_vblank(&event->vblank, xwl_present_window->ust, msc); if (!event->pixmap) { /* If the buffer was already released, clean up now */ @@ -521,8 +504,7 @@ xwl_present_sync_callback(void *data, event->pending = FALSE; - xwl_present_flip_notify(xwl_present_window->window, (uintptr_t)event, - xwl_present_window->ust, xwl_present_window->msc); + xwl_present_flip_notify_vblank(&event->vblank, xwl_present_window->ust, xwl_present_window->msc); } static const struct wl_callback_listener xwl_present_sync_listener = {