diff options
author | Michel Dänzer <mdaenzer@redhat.com> | 2024-01-09 17:35:21 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-04-10 08:55:08 +0000 |
commit | 4495c696b5dfa78a4ba80b76888f85532386d1b8 (patch) | |
tree | 3ddafc0e81e81d64979b279cdbc63e94cefbf692 | |
parent | aa05f38f3deb55b63759571a9c600ef8f71b489c (diff) |
xwayland/present: Check window & source pixmap depth match last
Preparation for next commit, no functional change intended.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1300>
-rw-r--r-- | hw/xwayland/xwayland-present.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c index ff0a560db..43f053dfb 100644 --- a/hw/xwayland/xwayland-present.c +++ b/hw/xwayland/xwayland-present.c @@ -773,16 +773,6 @@ xwl_present_check_flip(RRCrtcPtr crtc, if (!RegionEqual(&present_window->clipList, &present_window->winSize)) return FALSE; -#ifdef XWL_HAS_GLAMOR - if (xwl_window->xwl_screen->glamor && - !xwl_glamor_check_flip(present_window, pixmap)) - return FALSE; - - if (!xwl_glamor_supports_implicit_sync(xwl_window->xwl_screen) && - !xwl_window->xwl_screen->explicit_sync) - return FALSE; -#endif /* XWL_HAS_GLAMOR */ - /* Can't flip if the window pixmap doesn't match the xwl_window parent * window's, e.g. because a client redirected this window or one of its * parents. @@ -798,6 +788,16 @@ xwl_present_check_flip(RRCrtcPtr crtc, if (!RegionEqual(&xwl_window->toplevel->winSize, &present_window->winSize)) return FALSE; +#ifdef XWL_HAS_GLAMOR + if (!xwl_glamor_supports_implicit_sync(xwl_window->xwl_screen) && + !xwl_window->xwl_screen->explicit_sync) + return FALSE; + + if (xwl_window->xwl_screen->glamor && + !xwl_glamor_check_flip(present_window, pixmap)) + return FALSE; +#endif /* XWL_HAS_GLAMOR */ + return TRUE; } |