[gegl] operation: add threaded boolean to class



commit a6753fbdba6cf8b0effc84247a42d1372c34f564
Author: Øyvind Kolås <pippin gimp org>
Date:   Mon Jun 30 21:15:01 2014 +0200

    operation: add threaded boolean to class
    
    This is to enable/disable base-class implemented threading, either for
    base-classes for individual ops that conflict with their parents compatibility
    with the built in threading mechanisms.

 gegl/operation/gegl-operation.h |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/gegl/operation/gegl-operation.h b/gegl/operation/gegl-operation.h
index cd1cb59..4b323b4 100644
--- a/gegl/operation/gegl-operation.h
+++ b/gegl/operation/gegl-operation.h
@@ -82,7 +82,12 @@ struct _GeglOperationClass
                                       processing, making output buffer =
                                       input buffer.
                                       */
-  guint64         bit_pad:61;
+  guint           threaded:1;  /* do threaded processing if possible,
+                                  some base classes have special logic
+                                  to accelerate rendering; this allows opting in/out
+                                  in the sub-classes of these.
+                                */
+  guint64         bit_pad:60;
 
   /* attach this operation with a GeglNode, override this if you are creating a
    * GeglGraph, it is already defined for Filters/Sources/Composers.
@@ -245,6 +250,10 @@ void          gegl_operation_set_key           (const gchar *operation_type,
 
 gboolean      gegl_operation_use_opencl         (const GeglOperation *operation);
 
+gboolean
+gegl_operation_use_threading (GeglOperation *operation,
+                              const GeglRectangle *roi);
+
 /* Invalidate a specific rectangle, indicating the any computation depending
  * on this roi is now invalid.
  *


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