summaryrefslogtreecommitdiff
path: root/hw/xwayland/xwayland-glamor.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xwayland/xwayland-glamor.c')
-rw-r--r--hw/xwayland/xwayland-glamor.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index 72995de00..3792dfa8c 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -162,6 +162,23 @@ glamor_egl_fd_name_from_pixmap(ScreenPtr screen,
return 0;
}
+void
+xwl_glamor_init_backends(struct xwl_screen *xwl_screen, Bool use_eglstream)
+{
+#ifdef XWL_HAS_EGLSTREAM
+ if (use_eglstream) {
+ if (!xwl_glamor_init_eglstream(xwl_screen)) {
+ ErrorF("xwayland glamor: failed to setup EGLStream backend\n");
+ use_eglstream = FALSE;
+ }
+ }
+#endif
+ if (!use_eglstream && !xwl_glamor_init_gbm(xwl_screen)) {
+ ErrorF("xwayland glamor: failed to setup GBM backend, falling back to sw accel\n");
+ xwl_screen->glamor = 0;
+ }
+}
+
Bool
xwl_glamor_init(struct xwl_screen *xwl_screen)
{