mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 20:12:06 +00:00
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
This commit is contained in:
parent
a4440b718d
commit
79ece182dc
@ -59,7 +59,9 @@
|
|||||||
|
|
||||||
G_DEFINE_TYPE (ClutterBackendEglNative, clutter_backend_egl_native, CLUTTER_TYPE_BACKEND);
|
G_DEFINE_TYPE (ClutterBackendEglNative, clutter_backend_egl_native, CLUTTER_TYPE_BACKEND);
|
||||||
|
|
||||||
|
#ifdef COGL_HAS_EGL_PLATFORM_KMS_SUPPORT
|
||||||
static int _kms_fd = -1;
|
static int _kms_fd = -1;
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_backend_egl_native_dispose (GObject *gobject)
|
clutter_backend_egl_native_dispose (GObject *gobject)
|
||||||
@ -83,11 +85,13 @@ clutter_backend_egl_native_get_renderer (ClutterBackend *backend,
|
|||||||
|
|
||||||
renderer = cogl_renderer_new ();
|
renderer = cogl_renderer_new ();
|
||||||
|
|
||||||
|
#ifdef COGL_HAS_EGL_PLATFORM_KMS_SUPPORT
|
||||||
if (_kms_fd > -1)
|
if (_kms_fd > -1)
|
||||||
{
|
{
|
||||||
cogl_renderer_set_winsys_id (renderer, COGL_WINSYS_ID_EGL_KMS);
|
cogl_renderer_set_winsys_id (renderer, COGL_WINSYS_ID_EGL_KMS);
|
||||||
cogl_kms_renderer_set_kms_fd (renderer, _kms_fd);
|
cogl_kms_renderer_set_kms_fd (renderer, _kms_fd);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return renderer;
|
return renderer;
|
||||||
}
|
}
|
||||||
@ -181,6 +185,7 @@ clutter_egl_get_egl_display (void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef COGL_HAS_EGL_PLATFORM_KMS_SUPPORT
|
||||||
/**
|
/**
|
||||||
* clutter_egl_set_kms_fd:
|
* clutter_egl_set_kms_fd:
|
||||||
* @fd: The fd to talk to the kms driver with
|
* @fd: The fd to talk to the kms driver with
|
||||||
@ -198,3 +203,4 @@ clutter_egl_set_kms_fd (int fd)
|
|||||||
{
|
{
|
||||||
_kms_fd = fd;
|
_kms_fd = fd;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@ -87,7 +87,9 @@ EGLDisplay clutter_egl_display (void);
|
|||||||
*/
|
*/
|
||||||
EGLDisplay clutter_egl_get_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);
|
void clutter_egl_set_kms_fd (int fd);
|
||||||
|
#endif
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user