xwayland/glamor: Remove the flag "is_available"
Now that we have only one GBM backend, either it is available and usable, or we cannot use GLAMOR. Therefore we can drop the flag "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
5df6a1e969
commit
5fd0c92b0e
|
@ -172,14 +172,7 @@ wl_drm_format_for_depth(int depth)
|
|||
static drmDevice *
|
||||
xwl_screen_get_main_dev(struct xwl_screen *xwl_screen)
|
||||
{
|
||||
/*
|
||||
* If we have gbm then get our main device from it. Otherwise use what
|
||||
* the compositor told us.
|
||||
*/
|
||||
if (xwl_screen->gbm_backend.is_available)
|
||||
return xwl_gbm_get_main_device(xwl_screen);
|
||||
else
|
||||
return xwl_screen->default_feedback.main_dev;
|
||||
return xwl_gbm_get_main_device(xwl_screen);
|
||||
}
|
||||
|
||||
static Bool
|
||||
|
|
|
@ -313,8 +313,7 @@ void
|
|||
xwl_glamor_init_backends(struct xwl_screen *xwl_screen)
|
||||
{
|
||||
#ifdef GLAMOR_HAS_GBM
|
||||
xwl_glamor_init_gbm(xwl_screen);
|
||||
if (!xwl_screen->gbm_backend.is_available)
|
||||
if (!xwl_glamor_init_gbm(xwl_screen))
|
||||
ErrorF("Xwayland glamor: GBM backend is not available\n");
|
||||
#endif
|
||||
}
|
||||
|
@ -323,8 +322,7 @@ static Bool
|
|||
xwl_glamor_select_gbm_backend(struct xwl_screen *xwl_screen)
|
||||
{
|
||||
#ifdef GLAMOR_HAS_GBM
|
||||
if (xwl_screen->gbm_backend.is_available &&
|
||||
xwl_glamor_has_wl_interfaces(xwl_screen, &xwl_screen->gbm_backend)) {
|
||||
if (xwl_glamor_has_wl_interfaces(xwl_screen, &xwl_screen->gbm_backend)) {
|
||||
xwl_screen->egl_backend = &xwl_screen->gbm_backend;
|
||||
LogMessageVerb(X_INFO, 3, "glamor: Using GBM backend\n");
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in New Issue