summaryrefslogtreecommitdiff
path: root/hw/xwayland
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2024-03-12 11:14:02 +0100
committerMarge Bot <emma+marge@anholt.net>2024-03-18 15:41:17 +0000
commite1bec429bbe134c00d47a2d00cb23ac0c98fe323 (patch)
tree753ed02c94343925dc14b4dc6b0df9b150a5de8f /hw/xwayland
parentca73cd8a9d4fba648601f78027b0099548c796de (diff)
xwayland/glamor: Drop the init_egl() hook.
And call xwl_glamor_gbm_init_egl() directly instead. Yet, keep the function separate rather than merging it back into xwl_glamor_init() for clarity of the code. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
Diffstat (limited to 'hw/xwayland')
-rw-r--r--hw/xwayland/xwayland-glamor-gbm.c3
-rw-r--r--hw/xwayland/xwayland-glamor-gbm.h1
-rw-r--r--hw/xwayland/xwayland-glamor.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index dab51e1d9..d99172241 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -1154,7 +1154,7 @@ xwl_glamor_gbm_init_main_dev(struct xwl_screen *xwl_screen)
return TRUE;
}
-static Bool
+Bool
xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen)
{
struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
@@ -1301,7 +1301,6 @@ xwl_glamor_init_gbm(struct xwl_screen *xwl_screen)
dixSetPrivate(&xwl_screen->screen->devPrivates, &xwl_gbm_private_key,
xwl_gbm);
- xwl_screen->gbm_backend.init_egl = xwl_glamor_gbm_init_egl;
xwl_screen->gbm_backend.init_screen = xwl_glamor_gbm_init_screen;
xwl_screen->gbm_backend.get_wl_buffer_for_pixmap = xwl_glamor_gbm_get_wl_buffer_for_pixmap;
xwl_screen->gbm_backend.check_flip = NULL;
diff --git a/hw/xwayland/xwayland-glamor-gbm.h b/hw/xwayland/xwayland-glamor-gbm.h
index 125d8a1b5..6371f2de8 100644
--- a/hw/xwayland/xwayland-glamor-gbm.h
+++ b/hw/xwayland/xwayland-glamor-gbm.h
@@ -36,5 +36,6 @@
void xwl_glamor_init_gbm(struct xwl_screen *xwl_screen);
Bool xwl_glamor_has_wl_drm(struct xwl_screen *xwl_screen);
+Bool xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen);
#endif /* XWAYLAND_GLAMOR_GBM_H */
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index d518bfb90..7461dd1ce 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -390,7 +390,7 @@ xwl_glamor_init(struct xwl_screen *xwl_screen)
return FALSE;
}
- if (!xwl_screen->egl_backend->init_egl(xwl_screen)) {
+ if (!xwl_glamor_gbm_init_egl(xwl_screen)) {
ErrorF("EGL setup failed, disabling glamor\n");
return FALSE;
}