Commit f8211095 authored by Roman Gilg's avatar Roman Gilg
Browse files

xwayland: Rename present event lists



Rename the lists release_queue to release_list and event_list to
wait_list.

The prior names release_queue and event_list were ambiguous: in both are event-
like vblanks which can be removed from the lists in random order. In the
release_queue can be flips that are already released but still wait for the
sync or frame callback but normally the release comes later. In the event_list
are queued events waiting for a later msc.
Signed-off-by: Roman Gilg's avatarRoman Gilg <subdiff@gmail.com>
parent 0db326e5
......@@ -67,8 +67,8 @@ xwl_present_window_get_priv(WindowPtr window)
xwl_present_window->ust = GetTimeInMicros();
xorg_list_init(&xwl_present_window->frame_callback_list);
xorg_list_init(&xwl_present_window->event_list);
xorg_list_init(&xwl_present_window->release_queue);
xorg_list_init(&xwl_present_window->wait_list);
xorg_list_init(&xwl_present_window->release_list);
dixSetPrivate(&window->devPrivates,
&xwl_present_window_private_key,
......@@ -91,16 +91,16 @@ xwl_present_timer_callback(OsTimerPtr timer,
void *arg);
static inline Bool
xwl_present_has_events(struct xwl_present_window *xwl_present_window)
xwl_present_has_pending_events(struct xwl_present_window *xwl_present_window)
{
return !!xwl_present_window->sync_flip ||
!xorg_list_is_empty(&xwl_present_window->event_list);
!xorg_list_is_empty(&xwl_present_window->wait_list);
}
static void
xwl_present_reset_timer(struct xwl_present_window *xwl_present_window)
{
if (xwl_present_has_events(xwl_present_window)) {
if (xwl_present_has_pending_events(xwl_present_window)) {
CARD32 timeout;
if (!xorg_list_is_empty(&xwl_present_window->frame_callback_list))
......@@ -156,12 +156,12 @@ xwl_present_cleanup(WindowPtr window)
}
/* Clear remaining events */
xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->event_list, list)
xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->wait_list, list)
xwl_present_free_event(event);
xwl_present_free_event(xwl_present_window->sync_flip);
xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->release_queue, list)
xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->release_list, list)
xwl_present_free_event(event);
/* Clear timer */
......@@ -222,12 +222,12 @@ xwl_present_msc_bump(struct xwl_present_window *xwl_present_window)
xwl_present_window->ust, msc);
xwl_present_free_event(event);
} else {
xorg_list_add(&event->list, &xwl_present_window->release_queue);
xorg_list_add(&event->list, &xwl_present_window->release_list);
}
}
xorg_list_for_each_entry_safe(event, tmp,
&xwl_present_window->event_list,
&xwl_present_window->wait_list,
list) {
if (event->target_msc <= msc) {
present_wnmd_event_notify(xwl_present_window->window,
......@@ -363,7 +363,7 @@ xwl_present_queue_vblank(WindowPtr present_window,
event->xwl_present_window = xwl_present_window;
event->target_msc = msc;
xorg_list_append(&event->list, &xwl_present_window->event_list);
xorg_list_append(&event->list, &xwl_present_window->wait_list);
/* If there's a pending frame callback, use that */
if (xwl_window && xwl_window->frame_callback &&
......@@ -395,14 +395,14 @@ xwl_present_abort_vblank(WindowPtr present_window,
if (!xwl_present_window)
return;
xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->event_list, list) {
xorg_list_for_each_entry_safe(event, tmp, &xwl_present_window->wait_list, list) {
if (event->event_id == event_id) {
xwl_present_free_event(event);
return;
}
}
xorg_list_for_each_entry(event, &xwl_present_window->release_queue, list) {
xorg_list_for_each_entry(event, &xwl_present_window->release_list, list) {
if (event->event_id == event_id) {
event->abort = TRUE;
return;
......@@ -477,7 +477,7 @@ xwl_present_flip(WindowPtr present_window,
xorg_list_init(&event->list);
xwl_present_window->sync_flip = event;
} else {
xorg_list_add(&event->list, &xwl_present_window->release_queue);
xorg_list_add(&event->list, &xwl_present_window->release_list);
}
xwl_pixmap_set_buffer_release_cb(pixmap, xwl_present_buffer_release, event);
......
......@@ -45,8 +45,8 @@ struct xwl_present_window {
struct wl_callback *sync_callback;
struct xorg_list event_list;
struct xorg_list release_queue;
struct xorg_list wait_list;
struct xorg_list release_list;
};
struct xwl_present_event {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment