[gimp] app/gegl: temp hotfix to disable threading in gegl:copy-buffer



commit bac042db39a5fab2b04ee64ead4fcc95734dc218
Author: Øyvind Kolås <pippin gimp org>
Date:   Sat Aug 19 17:12:03 2017 +0200

    app/gegl: temp hotfix to disable threading in gegl:copy-buffer

 app/gegl/gimp-gegl.c |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/app/gegl/gimp-gegl.c b/app/gegl/gimp-gegl.c
index 143bb0b..3f38293 100644
--- a/app/gegl/gimp-gegl.c
+++ b/app/gegl/gimp-gegl.c
@@ -39,6 +39,7 @@ static void  gimp_gegl_notify_tile_cache_size (GimpGeglConfig *config);
 static void  gimp_gegl_notify_num_processors  (GimpGeglConfig *config);
 static void  gimp_gegl_notify_use_opencl      (GimpGeglConfig *config);
 
+#include <operation/gegl-operation.h>
 
 void
 gimp_gegl_init (Gimp *gimp)
@@ -68,6 +69,27 @@ gimp_gegl_init (Gimp *gimp)
   gimp_babl_init ();
 
   gimp_operations_init (gimp);
+
+  if (GEGL_MAJOR_VERSION == 0 &&
+      GEGL_MINOR_VERSION == 3 &&
+      GEGL_MICRO_VERSION <= 21)
+  {
+    /* XXX:
+     *
+     * hot-fix for bug #785521 and duplicates, this code to
+     * be removed after GIMP 2.9.6 is released and GIMP depends
+     * on 0.3.21 or newer again, we do it also for GEGL 0.3.21
+     * since setting it to FALSE when it already is FALSE
+     * is no harm.
+     */
+    GType op_type = g_type_from_name ("GeglOpcopy-buffer_c");
+    if (op_type)
+    {
+      GeglOperationClass *op_class = g_type_class_ref (op_type);
+      if (op_class)
+        op_class->threaded = FALSE;
+    }
+  }
 }
 
 static void


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