xserver: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jul 30 09:32:03 UTC 2020
hw/xwayland/xwayland-present.c | 28 +++++++---------------------
1 file changed, 7 insertions(+), 21 deletions(-)
New commits:
commit c24eb7e31e750d2b9ba8f1b72f53b07a57495395
Author: Roman Gilg <subdiff at gmail.com>
Date: Tue Jul 28 20:24:50 2020 +0200
xwayland: Simplify Present event handling code
Instead of optionally return early when an event is aborted and potentially
clean it up in there we can only optionally inform Present if not aborted and
afterwards clean it up if required.
Saves some lines of code and conditional branches.
Signed-off-by: Roman Gilg <subdiff at gmail.com>
diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c
index 7ef57e1f5..a4ecdada4 100644
--- a/hw/xwayland/xwayland-present.c
+++ b/hw/xwayland/xwayland-present.c
@@ -185,17 +185,11 @@ xwl_present_buffer_release(void *data)
xwl_present_release_pixmap(event);
- if (event->abort) {
- if (!event->pending)
- xwl_present_free_event(event);
- return;
- }
+ if (!event->abort)
+ present_wnmd_idle_notify(event->xwl_present_window->window, event->event_id);
- present_wnmd_idle_notify(event->xwl_present_window->window, event->event_id);
-
- if (!event->pending) {
+ if (!event->pending)
xwl_present_free_event(event);
- }
}
static void
@@ -279,20 +273,12 @@ xwl_present_sync_callback(void *data,
event->pending = FALSE;
- if (event->abort) {
- /* Event might have been aborted */
- if (!event->pixmap)
- /* Buffer was already released, cleanup now */
- xwl_present_free_event(event);
- return;
- }
-
- present_wnmd_flip_notify(xwl_present_window->window, event->event_id,
- xwl_present_window->ust, xwl_present_window->msc);
+ if (!event->abort)
+ present_wnmd_flip_notify(xwl_present_window->window, event->event_id,
+ xwl_present_window->ust, xwl_present_window->msc);
- if (!event->pixmap) {
+ if (!event->pixmap)
xwl_present_free_event(event);
- }
}
static const struct wl_callback_listener xwl_present_sync_listener = {
More information about the xorg-commit
mailing list