[gimp/pippin/linear-is-the-new-black: 8/10] app: make layer mode class capable of doing layer modes



commit 5b00e0f5c494eb2b7d456bf946d2a84ec3731dd7
Author: Øyvind Kolås <pippin gimp org>
Date:   Mon Jan 23 14:44:27 2017 +0100

    app: make layer mode class capable of doing layer modes

 app/core/gimp-layer-modes.c                        |    3 +-
 app/operations/gimp-operations.c                   |   48 +-------
 app/operations/layer-modes/Makefile.am             |   49 +-------
 .../layer-modes/gimplayermodefunctions.c           |  131 +-------------------
 app/operations/layer-modes/gimpoperationaddition.c |   73 -----------
 app/operations/layer-modes/gimpoperationaddition.h |   63 ----------
 app/operations/layer-modes/gimpoperationburn.c     |   72 -----------
 app/operations/layer-modes/gimpoperationburn.h     |   63 ----------
 .../layer-modes/gimpoperationdarkenonly.c          |   72 -----------
 .../layer-modes/gimpoperationdarkenonly.h          |   63 ----------
 .../layer-modes/gimpoperationdifference.c          |   72 -----------
 .../layer-modes/gimpoperationdifference.h          |   63 ----------
 app/operations/layer-modes/gimpoperationdivide.c   |   72 -----------
 app/operations/layer-modes/gimpoperationdivide.h   |   63 ----------
 app/operations/layer-modes/gimpoperationdodge.c    |   72 -----------
 app/operations/layer-modes/gimpoperationdodge.h    |   63 ----------
 .../layer-modes/gimpoperationgrainextract.c        |   72 -----------
 .../layer-modes/gimpoperationgrainextract.h        |   63 ----------
 .../layer-modes/gimpoperationgrainmerge.c          |   72 -----------
 .../layer-modes/gimpoperationgrainmerge.h          |   63 ----------
 .../layer-modes/gimpoperationhardlight.c           |   71 -----------
 .../layer-modes/gimpoperationhardlight.h           |   62 ---------
 app/operations/layer-modes/gimpoperationhsvcolor.c |   76 -----------
 app/operations/layer-modes/gimpoperationhsvcolor.h |   63 ----------
 app/operations/layer-modes/gimpoperationhsvhue.c   |   76 -----------
 app/operations/layer-modes/gimpoperationhsvhue.h   |   63 ----------
 .../layer-modes/gimpoperationhsvsaturation.c       |   76 -----------
 .../layer-modes/gimpoperationhsvsaturation.h       |   63 ----------
 app/operations/layer-modes/gimpoperationhsvvalue.c |   76 -----------
 app/operations/layer-modes/gimpoperationhsvvalue.h |   63 ----------
 .../layer-modes/gimpoperationlayermode.c           |   10 +--
 .../layer-modes/gimpoperationlayermode.h           |    9 ++
 .../layer-modes/gimpoperationlchchroma.c           |   75 -----------
 .../layer-modes/gimpoperationlchchroma.h           |   64 ----------
 app/operations/layer-modes/gimpoperationlchcolor.c |   75 -----------
 app/operations/layer-modes/gimpoperationlchcolor.h |   64 ----------
 app/operations/layer-modes/gimpoperationlchhue.c   |   75 -----------
 app/operations/layer-modes/gimpoperationlchhue.h   |   64 ----------
 .../layer-modes/gimpoperationlchlightness.c        |   75 -----------
 .../layer-modes/gimpoperationlchlightness.h        |   64 ----------
 .../layer-modes/gimpoperationlightenonly.c         |   72 -----------
 .../layer-modes/gimpoperationlightenonly.h         |   63 ----------
 app/operations/layer-modes/gimpoperationmultiply.c |   72 -----------
 app/operations/layer-modes/gimpoperationmultiply.h |   63 ----------
 app/operations/layer-modes/gimpoperationoverlay.c  |   71 -----------
 app/operations/layer-modes/gimpoperationoverlay.h  |   62 ---------
 app/operations/layer-modes/gimpoperationscreen.c   |   72 -----------
 app/operations/layer-modes/gimpoperationscreen.h   |   62 ---------
 .../layer-modes/gimpoperationsoftlight.c           |   90 --------------
 .../layer-modes/gimpoperationsoftlight.h           |   62 ---------
 app/operations/layer-modes/gimpoperationsubtract.c |   72 -----------
 app/operations/layer-modes/gimpoperationsubtract.h |   63 ----------
 52 files changed, 15 insertions(+), 3385 deletions(-)
---
diff --git a/app/core/gimp-layer-modes.c b/app/core/gimp-layer-modes.c
index b401450..d476156 100644
--- a/app/core/gimp-layer-modes.c
+++ b/app/core/gimp-layer-modes.c
@@ -458,7 +458,8 @@ gimp_layer_mode_get_operation (GimpLayerMode  mode)
 
     case GIMP_LAYER_MODE_ANTI_ERASE:
       return "gimp:anti-erase";
+    default:
+      return "gimp:layer-mode";
     }
-
   return "gimp:layer-mode";
 }
diff --git a/app/operations/gimp-operations.c b/app/operations/gimp-operations.c
index 4c39444..fc26091 100644
--- a/app/operations/gimp-operations.c
+++ b/app/operations/gimp-operations.c
@@ -84,36 +84,13 @@
 #include "layer-modes-legacy/gimpoperationsoftlightlegacy.h"
 #include "layer-modes-legacy/gimpoperationsubtractlegacy.h"
 
-#include "layer-modes/gimpoperationaddition.h"
 #include "layer-modes/gimpoperationantierase.h"
 #include "layer-modes/gimpoperationbehind.h"
-#include "layer-modes/gimpoperationburn.h"
+#include "layer-modes/gimpoperationerase.h"
 #include "layer-modes/gimpoperationcolorerase.h"
-#include "layer-modes/gimpoperationdarkenonly.h"
-#include "layer-modes/gimpoperationdifference.h"
 #include "layer-modes/gimpoperationdissolve.h"
-#include "layer-modes/gimpoperationdivide.h"
-#include "layer-modes/gimpoperationdodge.h"
-#include "layer-modes/gimpoperationerase.h"
-#include "layer-modes/gimpoperationgrainextract.h"
-#include "layer-modes/gimpoperationgrainmerge.h"
-#include "layer-modes/gimpoperationhardlight.h"
-#include "layer-modes/gimpoperationhsvcolor.h"
-#include "layer-modes/gimpoperationhsvhue.h"
-#include "layer-modes/gimpoperationhsvsaturation.h"
-#include "layer-modes/gimpoperationhsvvalue.h"
-#include "layer-modes/gimpoperationlchchroma.h"
-#include "layer-modes/gimpoperationlchcolor.h"
-#include "layer-modes/gimpoperationlchhue.h"
-#include "layer-modes/gimpoperationlchlightness.h"
-#include "layer-modes/gimpoperationlightenonly.h"
-#include "layer-modes/gimpoperationmultiply.h"
 #include "layer-modes/gimpoperationnormal.h"
-#include "layer-modes/gimpoperationoverlay.h"
 #include "layer-modes/gimpoperationreplace.h"
-#include "layer-modes/gimpoperationscreen.h"
-#include "layer-modes/gimpoperationsoftlight.h"
-#include "layer-modes/gimpoperationsubtract.h"
 
 
 void
@@ -150,48 +127,25 @@ gimp_operations_init (void)
   g_type_class_ref (GIMP_TYPE_OPERATION_NORMAL);
   g_type_class_ref (GIMP_TYPE_OPERATION_DISSOLVE);
   g_type_class_ref (GIMP_TYPE_OPERATION_BEHIND);
-  g_type_class_ref (GIMP_TYPE_OPERATION_MULTIPLY);
   g_type_class_ref (GIMP_TYPE_OPERATION_MULTIPLY_LEGACY);
-  g_type_class_ref (GIMP_TYPE_OPERATION_SCREEN);
   g_type_class_ref (GIMP_TYPE_OPERATION_SCREEN_LEGACY);
-  g_type_class_ref (GIMP_TYPE_OPERATION_OVERLAY);
-  g_type_class_ref (GIMP_TYPE_OPERATION_DIFFERENCE);
   g_type_class_ref (GIMP_TYPE_OPERATION_DIFFERENCE_LEGACY);
-  g_type_class_ref (GIMP_TYPE_OPERATION_ADDITION);
   g_type_class_ref (GIMP_TYPE_OPERATION_ADDITION_LEGACY);
-  g_type_class_ref (GIMP_TYPE_OPERATION_SUBTRACT);
   g_type_class_ref (GIMP_TYPE_OPERATION_SUBTRACT_LEGACY);
-  g_type_class_ref (GIMP_TYPE_OPERATION_DARKEN_ONLY);
   g_type_class_ref (GIMP_TYPE_OPERATION_DARKEN_ONLY_LEGACY);
-  g_type_class_ref (GIMP_TYPE_OPERATION_LIGHTEN_ONLY);
   g_type_class_ref (GIMP_TYPE_OPERATION_LIGHTEN_ONLY_LEGACY);
-  g_type_class_ref (GIMP_TYPE_OPERATION_HSV_HUE);
-  g_type_class_ref (GIMP_TYPE_OPERATION_HSV_SATURATION);
-  g_type_class_ref (GIMP_TYPE_OPERATION_HSV_COLOR);
-  g_type_class_ref (GIMP_TYPE_OPERATION_HSV_VALUE);
   g_type_class_ref (GIMP_TYPE_OPERATION_HSV_HUE_LEGACY);
   g_type_class_ref (GIMP_TYPE_OPERATION_HSV_SATURATION_LEGACY);
   g_type_class_ref (GIMP_TYPE_OPERATION_HSV_COLOR_LEGACY);
   g_type_class_ref (GIMP_TYPE_OPERATION_HSV_VALUE_LEGACY);
-  g_type_class_ref (GIMP_TYPE_OPERATION_DIVIDE);
   g_type_class_ref (GIMP_TYPE_OPERATION_DIVIDE_LEGACY);
-  g_type_class_ref (GIMP_TYPE_OPERATION_DODGE);
   g_type_class_ref (GIMP_TYPE_OPERATION_DODGE_LEGACY);
-  g_type_class_ref (GIMP_TYPE_OPERATION_BURN);
   g_type_class_ref (GIMP_TYPE_OPERATION_BURN_LEGACY);
-  g_type_class_ref (GIMP_TYPE_OPERATION_HARDLIGHT);
   g_type_class_ref (GIMP_TYPE_OPERATION_HARDLIGHT_LEGACY);
-  g_type_class_ref (GIMP_TYPE_OPERATION_SOFTLIGHT);
   g_type_class_ref (GIMP_TYPE_OPERATION_SOFTLIGHT_LEGACY);
-  g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_EXTRACT);
   g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_EXTRACT_LEGACY);
-  g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_MERGE);
   g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_MERGE_LEGACY);
   g_type_class_ref (GIMP_TYPE_OPERATION_COLOR_ERASE);
-  g_type_class_ref (GIMP_TYPE_OPERATION_LCH_HUE);
-  g_type_class_ref (GIMP_TYPE_OPERATION_LCH_CHROMA);
-  g_type_class_ref (GIMP_TYPE_OPERATION_LCH_COLOR);
-  g_type_class_ref (GIMP_TYPE_OPERATION_LCH_LIGHTNESS);
   g_type_class_ref (GIMP_TYPE_OPERATION_ERASE);
   g_type_class_ref (GIMP_TYPE_OPERATION_REPLACE);
   g_type_class_ref (GIMP_TYPE_OPERATION_ANTI_ERASE);
diff --git a/app/operations/layer-modes/Makefile.am b/app/operations/layer-modes/Makefile.am
index 5559930..cce4753 100644
--- a/app/operations/layer-modes/Makefile.am
+++ b/app/operations/layer-modes/Makefile.am
@@ -24,67 +24,20 @@ libapplayermodes_generic_a_sources = \
        gimplayermodefunctions.h        \
        gimpblendcomposite.h            \
        \
-       gimpoperationaddition.c         \
-       gimpoperationaddition.h         \
        gimpoperationantierase.c        \
        gimpoperationantierase.h        \
        gimpoperationbehind.c           \
        gimpoperationbehind.h           \
-       gimpoperationburn.c             \
-       gimpoperationburn.h             \
        gimpoperationcolorerase.c       \
        gimpoperationcolorerase.h       \
-       gimpoperationdarkenonly.c       \
-       gimpoperationdarkenonly.h       \
-       gimpoperationdifference.c       \
-       gimpoperationdifference.h       \
        gimpoperationdissolve.c         \
        gimpoperationdissolve.h         \
-       gimpoperationdivide.c           \
-       gimpoperationdivide.h           \
-       gimpoperationdodge.c            \
-       gimpoperationdodge.h            \
        gimpoperationerase.c            \
        gimpoperationerase.h            \
-       gimpoperationgrainextract.c     \
-       gimpoperationgrainextract.h     \
-       gimpoperationgrainmerge.c       \
-       gimpoperationgrainmerge.h       \
-       gimpoperationhardlight.c        \
-       gimpoperationhardlight.h        \
-       gimpoperationhsvcolor.c         \
-       gimpoperationhsvcolor.h         \
-       gimpoperationhsvhue.c           \
-       gimpoperationhsvhue.h           \
-       gimpoperationhsvsaturation.c    \
-       gimpoperationhsvsaturation.h    \
-       gimpoperationhsvvalue.c         \
-       gimpoperationhsvvalue.h         \
-       gimpoperationhsvvalue.h         \
-       gimpoperationlchchroma.c        \
-       gimpoperationlchchroma.h        \
-       gimpoperationlchcolor.c         \
-       gimpoperationlchcolor.h         \
-       gimpoperationlchhue.c           \
-       gimpoperationlchhue.h           \
-       gimpoperationlchlightness.c     \
-       gimpoperationlchlightness.h     \
-       gimpoperationlightenonly.c      \
-       gimpoperationlightenonly.h      \
-       gimpoperationmultiply.c         \
-       gimpoperationmultiply.h         \
        gimpoperationnormal.c           \
        gimpoperationnormal.h           \
-       gimpoperationoverlay.c          \
-       gimpoperationoverlay.h          \
        gimpoperationreplace.c          \
-       gimpoperationreplace.h          \
-       gimpoperationscreen.c           \
-       gimpoperationscreen.h           \
-       gimpoperationsoftlight.c        \
-       gimpoperationsoftlight.h        \
-       gimpoperationsubtract.c         \
-       gimpoperationsubtract.h
+       gimpoperationreplace.h
 
 libapplayermodes_sse2_a_sources = \
        gimpoperationnormal-sse2.c
diff --git a/app/operations/layer-modes/gimplayermodefunctions.c 
b/app/operations/layer-modes/gimplayermodefunctions.c
index 3bc190e..2b3ac63 100644
--- a/app/operations/layer-modes/gimplayermodefunctions.c
+++ b/app/operations/layer-modes/gimplayermodefunctions.c
@@ -45,42 +45,19 @@
 #include "operations/layer-modes-legacy/gimpoperationsoftlightlegacy.h"
 #include "operations/layer-modes-legacy/gimpoperationsubtractlegacy.h"
 
-#include "gimpoperationaddition.h"
 #include "gimpoperationantierase.h"
 #include "gimpoperationbehind.h"
-#include "gimpoperationburn.h"
 #include "gimpoperationcolorerase.h"
-#include "gimpoperationdarkenonly.h"
-#include "gimpoperationdifference.h"
 #include "gimpoperationdissolve.h"
-#include "gimpoperationdivide.h"
-#include "gimpoperationdodge.h"
 #include "gimpoperationerase.h"
-#include "gimpoperationgrainextract.h"
-#include "gimpoperationgrainmerge.h"
-#include "gimpoperationhardlight.h"
-#include "gimpoperationhsvcolor.h"
-#include "gimpoperationhsvhue.h"
-#include "gimpoperationhsvsaturation.h"
-#include "gimpoperationhsvvalue.h"
-#include "gimpoperationlchchroma.h"
-#include "gimpoperationlchcolor.h"
-#include "gimpoperationlchhue.h"
-#include "gimpoperationlchlightness.h"
-#include "gimpoperationlightenonly.h"
-#include "gimpoperationmultiply.h"
 #include "gimpoperationnormal.h"
-#include "gimpoperationoverlay.h"
 #include "gimpoperationreplace.h"
-#include "gimpoperationscreen.h"
-#include "gimpoperationsoftlight.h"
-#include "gimpoperationsubtract.h"
 
 
 GimpLayerModeFunc
 gimp_get_layer_mode_function (GimpLayerMode  paint_mode)
 {
-  GimpLayerModeFunc func;
+  GimpLayerModeFunc func = gimp_operation_layer_mode_process_pixels;
 
   switch (paint_mode)
     {
@@ -102,19 +79,10 @@ gimp_get_layer_mode_function (GimpLayerMode  paint_mode)
       func = gimp_operation_multiply_legacy_process;
       break;
 
-    case GIMP_LAYER_MODE_MULTIPLY:
-    case GIMP_LAYER_MODE_MULTIPLY_LINEAR:
-      func = gimp_operation_multiply_process;
-      break;
-
     case GIMP_LAYER_MODE_SCREEN_LEGACY:
       func = gimp_operation_screen_legacy_process;
       break;
 
-    case GIMP_LAYER_MODE_SCREEN:
-      func = gimp_operation_screen_process;
-      break;
-
     case GIMP_LAYER_MODE_OVERLAY_LEGACY:
       func = gimp_operation_softlight_legacy_process;
       break;
@@ -123,75 +91,34 @@ gimp_get_layer_mode_function (GimpLayerMode  paint_mode)
       func = gimp_operation_difference_legacy_process;
       break;
 
-    case GIMP_LAYER_MODE_DIFFERENCE:
-    case GIMP_LAYER_MODE_DIFFERENCE_LINEAR:
-      func = gimp_operation_difference_process;
-      break;
-
     case GIMP_LAYER_MODE_ADDITION_LEGACY:
       func = gimp_operation_addition_legacy_process;
       break;
 
-    case GIMP_LAYER_MODE_ADDITION:
-    case GIMP_LAYER_MODE_ADDITION_LINEAR:
-      func = gimp_operation_addition_process;
-      break;
-
     case GIMP_LAYER_MODE_SUBTRACT_LEGACY:
       func = gimp_operation_subtract_legacy_process;
       break;
 
-    case GIMP_LAYER_MODE_SUBTRACT:
-    case GIMP_LAYER_MODE_SUBTRACT_LINEAR:
-      func = gimp_operation_subtract_process;
-      break;
-
     case GIMP_LAYER_MODE_DARKEN_ONLY_LEGACY:
       func = gimp_operation_darken_only_legacy_process;
       break;
 
-    case GIMP_LAYER_MODE_DARKEN_ONLY:
-    case GIMP_LAYER_MODE_DARKEN_ONLY_LINEAR:
-      func = gimp_operation_darken_only_process;
-      break;
-
     case GIMP_LAYER_MODE_LIGHTEN_ONLY_LEGACY:
       func = gimp_operation_lighten_only_legacy_process;
       break;
 
-    case GIMP_LAYER_MODE_LIGHTEN_ONLY:
-    case GIMP_LAYER_MODE_LIGHTEN_ONLY_LINEAR:
-      func = gimp_operation_lighten_only_process;
-      break;
-
-    case GIMP_LAYER_MODE_HSV_HUE:
-      func = gimp_operation_hsv_hue_process;
-      break;
-
     case GIMP_LAYER_MODE_HSV_HUE_LEGACY:
       func = gimp_operation_hsv_hue_legacy_process;
       break;
 
-    case GIMP_LAYER_MODE_HSV_SATURATION:
-      func = gimp_operation_hsv_saturation_process;
-      break;
-
     case GIMP_LAYER_MODE_HSV_SATURATION_LEGACY:
       func = gimp_operation_hsv_saturation_legacy_process;
       break;
 
-    case GIMP_LAYER_MODE_HSV_COLOR:
-      func = gimp_operation_hsv_color_process;
-      break;
-
     case GIMP_LAYER_MODE_HSV_COLOR_LEGACY:
       func = gimp_operation_hsv_color_legacy_process;
       break;
 
-    case GIMP_LAYER_MODE_HSV_VALUE:
-      func = gimp_operation_hsv_value_process;
-      break;
-
     case GIMP_LAYER_MODE_HSV_VALUE_LEGACY:
       func = gimp_operation_hsv_value_legacy_process;
       break;
@@ -200,87 +127,34 @@ gimp_get_layer_mode_function (GimpLayerMode  paint_mode)
       func = gimp_operation_divide_legacy_process;
       break;
 
-    case GIMP_LAYER_MODE_DIVIDE:
-    case GIMP_LAYER_MODE_DIVIDE_LINEAR:
-      func = gimp_operation_divide_process;
-      break;
-
     case GIMP_LAYER_MODE_DODGE_LEGACY:
       func = gimp_operation_dodge_legacy_process;
       break;
 
-    case GIMP_LAYER_MODE_DODGE:
-    case GIMP_LAYER_MODE_DODGE_LINEAR:
-      func = gimp_operation_dodge_process;
-      break;
-
     case GIMP_LAYER_MODE_BURN_LEGACY:
       func = gimp_operation_burn_legacy_process;
       break;
 
-    case GIMP_LAYER_MODE_BURN:
-    case GIMP_LAYER_MODE_BURN_LINEAR:
-      func = gimp_operation_burn_process;
-      break;
-
     case GIMP_LAYER_MODE_HARDLIGHT_LEGACY:
       func = gimp_operation_hardlight_legacy_process;
       break;
 
-    case GIMP_LAYER_MODE_HARDLIGHT:
-      func = gimp_operation_hardlight_process;
-      break;
-
     case GIMP_LAYER_MODE_SOFTLIGHT_LEGACY:
       func = gimp_operation_softlight_legacy_process;
       break;
 
-    case GIMP_LAYER_MODE_SOFTLIGHT:
-      func = gimp_operation_softlight_process;
-      break;
-
     case GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY:
       func = gimp_operation_grain_extract_legacy_process;
       break;
 
-    case GIMP_LAYER_MODE_GRAIN_EXTRACT:
-    case GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR:
-      func = gimp_operation_grain_extract_process;
-      break;
-
     case GIMP_LAYER_MODE_GRAIN_MERGE_LEGACY:
       func = gimp_operation_grain_merge_legacy_process;
       break;
 
-    case GIMP_LAYER_MODE_GRAIN_MERGE:
-    case GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR:
-      func = gimp_operation_grain_merge_process;
-      break;
-
     case GIMP_LAYER_MODE_COLOR_ERASE:
       func = gimp_operation_color_erase_process;
       break;
 
-    case GIMP_LAYER_MODE_OVERLAY:
-      func = gimp_operation_overlay_process;
-      break;
-
-    case GIMP_LAYER_MODE_LCH_HUE:
-      func = gimp_operation_lch_hue_process;
-      break;
-
-    case GIMP_LAYER_MODE_LCH_CHROMA:
-      func = gimp_operation_lch_chroma_process;
-      break;
-
-    case GIMP_LAYER_MODE_LCH_COLOR:
-      func = gimp_operation_lch_color_process;
-      break;
-
-    case GIMP_LAYER_MODE_LCH_LIGHTNESS:
-      func = gimp_operation_lch_lightness_process;
-      break;
-
     case GIMP_LAYER_MODE_ERASE:
       func = gimp_operation_erase_process;
       break;
@@ -294,9 +168,6 @@ gimp_get_layer_mode_function (GimpLayerMode  paint_mode)
       break;
 
     default:
-      g_warning ("No direct function for layer mode (%d), using gimp:normal",
-                 paint_mode);
-      func = gimp_operation_normal_process;
       break;
     }
 
diff --git a/app/operations/layer-modes/gimpoperationlayermode.c 
b/app/operations/layer-modes/gimpoperationlayermode.c
index 7d715dc..c43fafe 100644
--- a/app/operations/layer-modes/gimpoperationlayermode.c
+++ b/app/operations/layer-modes/gimpoperationlayermode.c
@@ -60,14 +60,6 @@ static gboolean gimp_operation_layer_mode_process      (GeglOperation        *op
                                                         const gchar          *output_prop,
                                                         const GeglRectangle  *result,
                                                         gint                  level);
-static gboolean gimp_operation_layer_mode_process_pixels (GeglOperation       *operation,
-                                                          void                *in,
-                                                          void                *layer,
-                                                          void                *mask,
-                                                          void                *out,
-                                                          glong                samples,
-                                                          const GeglRectangle *roi,
-                                                          gint                 level);
 
 G_DEFINE_TYPE (GimpOperationLayerMode, gimp_operation_layer_mode,
                GEGL_TYPE_OPERATION_POINT_COMPOSER3)
@@ -340,7 +332,7 @@ static inline GimpBlendFunc gimp_layer_mode_get_blend_fun (GimpLayerMode mode)
   }
 }
 
-static gboolean
+gboolean
 gimp_operation_layer_mode_process_pixels (GeglOperation       *operation,
                                           void                *in,
                                           void                *layer,
diff --git a/app/operations/layer-modes/gimpoperationlayermode.h 
b/app/operations/layer-modes/gimpoperationlayermode.h
index c95790b..545203f 100644
--- a/app/operations/layer-modes/gimpoperationlayermode.h
+++ b/app/operations/layer-modes/gimpoperationlayermode.h
@@ -56,5 +56,14 @@ struct _GimpOperationLayerMode
 
 GType   gimp_operation_layer_mode_get_type (void) G_GNUC_CONST;
 
+gboolean
+gimp_operation_layer_mode_process_pixels (GeglOperation       *operation,
+                                          void                *in,
+                                          void                *layer,
+                                          void                *mask,
+                                          void                *out,
+                                          glong                samples,
+                                          const GeglRectangle *roi,
+                                          gint                 level);
 
 #endif /* __GIMP_OPERATION_LAYER_MODE_H__ */


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