xwayland/present: Fold xwl_present_event_notify into its caller

Can just call xwl_present_execute directly.

This allows dropping the window member from struct xwl_present_window as
well.

Acked-by: Olivier Fourdan <ofourdan@redhat.com>
This commit is contained in:
Michel Dänzer 2021-05-07 17:55:13 +02:00 committed by Michel Dänzer
parent c30f3d08ac
commit f8c086b214
2 changed files with 5 additions and 34 deletions

View File

@ -66,7 +66,6 @@ xwl_present_window_get_priv(WindowPtr window)
if (!xwl_present_window)
return NULL;
xwl_present_window->window = window;
xwl_present_window->msc = 1;
xwl_present_window->ust = GetTimeInMicros();
@ -306,34 +305,6 @@ xwl_present_flip_notify_vblank(present_vblank_ptr vblank, uint64_t ust, uint64_t
xwl_present_flip_try_ready(xwl_present_window);
}
static void
xwl_present_event_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_window_priv_ptr window_priv = present_window_priv(window);
present_vblank_ptr vblank;
if (!window_priv)
return;
if (!event_id)
return;
DebugPresent(("\te %" PRIu64 " ust %" PRIu64 " msc %" PRIu64 "\n", event_id, ust, msc));
xorg_list_for_each_entry(vblank, &xwl_present_window->exec_queue, event_queue) {
if (event_id == vblank->event_id) {
xwl_present_execute(vblank, ust, msc);
return;
}
}
xorg_list_for_each_entry(vblank, &xwl_present_window->flip_queue, event_queue) {
if (vblank->event_id == event_id) {
assert(vblank->queued);
xwl_present_execute(vblank, ust, msc);
return;
}
}
}
static void
xwl_present_update_window_crtc(present_window_priv_ptr window_priv, RRCrtcPtr crtc, uint64_t new_msc)
{
@ -440,10 +411,11 @@ xwl_present_msc_bump(struct xwl_present_window *xwl_present_window)
list) {
if (event->target_msc <= msc) {
xorg_list_del(&event->list);
xwl_present_event_notify(xwl_present_window->window,
(uintptr_t)event,
xwl_present_window->ust,
msc);
DebugPresent(("\te %" PRIu64 " ust %" PRIu64 " msc %" PRIu64 "\n",
event->vblank.event_id, xwl_present_window->ust, msc));
xwl_present_execute(&event->vblank, xwl_present_window->ust, msc);
}
}
}

View File

@ -35,7 +35,6 @@
#ifdef GLAMOR_HAS_GBM
struct xwl_present_window {
WindowPtr window;
struct xorg_list frame_callback_list;
uint64_t msc;