[gnome-photos] application, gegl, thumbnailer: Consolidate GEGL initialization



commit 017339717d095eae42362f022e87469f2d7a918a
Author: Debarshi Ray <debarshir gnome org>
Date:   Sun Oct 29 23:29:25 2017 +0100

    application, gegl, thumbnailer: Consolidate GEGL initialization
    
    The following patches are going to set GEGL's application-license and
    threads properties during initialization. This will make it easier to
    ensure that the same configuration is used by the application and the
    thumbnailer.

 src/photos-application.c |    2 +-
 src/photos-gegl.c        |    7 +++++++
 src/photos-gegl.h        |    2 ++
 src/photos-thumbnailer.c |    2 +-
 4 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index 45102df..dfe8d1f 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -1873,7 +1873,7 @@ photos_application_startup (GApplication *application)
 
   G_APPLICATION_CLASS (photos_application_parent_class)->startup (application);
 
-  gegl_init (NULL, NULL);
+  photos_gegl_init ();
 
   grl_init (NULL, NULL);
   registry = grl_registry_get_default ();
diff --git a/src/photos-gegl.c b/src/photos-gegl.c
index d943608..60963f7 100644
--- a/src/photos-gegl.c
+++ b/src/photos-gegl.c
@@ -267,6 +267,13 @@ photos_gegl_get_buffer_from_node (GeglNode *node, const Babl *format)
 
 
 void
+photos_gegl_init (void)
+{
+  gegl_init (NULL, NULL);
+}
+
+
+void
 photos_gegl_init_fishes (void)
 {
   gint64 end;
diff --git a/src/photos-gegl.h b/src/photos-gegl.h
index 11d0176..147f467 100644
--- a/src/photos-gegl.h
+++ b/src/photos-gegl.h
@@ -47,6 +47,8 @@ void             photos_gegl_ensure_builtins              (void);
 
 GeglBuffer      *photos_gegl_get_buffer_from_node         (GeglNode *node, const Babl *format);
 
+void             photos_gegl_init                         (void);
+
 void             photos_gegl_init_fishes                  (void);
 
 void             photos_gegl_processor_process_async      (GeglProcessor *processor,
diff --git a/src/photos-thumbnailer.c b/src/photos-thumbnailer.c
index 34f70a9..2085d5d 100644
--- a/src/photos-thumbnailer.c
+++ b/src/photos-thumbnailer.c
@@ -768,7 +768,7 @@ photos_thumbnailer_startup (GApplication *application)
 
   G_APPLICATION_CLASS (photos_thumbnailer_parent_class)->startup (application);
 
-  gegl_init (NULL, NULL);
+  photos_gegl_init ();
 
   self->resource_gegl = photos_gegl_get_resource ();
   g_resources_register (self->resource_gegl);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]