Make it possible to build without GLX support

This commit is contained in:
Jonas Ådahl 2018-11-06 16:18:56 +01:00
parent bf42b54faa
commit f139360569
3 changed files with 12 additions and 0 deletions

View File

@ -290,6 +290,8 @@ AS_IF([test "$have_native_backend" = "yes"], [
])
AM_CONDITIONAL([HAVE_NATIVE_BACKEND],[test "$have_native_backend" = "yes"])
AC_DEFINE([HAVE_EGL],[1], [Defined if EGL support is enabled])
MUTTER_WAYLAND_EGLSTREAM_MODULES="wayland-eglstream-protocols"
AC_ARG_ENABLE(egl-device,

View File

@ -91,7 +91,9 @@ struct _MetaBackendPrivate
MetaCursorRenderer *cursor_renderer;
MetaInputSettings *input_settings;
MetaRenderer *renderer;
#ifdef HAVE_EGL
MetaEgl *egl;
#endif
MetaSettings *settings;
#ifdef HAVE_REMOTE_DESKTOP
MetaRemoteAccessController *remote_access_controller;
@ -774,7 +776,9 @@ meta_backend_initable_init (GInitable *initable,
priv->settings = meta_settings_new (backend);
#ifdef HAVE_EGL
priv->egl = g_object_new (META_TYPE_EGL, NULL);
#endif
priv->orientation_manager = g_object_new (META_TYPE_ORIENTATION_MANAGER, NULL);
@ -885,6 +889,7 @@ meta_backend_get_renderer (MetaBackend *backend)
return priv->renderer;
}
#ifdef HAVE_EGL
/**
* meta_backend_get_egl: (skip)
*/
@ -895,6 +900,7 @@ meta_backend_get_egl (MetaBackend *backend)
return priv->egl;
}
#endif /* HAVE_EGL */
/**
* meta_backend_get_settings: (skip)

View File

@ -60,7 +60,11 @@ get_x11_cogl_winsys_vtable (CoglRenderer *renderer)
#endif
case COGL_DRIVER_GL:
case COGL_DRIVER_GL3:
#ifdef COGL_HAS_GLX_SUPPORT
return _cogl_winsys_glx_get_vtable ();
#else
break;
#endif
case COGL_DRIVER_ANY:
case COGL_DRIVER_NOP:
break;