summaryrefslogtreecommitdiff
path: root/hw/xwayland/xwayland-present.c
diff options
context:
space:
mode:
authorRoman Gilg <subdiff@gmail.com>2020-07-12 13:42:31 +0200
committerRoman Gilg <subdiff@gmail.com>2020-07-22 11:10:17 +0200
commitab880b8b9e8d67a05fcb085097c94bbddf7dcb95 (patch)
tree9d02a53441d2855072801552de443fac9c6bc958 /hw/xwayland/xwayland-present.c
parent932c6baca274f57beab51cd0dff1f7fa934e0ed0 (diff)
present: Idle vblanks any time in window mode
With the newly introduced separate API method for idling a presented Pixmap in window mode we can simplify the logic by allowing calls to it at any point in time. This is done by setting the flip_idler flag if the Pixmap was idled before being presented. Signed-off-by: Roman Gilg <subdiff@gmail.com>
Diffstat (limited to 'hw/xwayland/xwayland-present.c')
-rw-r--r--hw/xwayland/xwayland-present.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c
index 4d148257b..7ef57e1f5 100644
--- a/hw/xwayland/xwayland-present.c
+++ b/hw/xwayland/xwayland-present.c
@@ -191,8 +191,9 @@ xwl_present_buffer_release(void *data)
return;
}
+ present_wnmd_idle_notify(event->xwl_present_window->window, event->event_id);
+
if (!event->pending) {
- present_wnmd_idle_notify(event->xwl_present_window->window, event->event_id);
xwl_present_free_event(event);
}
}
@@ -215,7 +216,6 @@ xwl_present_msc_bump(struct xwl_present_window *xwl_present_window)
if (!event->pixmap) {
/* If the buffer was already released, clean up now */
- present_wnmd_idle_notify(xwl_present_window->window, event->event_id);
xwl_present_free_event(event);
} else {
xorg_list_add(&event->list, &xwl_present_window->release_list);
@@ -291,8 +291,6 @@ xwl_present_sync_callback(void *data,
xwl_present_window->ust, xwl_present_window->msc);
if (!event->pixmap) {
- /* If the buffer was already released, send the event now again */
- present_wnmd_idle_notify(xwl_present_window->window, event->event_id);
xwl_present_free_event(event);
}
}