Commit b2a06e07 authored by Michel Dänzer's avatar Michel Dänzer Committed by Michel Dänzer
Browse files

xwayland/present: Drop sync_flip member of struct xwl_present_window



The same information can be determined from the flip queue.
Acked-by: Olivier Fourdan's avatarOlivier Fourdan <ofourdan@redhat.com>
parent fc53e3c5
......@@ -122,7 +122,9 @@ xwl_present_get_pending_flip(struct xwl_present_window *xwl_present_window)
static inline Bool
xwl_present_has_pending_events(struct xwl_present_window *xwl_present_window)
{
return !!xwl_present_window->sync_flip ||
present_vblank_ptr flip_pending = xwl_present_get_pending_flip(xwl_present_window);
return (flip_pending && flip_pending->sync_flip) ||
!xorg_list_is_empty(&xwl_present_window->wait_list);
}
......@@ -442,17 +444,17 @@ xwl_present_buffer_release(void *data)
static void
xwl_present_msc_bump(struct xwl_present_window *xwl_present_window)
{
present_vblank_ptr flip_pending = xwl_present_get_pending_flip(xwl_present_window);
uint64_t msc = ++xwl_present_window->msc;
struct xwl_present_event *event, *tmp;
xwl_present_window->ust = GetTimeInMicros();
event = xwl_present_window->sync_flip;
xwl_present_window->sync_flip = NULL;
if (event) {
if (flip_pending && flip_pending->sync_flip) {
event = xwl_present_event_from_id((uintptr_t)flip_pending);
event->pending = FALSE;
xwl_present_flip_notify_vblank(&event->vblank, xwl_present_window->ust, msc);
xwl_present_flip_notify_vblank(flip_pending, xwl_present_window->ust, msc);
if (!event->pixmap) {
/* If the buffer was already released, clean up now */
......@@ -757,8 +759,6 @@ xwl_present_flip(WindowPtr present_window,
event->pending = TRUE;
xorg_list_init(&event->list);
if (sync_flip)
xwl_present_window->sync_flip = event;
xwl_pixmap_set_buffer_release_cb(pixmap, xwl_present_buffer_release, event);
......
......@@ -35,7 +35,6 @@
#ifdef GLAMOR_HAS_GBM
struct xwl_present_window {
struct xwl_present_event *sync_flip;
WindowPtr window;
struct xorg_list frame_callback_list;
......
Supports Markdown
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