[clutter/clutter-1.18] egl: Only expose clutter_egl_set_kms_fd if we have KMS support
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/clutter-1.18] egl: Only expose clutter_egl_set_kms_fd if we have KMS support
- Date: Sat, 15 Mar 2014 19:24:46 +0000 (UTC)
commit 79ece182dc1b6939bd4bf16c4bae7838aaf00de1
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Mar 14 21:24:57 2014 -0400
egl: Only expose clutter_egl_set_kms_fd if we have KMS support
And only call the proper Cogl functions in that case, too. This
fixes the build on platforms without KMS, like the BSDs.
https://bugzilla.gnome.org/show_bug.cgi?id=726198
clutter/egl/clutter-backend-eglnative.c | 6 ++++++
clutter/egl/clutter-egl.h | 2 ++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/clutter/egl/clutter-backend-eglnative.c b/clutter/egl/clutter-backend-eglnative.c
index 0541c56..bbc9e70 100644
--- a/clutter/egl/clutter-backend-eglnative.c
+++ b/clutter/egl/clutter-backend-eglnative.c
@@ -59,7 +59,9 @@
G_DEFINE_TYPE (ClutterBackendEglNative, clutter_backend_egl_native, CLUTTER_TYPE_BACKEND);
+#ifdef COGL_HAS_EGL_PLATFORM_KMS_SUPPORT
static int _kms_fd = -1;
+#endif
static void
clutter_backend_egl_native_dispose (GObject *gobject)
@@ -83,11 +85,13 @@ clutter_backend_egl_native_get_renderer (ClutterBackend *backend,
renderer = cogl_renderer_new ();
+#ifdef COGL_HAS_EGL_PLATFORM_KMS_SUPPORT
if (_kms_fd > -1)
{
cogl_renderer_set_winsys_id (renderer, COGL_WINSYS_ID_EGL_KMS);
cogl_kms_renderer_set_kms_fd (renderer, _kms_fd);
}
+#endif
return renderer;
}
@@ -181,6 +185,7 @@ clutter_egl_get_egl_display (void)
#endif
}
+#ifdef COGL_HAS_EGL_PLATFORM_KMS_SUPPORT
/**
* clutter_egl_set_kms_fd:
* @fd: The fd to talk to the kms driver with
@@ -198,3 +203,4 @@ clutter_egl_set_kms_fd (int fd)
{
_kms_fd = fd;
}
+#endif
diff --git a/clutter/egl/clutter-egl.h b/clutter/egl/clutter-egl.h
index a06cf8c..8edfc1f 100644
--- a/clutter/egl/clutter-egl.h
+++ b/clutter/egl/clutter-egl.h
@@ -87,7 +87,9 @@ EGLDisplay clutter_egl_display (void);
*/
EGLDisplay clutter_egl_get_egl_display (void);
+#ifdef COGL_HAS_EGL_PLATFORM_KMS_SUPPORT
void clutter_egl_set_kms_fd (int fd);
+#endif
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]