[mutter] Make it possible to build without GLX support
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] Make it possible to build without GLX support
- Date: Tue, 6 Nov 2018 18:08:05 +0000 (UTC)
commit f1393605695f32f889ce76bfc568c26831efb580
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue Nov 6 16:18:56 2018 +0100
Make it possible to build without GLX support
configure.ac | 2 ++
src/backends/meta-backend.c | 6 ++++++
src/backends/x11/meta-renderer-x11.c | 4 ++++
3 files changed, 12 insertions(+)
---
diff --git a/configure.ac b/configure.ac
index 7c9694708..fdfaf614b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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,
diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c
index e86738d90..375e9d298 100644
--- a/src/backends/meta-backend.c
+++ b/src/backends/meta-backend.c
@@ -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)
diff --git a/src/backends/x11/meta-renderer-x11.c b/src/backends/x11/meta-renderer-x11.c
index 526861fa9..e070d63b2 100644
--- a/src/backends/x11/meta-renderer-x11.c
+++ b/src/backends/x11/meta-renderer-x11.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]