Skip to content
Snippets Groups Projects
Commit f3eb1684 authored by Simon Ser's avatar Simon Ser Committed by Michel Dänzer
Browse files

xwayland: enable MIT-SHM shared pixmaps

Allow X11 clients to create shared pixmaps via the MIT-SHM
extension under Xwayland. Tested with a wlroots patch [1].

Also add a few assertions to make sure we have wl_buffers where we
need them.

[1]: https://github.com/swaywm/wlroots/pull/2875



Signed-off-by: Simon Ser's avatarSimon Ser <contact@emersion.fr>
Acked-by: default avatarMichel Dänzer <mdaenzer@redhat.com>
parent 3d33d885
No related branches found
No related tags found
1 merge request!659xwayland: enable MIT-SHM shared pixmaps
...@@ -404,6 +404,9 @@ xwl_present_check_flip2(RRCrtcPtr crtc, ...@@ -404,6 +404,9 @@ xwl_present_check_flip2(RRCrtcPtr crtc,
if (!xwl_window) if (!xwl_window)
return FALSE; return FALSE;
if (!xwl_glamor_pixmap_get_wl_buffer(pixmap))
return FALSE;
if (!xwl_glamor_check_flip(pixmap)) if (!xwl_glamor_check_flip(pixmap))
return FALSE; return FALSE;
......
...@@ -52,6 +52,10 @@ ...@@ -52,6 +52,10 @@
#include "xwayland-present.h" #include "xwayland-present.h"
#include "xwayland-shm.h" #include "xwayland-shm.h"
#ifdef MITSHM
#include "shmint.h"
#endif
#include "xdg-output-unstable-v1-client-protocol.h" #include "xdg-output-unstable-v1-client-protocol.h"
#include "viewporter-client-protocol.h" #include "viewporter-client-protocol.h"
#include "xdg-shell-client-protocol.h" #include "xdg-shell-client-protocol.h"
...@@ -662,6 +666,10 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv) ...@@ -662,6 +666,10 @@ xwl_screen_init(ScreenPtr pScreen, int argc, char **argv)
fbPictureInit(pScreen, 0, 0); fbPictureInit(pScreen, 0, 0);
#ifdef MITSHM
ShmRegisterFbFuncs(pScreen);
#endif
#ifdef HAVE_XSHMFENCE #ifdef HAVE_XSHMFENCE
if (!miSyncShmScreenInit(pScreen)) if (!miSyncShmScreenInit(pScreen))
return FALSE; return FALSE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment