From 104c7c50485238a1e8c2090dc96126e9624ef870 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 18 May 2021 18:02:59 +0200 Subject: [PATCH] xwayland/present: Move wl_buffer check into xwl_glamor_check_flip Keeps the glamor specific code together more. Reviewed-by: Olivier Fourdan --- hw/xwayland/xwayland-glamor.c | 3 +++ hw/xwayland/xwayland-present.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c index e940f9fd7..2729e8747 100644 --- a/hw/xwayland/xwayland-glamor.c +++ b/hw/xwayland/xwayland-glamor.c @@ -84,6 +84,9 @@ xwl_glamor_check_flip(PixmapPtr pixmap) { struct xwl_screen *xwl_screen = xwl_screen_get(pixmap->drawable.pScreen); + if (!xwl_glamor_pixmap_get_wl_buffer(pixmap)) + return FALSE; + if (xwl_screen->egl_backend->check_flip) return xwl_screen->egl_backend->check_flip(pixmap); diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c index c0f128833..83d67517a 100644 --- a/hw/xwayland/xwayland-present.c +++ b/hw/xwayland/xwayland-present.c @@ -404,9 +404,6 @@ xwl_present_check_flip2(RRCrtcPtr crtc, if (!xwl_window) return FALSE; - if (!xwl_glamor_pixmap_get_wl_buffer(pixmap)) - return FALSE; - if (!xwl_glamor_check_flip(pixmap)) return FALSE;