MetaRendererNative: Put gbm initialization in its own function

Separate gbm initialization from general renderer initialization. Do
this even though no other initialization is done for now; later there
will will be other types of rendering mode, initialized in their own
functions.

https://bugzilla.gnome.org/show_bug.cgi?id=773629
This commit is contained in:
Jonas Ådahl 2016-08-18 11:14:03 +08:00
parent 678ebbb7f6
commit f7cd6af9c6

View File

@ -1235,11 +1235,9 @@ meta_renderer_native_finalize (GObject *object)
}
static gboolean
meta_renderer_native_initable_init (GInitable *initable,
GCancellable *cancellable,
GError **error)
init_gbm (MetaRendererNative *renderer_native,
GError **error)
{
MetaRendererNative *renderer_native = META_RENDERER_NATIVE (initable);
MetaBackend *backend = meta_get_backend ();
MetaEgl *egl = meta_backend_get_egl (backend);
struct gbm_device *gbm_device;
@ -1268,6 +1266,16 @@ meta_renderer_native_initable_init (GInitable *initable,
return TRUE;
}
static gboolean
meta_renderer_native_initable_init (GInitable *initable,
GCancellable *cancellable,
GError **error)
{
MetaRendererNative *renderer_native = META_RENDERER_NATIVE (initable);
return init_gbm (renderer_native, error);
}
static void
initable_iface_init (GInitableIface *initable_iface)
{