xwayland/glamor: Make xwl_glamor_init_gbm() return its status
This is a preliminary step to remove the backend's field "is_available". Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
This commit is contained in:
parent
63e2f98f0a
commit
5df6a1e969
|
@ -1283,27 +1283,25 @@ drmDevice *xwl_gbm_get_main_device(struct xwl_screen *xwl_screen)
|
|||
return xwl_gbm->device;
|
||||
}
|
||||
|
||||
void
|
||||
Bool
|
||||
xwl_glamor_init_gbm(struct xwl_screen *xwl_screen)
|
||||
{
|
||||
struct xwl_gbm_private *xwl_gbm;
|
||||
|
||||
xwl_screen->gbm_backend.is_available = FALSE;
|
||||
|
||||
if (!xwl_glamor_gbm_has_egl_extension())
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
if (!dixRegisterPrivateKey(&xwl_gbm_private_key, PRIVATE_SCREEN, 0))
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
xwl_gbm = calloc(sizeof(*xwl_gbm), 1);
|
||||
if (!xwl_gbm) {
|
||||
ErrorF("glamor: Not enough memory to setup GBM, disabling\n");
|
||||
return;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
dixSetPrivate(&xwl_screen->screen->devPrivates, &xwl_gbm_private_key,
|
||||
xwl_gbm);
|
||||
|
||||
xwl_screen->gbm_backend.is_available = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
#include "xwayland-types.h"
|
||||
|
||||
void xwl_glamor_init_gbm(struct xwl_screen *xwl_screen);
|
||||
Bool 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);
|
||||
Bool xwl_glamor_gbm_init_screen(struct xwl_screen *xwl_screen);
|
||||
|
|
Loading…
Reference in New Issue