Implement multi-backend support
The Clutter backend split is opaque enough that should allow us to just build all possible backends inside the same shared object, and select the wanted backend at initialization time. This requires some work in the build system, as well as the initialization code, to remove duplicate functions that might cause conflicts at build and link time. We also need to defer all the checks of the internal state of the platform-specific API to run-time type checks.
This commit is contained in:
@ -410,9 +410,15 @@ clutter_gdk_get_default_display (void)
|
||||
{
|
||||
ClutterBackend *backend = clutter_get_default_backend ();
|
||||
|
||||
if (!backend || !CLUTTER_IS_BACKEND_GDK (backend))
|
||||
if (backend == NULL)
|
||||
{
|
||||
g_critical ("GDK backend has not been initialised");
|
||||
g_critical ("The Clutter backend has not been initialised");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!CLUTTER_IS_BACKEND_GDK (backend))
|
||||
{
|
||||
g_critical ("The Clutter backend is not a GDK backend");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -446,9 +452,3 @@ clutter_gdk_set_display (GdkDisplay *display)
|
||||
|
||||
_foreign_dpy = g_object_ref (display);
|
||||
}
|
||||
|
||||
GType
|
||||
_clutter_backend_impl_get_type (void)
|
||||
{
|
||||
return _clutter_backend_gdk_get_type ();
|
||||
}
|
||||
|
Reference in New Issue
Block a user