summaryrefslogtreecommitdiff
path: root/hw/xwayland/xwayland-glamor.h
diff options
context:
space:
mode:
authorErik Kurzinger <ekurzinger@nvidia.com>2020-12-03 14:57:51 -0800
committerMichel Dänzer <michel@daenzer.net>2021-04-09 14:00:01 +0000
commit38e875904b039ec1889e7c81eb1d577a4f69b26d (patch)
tree59573b80a73055427a5f066d339bdf94fdae1b7f /hw/xwayland/xwayland-glamor.h
parentbc99dd2127f12f1aae55971c09a2792eeaa98444 (diff)
xwayland: implement pixmap_from_buffers for the eglstream backend
Provides an implementation for the pixmap_from_buffers DRI3 function for xwayland's eglstream backend. This will be used by the NVIDIA GLX driver to pass buffers from client applications to the server. These can then be presented using the PRESENT extension. To hopefully make this less error-prone, we also introduce a "type" field for this struct to distinguish between xwl_pixmaps for the new DRI3-created pixmaps and those for the existing glamor-created pixmaps. Additionally, the patch enables wnmd present mode with the eglstream backend. This involves creating a wl_buffer for the provided dma-buf before importing it into EGL and passing this to the compositor so it can be scanned out directly if possible. Since both backends now support this present mode, the HAS_PRESENT_FLIP flag is no longer needed, so it can be removed. Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> Acked-by: Olivier Fourdan <ofourdan@redhat.com> Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Diffstat (limited to 'hw/xwayland/xwayland-glamor.h')
-rw-r--r--hw/xwayland/xwayland-glamor.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/xwayland/xwayland-glamor.h b/hw/xwayland/xwayland-glamor.h
index a86b30b40..26ab78f04 100644
--- a/hw/xwayland/xwayland-glamor.h
+++ b/hw/xwayland/xwayland-glamor.h
@@ -34,9 +34,8 @@
typedef enum _xwl_egl_backend_flags {
XWL_EGL_BACKEND_NO_FLAG = 0,
- XWL_EGL_BACKEND_HAS_PRESENT_FLIP = (1 << 0),
- XWL_EGL_BACKEND_NEEDS_BUFFER_FLUSH = (1 << 1),
- XWL_EGL_BACKEND_NEEDS_N_BUFFERING = (1 << 2),
+ XWL_EGL_BACKEND_NEEDS_BUFFER_FLUSH = (1 << 0),
+ XWL_EGL_BACKEND_NEEDS_N_BUFFERING = (1 << 1),
} xwl_egl_backend_flags;
struct xwl_egl_backend {
@@ -122,7 +121,6 @@ void xwl_glamor_post_damage(struct xwl_window *xwl_window,
PixmapPtr pixmap, RegionPtr region);
Bool xwl_glamor_allow_commits(struct xwl_window *xwl_window);
void xwl_glamor_egl_make_current(struct xwl_screen *xwl_screen);
-Bool xwl_glamor_has_present_flip(struct xwl_screen *xwl_screen);
Bool xwl_glamor_needs_buffer_flush(struct xwl_screen *xwl_screen);
Bool xwl_glamor_needs_n_buffering(struct xwl_screen *xwl_screen);
Bool xwl_glamor_is_modifier_supported(struct xwl_screen *xwl_screen,