[gimp/pippin/linear-is-the-new-black: 4/17] app: improve structure of gimp_composite_blend conversions



commit de4e0ff6d27e07db52fb06dffc89d029c288d385
Author: Øyvind Kolås <pippin gimp org>
Date:   Wed Jan 18 03:13:44 2017 +0100

    app: improve structure of gimp_composite_blend conversions

 .../gimpoperationadditionlegacy.c                  |   19 ++--
 .../gimpoperationadditionlegacy.h                  |   20 ++--
 .../layer-modes-legacy/gimpoperationburnlegacy.h   |   20 ++--
 .../gimpoperationdarkenonlylegacy.h                |   20 ++--
 .../gimpoperationdifferencelegacy.h                |   20 ++--
 .../layer-modes-legacy/gimpoperationdividelegacy.h |   20 ++--
 .../layer-modes-legacy/gimpoperationdodgelegacy.h  |   20 ++--
 .../gimpoperationgrainextractlegacy.c              |   14 +-
 .../gimpoperationgrainextractlegacy.h              |   20 ++--
 .../gimpoperationgrainmergelegacy.c                |   14 +-
 .../layer-modes-legacy/gimpoperationhsvhuelegacy.h |   20 ++--
 .../gimpoperationhsvsaturationlegacy.h             |   20 ++--
 .../gimpoperationhsvvaluelegacy.h                  |   20 ++--
 .../gimpoperationlightenonlylegacy.h               |   20 ++--
 .../gimpoperationmultiplylegacy.h                  |   20 ++--
 .../layer-modes-legacy/gimpoperationscreenlegacy.h |   20 ++--
 .../gimpoperationsoftlightlegacy.c                 |    2 +-
 .../gimpoperationsoftlightlegacy.h                 |   20 ++--
 .../gimpoperationsubtractlegacy.c                  |   14 +-
 .../gimpoperationsubtractlegacy.h                  |   20 ++--
 app/operations/layer-modes/gimpoperationbehind.c   |    5 +-
 app/operations/layer-modes/gimpoperationburn.c     |    5 +-
 .../layer-modes/gimpoperationcolorerase.h          |   20 ++--
 .../layer-modes/gimpoperationdarkenonly.h          |   20 ++--
 app/operations/layer-modes/gimpoperationdissolve.h |   20 ++--
 app/operations/layer-modes/gimpoperationdivide.h   |   20 ++--
 app/operations/layer-modes/gimpoperationdodge.h    |   20 ++--
 app/operations/layer-modes/gimpoperationerase.h    |   20 ++--
 .../layer-modes/gimpoperationgrainextract.c        |   14 +-
 .../layer-modes/gimpoperationgrainextract.h        |   20 ++--
 .../layer-modes/gimpoperationgrainmerge.h          |   20 ++--
 .../layer-modes/gimpoperationhardlight.h           |   20 ++--
 app/operations/layer-modes/gimpoperationhsvcolor.h |   20 ++--
 app/operations/layer-modes/gimpoperationhsvhue.c   |   20 ++--
 app/operations/layer-modes/gimpoperationhsvhue.h   |   20 ++--
 .../layer-modes/gimpoperationhsvsaturation.h       |   20 ++--
 app/operations/layer-modes/gimpoperationhsvvalue.h |   20 ++--
 .../layer-modes/gimpoperationlchchroma.h           |   20 ++--
 app/operations/layer-modes/gimpoperationlchcolor.h |   40 +++---
 app/operations/layer-modes/gimpoperationlchhue.h   |   40 +++---
 .../layer-modes/gimpoperationlchlightness.h        |   40 +++---
 .../layer-modes/gimpoperationlightenonly.c         |   14 +-
 .../layer-modes/gimpoperationlightenonly.h         |   20 ++--
 app/operations/layer-modes/gimpoperationmultiply.h |   20 ++--
 app/operations/layer-modes/gimpoperationnormal.h   |   60 +++++-----
 app/operations/layer-modes/gimpoperationoverlay.h  |   20 ++--
 .../layer-modes/gimpoperationpointlayermode.h      |  129 ++++++++++----------
 app/operations/layer-modes/gimpoperationscreen.h   |   20 ++--
 .../layer-modes/gimpoperationsoftlight.c           |   14 +-
 .../layer-modes/gimpoperationsoftlight.h           |   20 ++--
 app/operations/layer-modes/gimpoperationsubtract.h |   20 ++--
 app/paint/gimppaintcore-loops.c                    |    4 +-
 52 files changed, 578 insertions(+), 570 deletions(-)
---
diff --git a/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.c
index ebb7e76..a72c45d 100644
--- a/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.c
@@ -66,17 +66,20 @@ gimp_operation_addition_legacy_init (GimpOperationAdditionLegacy *self)
 
 static gboolean
 gimp_operation_addition_legacy_process (GeglOperation       *operation,
-                                      void                *in_buf,
-                                      void                *aux_buf,
-                                      void                *aux2_buf,
-                                      void                *out_buf,
-                                      glong                samples,
-                                      const GeglRectangle *roi,
-                                      gint                 level)
+                                        void                *in_buf,
+                                        void                *aux_buf,
+                                        void                *aux2_buf,
+                                        void                *out_buf,
+                                        glong                samples,
+                                        const GeglRectangle *roi,
+                                        gint                 level)
 {
   GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_addition_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, 
layer_mode->opacity, samples, roi, level, layer_mode->blend_trc, layer_mode->composite_trc, 
layer_mode->composite_mode);
+  return gimp_operation_addition_legacy_process_pixels (in_buf, aux_buf,
+                  aux2_buf, out_buf, layer_mode->opacity, samples, roi, level,
+                  layer_mode->blend_trc, layer_mode->composite_trc, 
+                  layer_mode->composite_mode);
 }
 
 gboolean
diff --git a/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.h
index eb8e32a..644644a 100644
--- a/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.h
@@ -49,16 +49,16 @@ struct _GimpOperationAdditionLegacyClass
 
 GType    gimp_operation_addition_legacy_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_addition_legacy_process_pixels (gfloat              *in,
-                                                        gfloat              *layer,
-                                                        gfloat              *mask,
-                                                        gfloat              *out,
-                                                        gfloat               opacity,
-                                                        glong                samples,
-                                                        const GeglRectangle *roi,
-                                                        gint                 level,
-                                                        GimpLayerBlendTRC    blend_trc, 
-                                                        GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_addition_legacy_process_pixels (gfloat                *in,
+                                                        gfloat                *layer,
+                                                        gfloat                *mask,
+                                                        gfloat                *out,
+                                                        gfloat                 opacity,
+                                                        glong                  samples,
+                                                        const GeglRectangle   *roi,
+                                                        gint                   level,
+                                                        GimpLayerBlendTRC      blend_trc, 
+                                                        GimpLayerBlendTRC      composite_trc,
                                                         GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationburnlegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationburnlegacy.h
index 3f253f9..dc5dd4f 100644
--- a/app/operations/layer-modes-legacy/gimpoperationburnlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationburnlegacy.h
@@ -49,16 +49,16 @@ struct _GimpOperationBurnLegacyClass
 
 GType    gimp_operation_burn_legacy_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_burn_legacy_process_pixels (gfloat              *in,
-                                                    gfloat              *layer,
-                                                    gfloat              *mask,
-                                                    gfloat              *out,
-                                                    gfloat               opacity,
-                                                    glong                samples,
-                                                    const GeglRectangle *roi,
-                                                    gint                 level,
-                                                    GimpLayerBlendTRC    blend_trc, 
-                                                    GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_burn_legacy_process_pixels (gfloat                *in,
+                                                    gfloat                *layer,
+                                                    gfloat                *mask,
+                                                    gfloat                *out,
+                                                    gfloat                 opacity,
+                                                    glong                  samples,
+                                                    const GeglRectangle   *roi,
+                                                    gint                   level,
+                                                    GimpLayerBlendTRC      blend_trc, 
+                                                    GimpLayerBlendTRC      composite_trc,
                                                     GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.h
index 502178d..3ce85b2 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.h
@@ -49,16 +49,16 @@ struct _GimpOperationDarkenOnlyLegacyClass
 
 GType    gimp_operation_darken_only_legacy_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_darken_only_legacy_process_pixels (gfloat              *in,
-                                                           gfloat              *layer,
-                                                           gfloat              *mask,
-                                                           gfloat              *out,
-                                                           gfloat               opacity,
-                                                           glong                samples,
-                                                           const GeglRectangle *roi,
-                                                           gint                 level,
-                                                           GimpLayerBlendTRC    blend_trc, 
-                                                           GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_darken_only_legacy_process_pixels (gfloat                *in,
+                                                           gfloat                *layer,
+                                                           gfloat                *mask,
+                                                           gfloat                *out,
+                                                           gfloat                 opacity,
+                                                           glong                  samples,
+                                                           const GeglRectangle   *roi,
+                                                           gint                   level,
+                                                           GimpLayerBlendTRC      blend_trc, 
+                                                           GimpLayerBlendTRC      composite_trc,
                                                            GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.h
index 322eed0..bb2e118 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.h
@@ -49,16 +49,16 @@ struct _GimpOperationDifferenceLegacyClass
 
 GType    gimp_operation_difference_legacy_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_difference_legacy_process_pixels (gfloat              *in,
-                                                          gfloat              *layer,
-                                                          gfloat              *mask,
-                                                          gfloat              *out,
-                                                          gfloat               opacity,
-                                                          glong                samples,
-                                                          const GeglRectangle *roi,
-                                                          gint                 level,
-                                                          GimpLayerBlendTRC    blend_trc, 
-                                                          GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_difference_legacy_process_pixels (gfloat                *in,
+                                                          gfloat                *layer,
+                                                          gfloat                *mask,
+                                                          gfloat                *out,
+                                                          gfloat                 opacity,
+                                                          glong                  samples,
+                                                          const GeglRectangle   *roi,
+                                                          gint                   level,
+                                                          GimpLayerBlendTRC      blend_trc, 
+                                                          GimpLayerBlendTRC      composite_trc,
                                                           GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationdividelegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationdividelegacy.h
index a6d88d3..f2f4dd6 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdividelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationdividelegacy.h
@@ -49,16 +49,16 @@ struct _GimpOperationDivideLegacyClass
 
 GType    gimp_operation_divide_legacy_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_divide_legacy_process_pixels (gfloat              *in,
-                                                      gfloat              *layer,
-                                                      gfloat              *mask,
-                                                      gfloat              *out,
-                                                      gfloat               opacity,
-                                                      glong                samples,
-                                                      const GeglRectangle *roi,
-                                                      gint                 level,
-                                                      GimpLayerBlendTRC    blend_trc, 
-                                                      GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_divide_legacy_process_pixels (gfloat                *in,
+                                                      gfloat                *layer,
+                                                      gfloat                *mask,
+                                                      gfloat                *out,
+                                                      gfloat                 opacity,
+                                                      glong                  samples,
+                                                      const GeglRectangle   *roi,
+                                                      gint                   level,
+                                                      GimpLayerBlendTRC      blend_trc, 
+                                                      GimpLayerBlendTRC      composite_trc,
                                                       GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.h
index 7f9d126..e29edd7 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.h
@@ -49,16 +49,16 @@ struct _GimpOperationDodgeLegacyClass
 
 GType    gimp_operation_dodge_legacy_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_dodge_legacy_process_pixels (gfloat              *in,
-                                                     gfloat              *layer,
-                                                     gfloat              *mask,
-                                                     gfloat              *out,
-                                                     gfloat               opacity,
-                                                     glong                samples,
-                                                     const GeglRectangle *roi,
-                                                     gint                 level,
-                                                     GimpLayerBlendTRC    blend_trc, 
-                                                     GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_dodge_legacy_process_pixels (gfloat                *in,
+                                                     gfloat                *layer,
+                                                     gfloat                *mask,
+                                                     gfloat                *out,
+                                                     gfloat                 opacity,
+                                                     glong                  samples,
+                                                     const GeglRectangle   *roi,
+                                                     gint                   level,
+                                                     GimpLayerBlendTRC      blend_trc, 
+                                                     GimpLayerBlendTRC      composite_trc,
                                                      GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.c
index 47c379d..7c02900 100644
--- a/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.c
@@ -29,13 +29,13 @@
 
 
 static gboolean gimp_operation_grain_extract_legacy_process (GeglOperation       *operation,
-                                                           void                *in_buf,
-                                                           void                *aux_buf,
-                                                           void                *aux2_buf,
-                                                           void                *out_buf,
-                                                           glong                samples,
-                                                           const GeglRectangle *roi,
-                                                           gint                 level);
+                                                             void                *in_buf,
+                                                             void                *aux_buf,
+                                                             void                *aux2_buf,
+                                                             void                *out_buf,
+                                                             glong                samples,
+                                                             const GeglRectangle *roi,
+                                                             gint                 level);
 
 
 G_DEFINE_TYPE (GimpOperationGrainExtractLegacy, gimp_operation_grain_extract_legacy,
diff --git a/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.h
index 28e9cb1..e1d91d2 100644
--- a/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.h
@@ -49,16 +49,16 @@ struct _GimpOperationGrainExtractLegacyClass
 
 GType    gimp_operation_grain_extract_legacy_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_grain_extract_legacy_process_pixels (gfloat              *in,
-                                                             gfloat              *layer,
-                                                             gfloat              *mask,
-                                                             gfloat              *out,
-                                                             gfloat               opacity,
-                                                             glong                samples,
-                                                             const GeglRectangle *roi,
-                                                             gint                 level,
-                                                             GimpLayerBlendTRC    blend_trc, 
-                                                             GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_grain_extract_legacy_process_pixels (gfloat                *in,
+                                                             gfloat                *layer,
+                                                             gfloat                *mask,
+                                                             gfloat                *out,
+                                                             gfloat                 opacity,
+                                                             glong                  samples,
+                                                             const GeglRectangle   *roi,
+                                                             gint                   level,
+                                                             GimpLayerBlendTRC      blend_trc, 
+                                                             GimpLayerBlendTRC      composite_trc,
                                                              GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.c
index d296611..2534f5d 100644
--- a/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.c
@@ -29,13 +29,13 @@
 
 
 static gboolean gimp_operation_grain_merge_legacy_process (GeglOperation       *operation,
-                                                         void                *in_buf,
-                                                         void                *aux_buf,
-                                                         void                *aux2_buf,
-                                                         void                *out_buf,
-                                                         glong                samples,
-                                                         const GeglRectangle *roi,
-                                                         gint                 level);
+                                                           void                *in_buf,
+                                                           void                *aux_buf,
+                                                           void                *aux2_buf,
+                                                           void                *out_buf,
+                                                           glong                samples,
+                                                           const GeglRectangle *roi,
+                                                           gint                 level);
 
 
 G_DEFINE_TYPE (GimpOperationGrainMergeLegacy, gimp_operation_grain_merge_legacy,
diff --git a/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.h
index 2b28563..44dbd7e 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.h
@@ -49,16 +49,16 @@ struct _GimpOperationHsvHueLegacyClass
 
 GType    gimp_operation_hsv_hue_legacy_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_hsv_hue_legacy_process_pixels (gfloat              *in,
-                                                       gfloat              *layer,
-                                                       gfloat              *mask,
-                                                       gfloat              *out,
-                                                       gfloat               opacity,
-                                                       glong                samples,
-                                                       const GeglRectangle *roi,
-                                                       gint                 level,
-                                                       GimpLayerBlendTRC    blend_trc, 
-                                                       GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_hsv_hue_legacy_process_pixels (gfloat                *in,
+                                                       gfloat                *layer,
+                                                       gfloat                *mask,
+                                                       gfloat                *out,
+                                                       gfloat                 opacity,
+                                                       glong                  samples,
+                                                       const GeglRectangle   *roi,
+                                                       gint                   level,
+                                                       GimpLayerBlendTRC      blend_trc, 
+                                                       GimpLayerBlendTRC      composite_trc,
                                                        GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.h
index 0d913f9..e4f9c6a 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.h
@@ -49,16 +49,16 @@ struct _GimpOperationHsvSaturationLegacyClass
 
 GType    gimp_operation_hsv_saturation_legacy_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_hsv_saturation_legacy_process_pixels (gfloat              *in,
-                                                              gfloat              *layer,
-                                                              gfloat              *mask,
-                                                              gfloat              *out,
-                                                              gfloat               opacity,
-                                                              glong                samples,
-                                                              const GeglRectangle *roi,
-                                                              gint                 level,
-                                                              GimpLayerBlendTRC    blend_trc, 
-                                                              GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_hsv_saturation_legacy_process_pixels (gfloat                *in,
+                                                              gfloat                *layer,
+                                                              gfloat                *mask,
+                                                              gfloat                *out,
+                                                              gfloat                 opacity,
+                                                              glong                  samples,
+                                                              const GeglRectangle   *roi,
+                                                              gint                   level,
+                                                              GimpLayerBlendTRC      blend_trc, 
+                                                              GimpLayerBlendTRC      composite_trc,
                                                               GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.h
index 9d2794a..721362a 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.h
@@ -49,16 +49,16 @@ struct _GimpOperationHsvValueLegacyClass
 
 GType    gimp_operation_hsv_value_legacy_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_hsv_value_legacy_process_pixels (gfloat              *in,
-                                                         gfloat              *layer,
-                                                         gfloat              *mask,
-                                                         gfloat              *out,
-                                                         gfloat               opacity,
-                                                         glong                samples,
-                                                         const GeglRectangle *roi,
-                                                         gint                 level,
-                                                         GimpLayerBlendTRC    blend_trc, 
-                                                         GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_hsv_value_legacy_process_pixels (gfloat                *in,
+                                                         gfloat                *layer,
+                                                         gfloat                *mask,
+                                                         gfloat                *out,
+                                                         gfloat                 opacity,
+                                                         glong                  samples,
+                                                         const GeglRectangle   *roi,
+                                                         gint                   level,
+                                                         GimpLayerBlendTRC      blend_trc, 
+                                                         GimpLayerBlendTRC      composite_trc,
                                                          GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.h
index fa57ce0..d37636c 100644
--- a/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.h
@@ -49,16 +49,16 @@ struct _GimpOperationLightenOnlyLegacyClass
 
 GType    gimp_operation_lighten_only_legacy_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_lighten_only_legacy_process_pixels (gfloat              *in,
-                                                            gfloat              *layer,
-                                                            gfloat              *mask,
-                                                            gfloat              *out,
-                                                            gfloat               opacity,
-                                                            glong                samples,
-                                                            const GeglRectangle *roi,
-                                                            gint                 level,
-                                                            GimpLayerBlendTRC    blend_trc, 
-                                                            GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_lighten_only_legacy_process_pixels (gfloat                *in,
+                                                            gfloat                *layer,
+                                                            gfloat                *mask,
+                                                            gfloat                *out,
+                                                            gfloat                 opacity,
+                                                            glong                  samples,
+                                                            const GeglRectangle   *roi,
+                                                            gint                   level,
+                                                            GimpLayerBlendTRC      blend_trc, 
+                                                            GimpLayerBlendTRC      composite_trc,
                                                             GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.h
index 26e20f7..299e280 100644
--- a/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.h
@@ -49,16 +49,16 @@ struct _GimpOperationMultiplyLegacyClass
 
 GType    gimp_operation_multiply_legacy_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_multiply_legacy_process_pixels (gfloat              *in,
-                                                        gfloat              *layer,
-                                                        gfloat              *mask,
-                                                        gfloat              *out,
-                                                        gfloat               opacity,
-                                                        glong                samples,
-                                                        const GeglRectangle *roi,
-                                                        gint                 level,
-                                                        GimpLayerBlendTRC    blend_trc, 
-                                                        GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_multiply_legacy_process_pixels (gfloat                *in,
+                                                        gfloat                *layer,
+                                                        gfloat                *mask,
+                                                        gfloat                *out,
+                                                        gfloat                 opacity,
+                                                        glong                  samples,
+                                                        const GeglRectangle   *roi,
+                                                        gint                   level,
+                                                        GimpLayerBlendTRC      blend_trc, 
+                                                        GimpLayerBlendTRC      composite_trc,
                                                         GimpLayerCompositeMode composite_mode);
 
 #endif /* __GIMP_OPERATION_MULTIPLY_LEGACY_H__ */
diff --git a/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.h
index cc1e4cd..319d10f 100644
--- a/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.h
@@ -49,16 +49,16 @@ struct _GimpOperationScreenLegacyClass
 
 GType    gimp_operation_screen_legacy_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_screen_legacy_process_pixels (gfloat              *in,
-                                                      gfloat              *layer,
-                                                      gfloat              *mask,
-                                                      gfloat              *out,
-                                                      gfloat               opacity,
-                                                      glong                samples,
-                                                      const GeglRectangle *roi,
-                                                      gint                 level,
-                                                      GimpLayerBlendTRC    blend_trc, 
-                                                      GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_screen_legacy_process_pixels (gfloat                *in,
+                                                      gfloat                *layer,
+                                                      gfloat                *mask,
+                                                      gfloat                *out,
+                                                      gfloat                 opacity,
+                                                      glong                  samples,
+                                                      const GeglRectangle   *roi,
+                                                      gint                   level,
+                                                      GimpLayerBlendTRC      blend_trc, 
+                                                      GimpLayerBlendTRC      composite_trc,
                                                       GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.c
index c9950a4..47e522b 100644
--- a/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.c
@@ -97,7 +97,7 @@ gimp_operation_softlight_legacy_process (GeglOperation       *operation,
 }
 
 gboolean
-gimp_operation_softlight_legacy_process_pixels (gfloat              *in,
+gimp_operation_softlight_legacy_process_pixels (gfloat                *in,
                                                 gfloat                *layer,
                                                 gfloat                *mask,
                                                 gfloat                *out,
diff --git a/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.h
index b918e51..5ea11b0 100644
--- a/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.h
@@ -49,16 +49,16 @@ struct _GimpOperationSoftlightLegacyClass
 
 GType    gimp_operation_softlight_legacy_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_softlight_legacy_process_pixels (gfloat              *in,
-                                                         gfloat              *layer,
-                                                         gfloat              *mask,
-                                                         gfloat              *out,
-                                                         gfloat               opacity,
-                                                         glong                samples,
-                                                         const GeglRectangle *roi,
-                                                         gint                 level,
-                                                         GimpLayerBlendTRC    blend_trc, 
-                                                         GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_softlight_legacy_process_pixels (gfloat                *in,
+                                                         gfloat                *layer,
+                                                         gfloat                *mask,
+                                                         gfloat                *out,
+                                                         gfloat                 opacity,
+                                                         glong                  samples,
+                                                         const GeglRectangle   *roi,
+                                                         gint                   level,
+                                                         GimpLayerBlendTRC      blend_trc, 
+                                                         GimpLayerBlendTRC      composite_trc,
                                                          GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.c
index 2c66bca..7c6e237 100644
--- a/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.c
@@ -66,13 +66,13 @@ gimp_operation_subtract_legacy_init (GimpOperationSubtractLegacy *self)
 
 static gboolean
 gimp_operation_subtract_legacy_process (GeglOperation       *operation,
-                                      void                *in_buf,
-                                      void                *aux_buf,
-                                      void                *aux2_buf,
-                                      void                *out_buf,
-                                      glong                samples,
-                                      const GeglRectangle *roi,
-                                      gint                 level)
+                                        void                *in_buf,
+                                        void                *aux_buf,
+                                        void                *aux2_buf,
+                                        void                *out_buf,
+                                        glong                samples,
+                                        const GeglRectangle *roi,
+                                        gint                 level)
 {
   GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.h
index 582186a..59299ca 100644
--- a/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.h
@@ -49,16 +49,16 @@ struct _GimpOperationSubtractLegacyClass
 
 GType    gimp_operation_subtract_legacy_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_subtract_legacy_process_pixels (gfloat              *in,
-                                                        gfloat              *layer,
-                                                        gfloat              *mask,
-                                                        gfloat              *out,
-                                                        gfloat               opacity,
-                                                        glong                samples,
-                                                        const GeglRectangle *roi,
-                                                        gint                 level,
-                                                        GimpLayerBlendTRC    blend_trc, 
-                                                        GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_subtract_legacy_process_pixels (gfloat                *in,
+                                                        gfloat                *layer,
+                                                        gfloat                *mask,
+                                                        gfloat                *out,
+                                                        gfloat                 opacity,
+                                                        glong                  samples,
+                                                        const GeglRectangle   *roi,
+                                                        gint                   level,
+                                                        GimpLayerBlendTRC      blend_trc, 
+                                                        GimpLayerBlendTRC      composite_trc,
                                                         GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationbehind.c 
b/app/operations/layer-modes/gimpoperationbehind.c
index 74afd0b..cdd58c3 100644
--- a/app/operations/layer-modes/gimpoperationbehind.c
+++ b/app/operations/layer-modes/gimpoperationbehind.c
@@ -76,7 +76,10 @@ gimp_operation_behind_process (GeglOperation       *operation,
 {
   GimpOperationPointLayerMode *layer_mode = (void*)operation;
 
-  return gimp_operation_behind_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, layer_mode->opacity, 
samples, roi, level, layer_mode->blend_trc, layer_mode->composite_trc, layer_mode->composite_mode);
+  return gimp_operation_behind_process_pixels (in_buf, aux_buf, aux2_buf, 
+                       out_buf, layer_mode->opacity, samples, roi, level,
+                       layer_mode->blend_trc, layer_mode->composite_trc,
+                       layer_mode->composite_mode);
 }
 
 gboolean
diff --git a/app/operations/layer-modes/gimpoperationburn.c b/app/operations/layer-modes/gimpoperationburn.c
index 5fddf2a..f77f71e 100644
--- a/app/operations/layer-modes/gimpoperationburn.c
+++ b/app/operations/layer-modes/gimpoperationburn.c
@@ -77,7 +77,10 @@ gimp_operation_burn_process (GeglOperation       *operation,
 {
   GimpOperationPointLayerMode *layer_mode = (void*)operation;
 
-  return gimp_operation_burn_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, layer_mode->opacity, 
samples, roi, level, layer_mode->blend_trc, layer_mode->composite_mode, layer_mode->composite_mode);
+  return gimp_operation_burn_process_pixels (in_buf, aux_buf, aux2_buf,
+                  out_buf, layer_mode->opacity, samples, roi, level,
+                  layer_mode->blend_trc, layer_mode->composite_mode,
+                  layer_mode->composite_mode);
 } 
 
 
diff --git a/app/operations/layer-modes/gimpoperationcolorerase.h 
b/app/operations/layer-modes/gimpoperationcolorerase.h
index e38decc..b4208b0 100644
--- a/app/operations/layer-modes/gimpoperationcolorerase.h
+++ b/app/operations/layer-modes/gimpoperationcolorerase.h
@@ -49,16 +49,16 @@ struct _GimpOperationColorEraseClass
 
 GType    gimp_operation_color_erase_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_color_erase_process_pixels (gfloat              *in,
-                                                    gfloat              *layer,
-                                                    gfloat              *mask,
-                                                    gfloat              *out,
-                                                    gfloat               opacity,
-                                                    glong                samples,
-                                                    const GeglRectangle *roi,
-                                                    gint                 level,
-                                                    GimpLayerBlendTRC    blend_trc, 
-                                                    GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_color_erase_process_pixels (gfloat                *in,
+                                                    gfloat                *layer,
+                                                    gfloat                *mask,
+                                                    gfloat                *out,
+                                                    gfloat                 opacity,
+                                                    glong                  samples,
+                                                    const GeglRectangle   *roi,
+                                                    gint                   level,
+                                                    GimpLayerBlendTRC      blend_trc, 
+                                                    GimpLayerBlendTRC      composite_trc,
                                                     GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationdarkenonly.h 
b/app/operations/layer-modes/gimpoperationdarkenonly.h
index 8e394e8..8ece2ec 100644
--- a/app/operations/layer-modes/gimpoperationdarkenonly.h
+++ b/app/operations/layer-modes/gimpoperationdarkenonly.h
@@ -50,16 +50,16 @@ struct _GimpOperationDarkenOnlyClass
 
 GType    gimp_operation_darken_only_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_darken_only_process_pixels (gfloat              *in,
-                                                    gfloat              *layer,
-                                                    gfloat              *mask,
-                                                    gfloat              *out,
-                                                    gfloat               opacity,
-                                                    glong                samples,
-                                                    const GeglRectangle *roi,
-                                                    gint                 level,
-                                                    GimpLayerBlendTRC    blend_trc, 
-                                                    GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_darken_only_process_pixels (gfloat                *in,
+                                                    gfloat                *layer,
+                                                    gfloat                *mask,
+                                                    gfloat                *out,
+                                                    gfloat                 opacity,
+                                                    glong                  samples,
+                                                    const GeglRectangle   *roi,
+                                                    gint                   level,
+                                                    GimpLayerBlendTRC      blend_trc, 
+                                                    GimpLayerBlendTRC      composite_trc,
                                                     GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationdissolve.h 
b/app/operations/layer-modes/gimpoperationdissolve.h
index 4e21a61..8b5842f 100644
--- a/app/operations/layer-modes/gimpoperationdissolve.h
+++ b/app/operations/layer-modes/gimpoperationdissolve.h
@@ -49,16 +49,16 @@ struct _GimpOperationDissolve
 
 GType    gimp_operation_dissolve_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_dissolve_process_pixels (gfloat              *in,
-                                                 gfloat              *layer,
-                                                 gfloat              *mask,
-                                                 gfloat              *out,
-                                                 gfloat               opacity,
-                                                 glong                samples,
-                                                 const GeglRectangle *result,
-                                                 gint                 level,
-                                                 GimpLayerBlendTRC    blend_trc, 
-                                                 GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_dissolve_process_pixels (gfloat                *in,
+                                                 gfloat                *layer,
+                                                 gfloat                *mask,
+                                                 gfloat                *out,
+                                                 gfloat                 opacity,
+                                                 glong                  samples,
+                                                 const GeglRectangle   *result,
+                                                 gint                   level,
+                                                 GimpLayerBlendTRC      blend_trc, 
+                                                 GimpLayerBlendTRC      composite_trc,
                                                  GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationdivide.h 
b/app/operations/layer-modes/gimpoperationdivide.h
index 92b52cd..2094f09 100644
--- a/app/operations/layer-modes/gimpoperationdivide.h
+++ b/app/operations/layer-modes/gimpoperationdivide.h
@@ -50,16 +50,16 @@ struct _GimpOperationDivideClass
 
 GType    gimp_operation_divide_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_divide_process_pixels (gfloat              *in,
-                                               gfloat              *layer,
-                                               gfloat              *mask,
-                                               gfloat              *out,
-                                               gfloat               opacity,
-                                               glong                samples,
-                                               const GeglRectangle *roi,
-                                               gint                 level,
-                                               GimpLayerBlendTRC    blend_trc, 
-                                               GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_divide_process_pixels (gfloat                *in,
+                                               gfloat                *layer,
+                                               gfloat                *mask,
+                                               gfloat                *out,
+                                               gfloat                 opacity,
+                                               glong                  samples,
+                                               const GeglRectangle   *roi,
+                                               gint                   level,
+                                               GimpLayerBlendTRC      blend_trc, 
+                                               GimpLayerBlendTRC      composite_trc,
                                                GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationdodge.h b/app/operations/layer-modes/gimpoperationdodge.h
index 476fecb..fe2e179 100644
--- a/app/operations/layer-modes/gimpoperationdodge.h
+++ b/app/operations/layer-modes/gimpoperationdodge.h
@@ -50,16 +50,16 @@ struct _GimpOperationDodgeClass
 
 GType    gimp_operation_dodge_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_dodge_process_pixels (gfloat              *in,
-                                              gfloat              *layer,
-                                              gfloat              *mask,
-                                              gfloat              *out,
-                                              gfloat               opacity,
-                                              glong                samples,
-                                              const GeglRectangle *roi,
-                                              gint                 level,
-                                              GimpLayerBlendTRC    blend_trc, 
-                                              GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_dodge_process_pixels (gfloat                *in,
+                                              gfloat                *layer,
+                                              gfloat                *mask,
+                                              gfloat                *out,
+                                              gfloat                 opacity,
+                                              glong                  samples,
+                                              const GeglRectangle   *roi,
+                                              gint                   level,
+                                              GimpLayerBlendTRC      blend_trc, 
+                                              GimpLayerBlendTRC      composite_trc,
                                               GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationerase.h b/app/operations/layer-modes/gimpoperationerase.h
index a22213c..dcbd93e 100644
--- a/app/operations/layer-modes/gimpoperationerase.h
+++ b/app/operations/layer-modes/gimpoperationerase.h
@@ -49,16 +49,16 @@ struct _GimpOperationEraseClass
 
 GType    gimp_operation_erase_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_erase_process_pixels (gfloat              *in,
-                                              gfloat              *layer,
-                                              gfloat              *mask,
-                                              gfloat              *out,
-                                              gfloat               opacity,
-                                              glong                samples,
-                                              const GeglRectangle *roi,
-                                              gint                 level,
-                                              GimpLayerBlendTRC    blend_trc, 
-                                              GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_erase_process_pixels (gfloat                *in,
+                                              gfloat                *layer,
+                                              gfloat                *mask,
+                                              gfloat                *out,
+                                              gfloat                 opacity,
+                                              glong                  samples,
+                                              const GeglRectangle   *roi,
+                                              gint                   level,
+                                              GimpLayerBlendTRC      blend_trc, 
+                                              GimpLayerBlendTRC      composite_trc,
                                               GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationgrainextract.c 
b/app/operations/layer-modes/gimpoperationgrainextract.c
index 9f29b09..57756fb 100644
--- a/app/operations/layer-modes/gimpoperationgrainextract.c
+++ b/app/operations/layer-modes/gimpoperationgrainextract.c
@@ -30,13 +30,13 @@
 
 
 static gboolean gimp_operation_grain_extract_process (GeglOperation       *operation,
-                                                           void                *in_buf,
-                                                           void                *aux_buf,
-                                                           void                *aux2_buf,
-                                                           void                *out_buf,
-                                                           glong                samples,
-                                                           const GeglRectangle *roi,
-                                                           gint                 level);
+                                                      void                *in_buf,
+                                                      void                *aux_buf,
+                                                      void                *aux2_buf,
+                                                      void                *out_buf,
+                                                      glong                samples,
+                                                      const GeglRectangle *roi,
+                                                      gint                 level);
 
 
 G_DEFINE_TYPE (GimpOperationGrainExtract, gimp_operation_grain_extract,
diff --git a/app/operations/layer-modes/gimpoperationgrainextract.h 
b/app/operations/layer-modes/gimpoperationgrainextract.h
index 27bd07c..3bde1fb 100644
--- a/app/operations/layer-modes/gimpoperationgrainextract.h
+++ b/app/operations/layer-modes/gimpoperationgrainextract.h
@@ -50,16 +50,16 @@ struct _GimpOperationGrainExtractClass
 
 GType    gimp_operation_grain_extract_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_grain_extract_process_pixels (gfloat              *in,
-                                                      gfloat              *layer,
-                                                      gfloat              *mask,
-                                                      gfloat              *out,
-                                                      gfloat               opacity,
-                                                      glong                samples,
-                                                      const GeglRectangle *roi,
-                                                      gint                 level,
-                                                      GimpLayerBlendTRC    blend_trc, 
-                                                      GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_grain_extract_process_pixels (gfloat                *in,
+                                                      gfloat                *layer,
+                                                      gfloat                *mask,
+                                                      gfloat                *out,
+                                                      gfloat                 opacity,
+                                                      glong                  samples,
+                                                      const GeglRectangle   *roi,
+                                                      gint                   level,
+                                                      GimpLayerBlendTRC      blend_trc, 
+                                                      GimpLayerBlendTRC      composite_trc,
                                                       GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationgrainmerge.h 
b/app/operations/layer-modes/gimpoperationgrainmerge.h
index af77341..83fd4d6 100644
--- a/app/operations/layer-modes/gimpoperationgrainmerge.h
+++ b/app/operations/layer-modes/gimpoperationgrainmerge.h
@@ -50,16 +50,16 @@ struct _GimpOperationGrainMergeClass
 
 GType    gimp_operation_grain_merge_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_grain_merge_process_pixels (gfloat              *in,
-                                                    gfloat              *layer,
-                                                    gfloat              *mask,
-                                                    gfloat              *out,
-                                                    gfloat               opacity,
-                                                    glong                samples,
-                                                    const GeglRectangle *roi,
-                                                    gint                 level,
-                                                    GimpLayerBlendTRC    blend_trc, 
-                                                    GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_grain_merge_process_pixels (gfloat                *in,
+                                                    gfloat                *layer,
+                                                    gfloat                *mask,
+                                                    gfloat                *out,
+                                                    gfloat                 opacity,
+                                                    glong                  samples,
+                                                    const GeglRectangle   *roi,
+                                                    gint                   level,
+                                                    GimpLayerBlendTRC      blend_trc, 
+                                                    GimpLayerBlendTRC      composite_trc,
                                                     GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationhardlight.h 
b/app/operations/layer-modes/gimpoperationhardlight.h
index 55f734d..fe1031e 100644
--- a/app/operations/layer-modes/gimpoperationhardlight.h
+++ b/app/operations/layer-modes/gimpoperationhardlight.h
@@ -49,16 +49,16 @@ struct _GimpOperationHardlightClass
 
 GType    gimp_operation_hardlight_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_hardlight_process_pixels (gfloat              *in,
-                                                  gfloat              *layer,
-                                                  gfloat              *mask,
-                                                  gfloat              *out,
-                                                  gfloat               opacity,
-                                                  glong                samples,
-                                                  const GeglRectangle *roi,
-                                                  gint                 level,
-                                                  GimpLayerBlendTRC    blend_trc, 
-                                                  GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_hardlight_process_pixels (gfloat                *in,
+                                                  gfloat                *layer,
+                                                  gfloat                *mask,
+                                                  gfloat                *out,
+                                                  gfloat                 opacity,
+                                                  glong                  samples,
+                                                  const GeglRectangle   *roi,
+                                                  gint                   level,
+                                                  GimpLayerBlendTRC      blend_trc, 
+                                                  GimpLayerBlendTRC      composite_trc,
                                                   GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationhsvcolor.h 
b/app/operations/layer-modes/gimpoperationhsvcolor.h
index 43e91ea..2b825b4 100644
--- a/app/operations/layer-modes/gimpoperationhsvcolor.h
+++ b/app/operations/layer-modes/gimpoperationhsvcolor.h
@@ -50,16 +50,16 @@ struct _GimpOperationHsvColorClass
 
 GType    gimp_operation_hsv_color_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_hsv_color_process_pixels (gfloat              *in,
-                                                  gfloat              *layer,
-                                                  gfloat              *mask,
-                                                  gfloat              *out,
-                                                  gfloat               opacity,
-                                                  glong                samples,
-                                                  const GeglRectangle *roi,
-                                                  gint                 level,
-                                                  GimpLayerBlendTRC    blend_trc, 
-                                                  GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_hsv_color_process_pixels (gfloat                *in,
+                                                  gfloat                *layer,
+                                                  gfloat                *mask,
+                                                  gfloat                *out,
+                                                  gfloat                 opacity,
+                                                  glong                  samples,
+                                                  const GeglRectangle   *roi,
+                                                  gint                   level,
+                                                  GimpLayerBlendTRC      blend_trc, 
+                                                  GimpLayerBlendTRC      composite_trc,
                                                   GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationhsvhue.c 
b/app/operations/layer-modes/gimpoperationhsvhue.c
index 159f015..aa8a8aa 100644
--- a/app/operations/layer-modes/gimpoperationhsvhue.c
+++ b/app/operations/layer-modes/gimpoperationhsvhue.c
@@ -85,16 +85,16 @@ gimp_operation_hsv_hue_process (GeglOperation       *operation,
 }
 
 gboolean
-gimp_operation_hsv_hue_process_pixels (gfloat              *in,
-                                       gfloat              *layer,
-                                       gfloat              *mask,
-                                       gfloat              *out,
-                                       gfloat               opacity,
-                                       glong                samples,
-                                       const GeglRectangle *roi,
-                                       gint                 level,
-                                       GimpLayerBlendTRC    blend_trc,
-                                       GimpLayerBlendTRC    composite_trc,
+gimp_operation_hsv_hue_process_pixels (gfloat                *in,
+                                       gfloat                *layer,
+                                       gfloat                *mask,
+                                       gfloat                *out,
+                                       gfloat                 opacity,
+                                       glong                  samples,
+                                       const GeglRectangle   *roi,
+                                       gint                   level,
+                                       GimpLayerBlendTRC      blend_trc,
+                                       GimpLayerBlendTRC      composite_trc,
                                        GimpLayerCompositeMode composite_mode)
 {
   gimp_composite_blend (in, layer, mask, out, opacity, samples, blend_trc,
diff --git a/app/operations/layer-modes/gimpoperationhsvhue.h 
b/app/operations/layer-modes/gimpoperationhsvhue.h
index 6fcd343..15a37ae 100644
--- a/app/operations/layer-modes/gimpoperationhsvhue.h
+++ b/app/operations/layer-modes/gimpoperationhsvhue.h
@@ -50,16 +50,16 @@ struct _GimpOperationHsvHueClass
 
 GType    gimp_operation_hsv_hue_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_hsv_hue_process_pixels (gfloat              *in,
-                                                gfloat              *layer,
-                                                gfloat              *mask,
-                                                gfloat              *out,
-                                                gfloat               opacity,
-                                                glong                samples,
-                                                const GeglRectangle *roi,
-                                                gint                 level,
-                                                GimpLayerBlendTRC    blend_trc, 
-                                                GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_hsv_hue_process_pixels (gfloat                *in,
+                                                gfloat                *layer,
+                                                gfloat                *mask,
+                                                gfloat                *out,
+                                                gfloat                 opacity,
+                                                glong                  samples,
+                                                const GeglRectangle   *roi,
+                                                gint                   level,
+                                                GimpLayerBlendTRC      blend_trc, 
+                                                GimpLayerBlendTRC      composite_trc,
                                                 GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationhsvsaturation.h 
b/app/operations/layer-modes/gimpoperationhsvsaturation.h
index 29bab15..7777e62 100644
--- a/app/operations/layer-modes/gimpoperationhsvsaturation.h
+++ b/app/operations/layer-modes/gimpoperationhsvsaturation.h
@@ -50,16 +50,16 @@ struct _GimpOperationHsvSaturationClass
 
 GType    gimp_operation_hsv_saturation_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_hsv_saturation_process_pixels (gfloat              *in,
-                                                       gfloat              *layer,
-                                                       gfloat              *mask,
-                                                       gfloat              *out,
-                                                       gfloat               opacity,
-                                                       glong                samples,
-                                                       const GeglRectangle *roi,
-                                                       gint                 level,
-                                                       GimpLayerBlendTRC    blend_trc, 
-                                                       GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_hsv_saturation_process_pixels (gfloat                *in,
+                                                       gfloat                *layer,
+                                                       gfloat                *mask,
+                                                       gfloat                *out,
+                                                       gfloat                 opacity,
+                                                       glong                  samples,
+                                                       const GeglRectangle   *roi,
+                                                       gint                   level,
+                                                       GimpLayerBlendTRC      blend_trc, 
+                                                       GimpLayerBlendTRC      composite_trc,
                                                        GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationhsvvalue.h 
b/app/operations/layer-modes/gimpoperationhsvvalue.h
index 07012a2..ab81972 100644
--- a/app/operations/layer-modes/gimpoperationhsvvalue.h
+++ b/app/operations/layer-modes/gimpoperationhsvvalue.h
@@ -50,16 +50,16 @@ struct _GimpOperationHsvValueClass
 
 GType    gimp_operation_hsv_value_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_hsv_value_process_pixels (gfloat              *in,
-                                                  gfloat              *layer,
-                                                  gfloat              *mask,
-                                                  gfloat              *out,
-                                                  gfloat               opacity,
-                                                  glong                samples,
-                                                  const GeglRectangle *roi,
-                                                  gint                 level,
-                                                  GimpLayerBlendTRC    blend_trc, 
-                                                  GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_hsv_value_process_pixels (gfloat                *in,
+                                                  gfloat                *layer,
+                                                  gfloat                *mask,
+                                                  gfloat                *out,
+                                                  gfloat                 opacity,
+                                                  glong                  samples,
+                                                  const GeglRectangle   *roi,
+                                                  gint                   level,
+                                                  GimpLayerBlendTRC      blend_trc, 
+                                                  GimpLayerBlendTRC      composite_trc,
                                                   GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationlchchroma.h 
b/app/operations/layer-modes/gimpoperationlchchroma.h
index 86658d1..f3d8e35 100644
--- a/app/operations/layer-modes/gimpoperationlchchroma.h
+++ b/app/operations/layer-modes/gimpoperationlchchroma.h
@@ -63,16 +63,16 @@ gboolean gimp_operation_lch_chroma_process_pixels_linear (gfloat              *i
                                                           GimpLayerBlendTRC    composite_trc,
                                                           GimpLayerCompositeMode composite_mode);
 
-gboolean gimp_operation_lch_chroma_process_pixels        (gfloat              *in,
-                                                          gfloat              *layer,
-                                                          gfloat              *mask,
-                                                          gfloat              *out,
-                                                          gfloat               opacity,
-                                                          glong                samples,
-                                                          const GeglRectangle *roi,
-                                                          gint                 level,
-                                                          GimpLayerBlendTRC    blend_trc, 
-                                                          GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_lch_chroma_process_pixels        (gfloat                *in,
+                                                          gfloat                *layer,
+                                                          gfloat                *mask,
+                                                          gfloat                *out,
+                                                          gfloat                 opacity,
+                                                          glong                  samples,
+                                                          const GeglRectangle   *roi,
+                                                          gint                   level,
+                                                          GimpLayerBlendTRC      blend_trc, 
+                                                          GimpLayerBlendTRC      composite_trc,
                                                           GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationlchcolor.h 
b/app/operations/layer-modes/gimpoperationlchcolor.h
index 51e396a..c810579 100644
--- a/app/operations/layer-modes/gimpoperationlchcolor.h
+++ b/app/operations/layer-modes/gimpoperationlchcolor.h
@@ -51,28 +51,28 @@ struct _GimpOperationLchColorClass
 
 GType    gimp_operation_lch_color_get_type              (void) G_GNUC_CONST;
 
-gboolean gimp_operation_lch_color_process_pixels_linear (gfloat              *in,
-                                                         gfloat              *layer,
-                                                         gfloat              *mask,
-                                                         gfloat              *out,
-                                                         gfloat               opacity,
-                                                         glong                samples,
-                                                         const GeglRectangle *roi,
-                                                         gint                 level,
-                                                         GimpLayerBlendTRC    blend_trc, 
-                                                         GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_lch_color_process_pixels_linear (gfloat                *in,
+                                                         gfloat                *layer,
+                                                         gfloat                *mask,
+                                                         gfloat                *out,
+                                                         gfloat                 opacity,
+                                                         glong                  samples,
+                                                         const GeglRectangle   *roi,
+                                                         gint                   level,
+                                                         GimpLayerBlendTRC      blend_trc, 
+                                                         GimpLayerBlendTRC      composite_trc,
                                                          GimpLayerCompositeMode composite_mode);
 
-gboolean gimp_operation_lch_color_process_pixels        (gfloat              *in,
-                                                         gfloat              *layer,
-                                                         gfloat              *mask,
-                                                         gfloat              *out,
-                                                         gfloat               opacity,
-                                                         glong                samples,
-                                                         const GeglRectangle *roi,
-                                                         gint                 level,
-                                                         GimpLayerBlendTRC    blend_trc, 
-                                                         GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_lch_color_process_pixels        (gfloat                *in,
+                                                         gfloat                *layer,
+                                                         gfloat                *mask,
+                                                         gfloat                *out,
+                                                         gfloat                 opacity,
+                                                         glong                  samples,
+                                                         const GeglRectangle   *roi,
+                                                         gint                   level,
+                                                         GimpLayerBlendTRC      blend_trc, 
+                                                         GimpLayerBlendTRC      composite_trc,
                                                          GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationlchhue.h 
b/app/operations/layer-modes/gimpoperationlchhue.h
index 7edf1e5..19e582c 100644
--- a/app/operations/layer-modes/gimpoperationlchhue.h
+++ b/app/operations/layer-modes/gimpoperationlchhue.h
@@ -51,28 +51,28 @@ struct _GimpOperationLchHueClass
 
 GType    gimp_operation_lch_hue_get_type              (void) G_GNUC_CONST;
 
-gboolean gimp_operation_lch_hue_process_pixels_linear (gfloat              *in,
-                                                       gfloat              *layer,
-                                                       gfloat              *mask,
-                                                       gfloat              *out,
-                                                       gfloat               opacity,
-                                                       glong                samples,
-                                                       const GeglRectangle *roi,
-                                                       gint                 level,
-                                                       GimpLayerBlendTRC    blend_trc, 
-                                                       GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_lch_hue_process_pixels_linear (gfloat                *in,
+                                                       gfloat                *layer,
+                                                       gfloat                *mask,
+                                                       gfloat                *out,
+                                                       gfloat                 opacity,
+                                                       glong                  samples,
+                                                       const GeglRectangle   *roi,
+                                                       gint                   level,
+                                                       GimpLayerBlendTRC      blend_trc, 
+                                                       GimpLayerBlendTRC      composite_trc,
                                                        GimpLayerCompositeMode composite_mode);
 
-gboolean gimp_operation_lch_hue_process_pixels        (gfloat              *in,
-                                                       gfloat              *layer,
-                                                       gfloat              *mask,
-                                                       gfloat              *out,
-                                                       gfloat               opacity,
-                                                       glong                samples,
-                                                       const GeglRectangle *roi,
-                                                       gint                 level,
-                                                       GimpLayerBlendTRC    blend_trc, 
-                                                       GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_lch_hue_process_pixels        (gfloat                *in,
+                                                       gfloat                *layer,
+                                                       gfloat                *mask,
+                                                       gfloat                *out,
+                                                       gfloat                 opacity,
+                                                       glong                  samples,
+                                                       const GeglRectangle   *roi,
+                                                       gint                   level,
+                                                       GimpLayerBlendTRC      blend_trc, 
+                                                       GimpLayerBlendTRC      composite_trc,
                                                        GimpLayerCompositeMode composite_mode);
 
 #endif /* __GIMP_OPERATION_LCH_HUE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlchlightness.h 
b/app/operations/layer-modes/gimpoperationlchlightness.h
index 4b97610..7191253 100644
--- a/app/operations/layer-modes/gimpoperationlchlightness.h
+++ b/app/operations/layer-modes/gimpoperationlchlightness.h
@@ -51,28 +51,28 @@ struct _GimpOperationLchLightnessClass
 
 GType    gimp_operation_lch_lightness_get_type              (void) G_GNUC_CONST;
 
-gboolean gimp_operation_lch_lightness_process_pixels_linear (gfloat              *in,
-                                                             gfloat              *layer,
-                                                             gfloat              *mask,
-                                                             gfloat              *out,
-                                                             gfloat               opacity,
-                                                             glong                samples,
-                                                             const GeglRectangle *roi,
-                                                             gint                 level,
-                                                             GimpLayerBlendTRC    blend_trc, 
-                                                             GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_lch_lightness_process_pixels_linear (gfloat                *in,
+                                                             gfloat                *layer,
+                                                             gfloat                *mask,
+                                                             gfloat                *out,
+                                                             gfloat                 opacity,
+                                                             glong                  samples,
+                                                             const GeglRectangle   *roi,
+                                                             gint                   level,
+                                                             GimpLayerBlendTRC      blend_trc, 
+                                                             GimpLayerBlendTRC      composite_trc,
                                                              GimpLayerCompositeMode composite_mode);
 
-gboolean gimp_operation_lch_lightness_process_pixels        (gfloat              *in,
-                                                             gfloat              *layer,
-                                                             gfloat              *mask,
-                                                             gfloat              *out,
-                                                             gfloat               opacity,
-                                                             glong                samples,
-                                                             const GeglRectangle *roi,
-                                                             gint                 level,
-                                                             GimpLayerBlendTRC    blend_trc, 
-                                                             GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_lch_lightness_process_pixels        (gfloat                *in,
+                                                             gfloat                *layer,
+                                                             gfloat                *mask,
+                                                             gfloat                *out,
+                                                             gfloat                 opacity,
+                                                             glong                  samples,
+                                                             const GeglRectangle   *roi,
+                                                             gint                   level,
+                                                             GimpLayerBlendTRC      blend_trc, 
+                                                             GimpLayerBlendTRC      composite_trc,
                                                              GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationlightenonly.c 
b/app/operations/layer-modes/gimpoperationlightenonly.c
index 55d8c33..5273db9 100644
--- a/app/operations/layer-modes/gimpoperationlightenonly.c
+++ b/app/operations/layer-modes/gimpoperationlightenonly.c
@@ -30,13 +30,13 @@
 
 
 static gboolean gimp_operation_lighten_only_process (GeglOperation       *operation,
-                                                          void                *in_buf,
-                                                          void                *aux_buf,
-                                                          void                *aux2_buf,
-                                                          void                *out_buf,
-                                                          glong                samples,
-                                                          const GeglRectangle *roi,
-                                                          gint                 level);
+                                                     void                *in_buf,
+                                                     void                *aux_buf,
+                                                     void                *aux2_buf,
+                                                     void                *out_buf,
+                                                     glong                samples,
+                                                     const GeglRectangle *roi,
+                                                     gint                 level);
 
 
 G_DEFINE_TYPE (GimpOperationLightenOnly, gimp_operation_lighten_only,
diff --git a/app/operations/layer-modes/gimpoperationlightenonly.h 
b/app/operations/layer-modes/gimpoperationlightenonly.h
index 6c18e99..cda7443 100644
--- a/app/operations/layer-modes/gimpoperationlightenonly.h
+++ b/app/operations/layer-modes/gimpoperationlightenonly.h
@@ -50,16 +50,16 @@ struct _GimpOperationLightenOnlyClass
 
 GType    gimp_operation_lighten_only_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_lighten_only_process_pixels (gfloat              *in,
-                                                     gfloat              *layer,
-                                                     gfloat              *mask,
-                                                     gfloat              *out,
-                                                     gfloat               opacity,
-                                                     glong                samples,
-                                                     const GeglRectangle *roi,
-                                                     gint                 level,
-                                                     GimpLayerBlendTRC    blend_trc, 
-                                                     GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_lighten_only_process_pixels (gfloat                *in,
+                                                     gfloat                *layer,
+                                                     gfloat                *mask,
+                                                     gfloat                *out,
+                                                     gfloat                 opacity,
+                                                     glong                  samples,
+                                                     const GeglRectangle   *roi,
+                                                     gint                   level,
+                                                     GimpLayerBlendTRC      blend_trc, 
+                                                     GimpLayerBlendTRC      composite_trc,
                                                      GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationmultiply.h 
b/app/operations/layer-modes/gimpoperationmultiply.h
index 2d2bffa..e6fbbf7 100644
--- a/app/operations/layer-modes/gimpoperationmultiply.h
+++ b/app/operations/layer-modes/gimpoperationmultiply.h
@@ -50,16 +50,16 @@ struct _GimpOperationMultiplyClass
 
 GType    gimp_operation_multiply_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_multiply_process_pixels (gfloat              *in,
-                                                 gfloat              *layer,
-                                                 gfloat              *mask,
-                                                 gfloat              *out,
-                                                 gfloat               opacity,
-                                                 glong                samples,
-                                                 const GeglRectangle *roi,
-                                                 gint                 level,
-                                                 GimpLayerBlendTRC    blend_trc, 
-                                                 GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_multiply_process_pixels (gfloat                *in,
+                                                 gfloat                *layer,
+                                                 gfloat                *mask,
+                                                 gfloat                *out,
+                                                 gfloat                 opacity,
+                                                 glong                  samples,
+                                                 const GeglRectangle   *roi,
+                                                 gint                   level,
+                                                 GimpLayerBlendTRC      blend_trc, 
+                                                 GimpLayerBlendTRC      composite_trc,
                                                  GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationnormal.h 
b/app/operations/layer-modes/gimpoperationnormal.h
index f767ec6..5a96e15 100644
--- a/app/operations/layer-modes/gimpoperationnormal.h
+++ b/app/operations/layer-modes/gimpoperationnormal.h
@@ -51,40 +51,40 @@ GType    gimp_operation_normal_get_type            (void) G_GNUC_CONST;
 
 extern GimpLayerModeFunc gimp_operation_normal_process_pixels;
 
-gboolean gimp_operation_normal_process_pixels_core (gfloat              *in,
-                                                    gfloat              *aux,
-                                                    gfloat              *mask,
-                                                    gfloat              *out,
-                                                    gfloat               opacity,
-                                                    glong                samples,
-                                                    const GeglRectangle *roi,
-                                                    gint                 level,
-                                                    GimpLayerBlendTRC    blend_trc, 
-                                                    GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_normal_process_pixels_core (gfloat                *in,
+                                                    gfloat                *aux,
+                                                    gfloat                *mask,
+                                                    gfloat                *out,
+                                                    gfloat                 opacity,
+                                                    glong                  samples,
+                                                    const GeglRectangle   *roi,
+                                                    gint                   level,
+                                                    GimpLayerBlendTRC      blend_trc, 
+                                                    GimpLayerBlendTRC      composite_trc,
                                                     GimpLayerCompositeMode composite_mode);
 
-gboolean gimp_operation_normal_process_pixels_sse2 (gfloat              *in,
-                                                    gfloat              *aux,
-                                                    gfloat              *mask,
-                                                    gfloat              *out,
-                                                    gfloat               opacity,
-                                                    glong                samples,
-                                                    const GeglRectangle *roi,
-                                                    gint                 level,
-                                                    GimpLayerBlendTRC    blend_trc, 
-                                                    GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_normal_process_pixels_sse2 (gfloat                *in,
+                                                    gfloat                *aux,
+                                                    gfloat                *mask,
+                                                    gfloat                *out,
+                                                    gfloat                 opacity,
+                                                    glong                  samples,
+                                                    const GeglRectangle   *roi,
+                                                    gint                   level,
+                                                    GimpLayerBlendTRC      blend_trc, 
+                                                    GimpLayerBlendTRC      composite_trc,
                                                     GimpLayerCompositeMode composite_mode);
 
-gboolean gimp_operation_normal_process_pixels_sse4 (gfloat              *in,
-                                                    gfloat              *aux,
-                                                    gfloat              *mask,
-                                                    gfloat              *out,
-                                                    gfloat               opacity,
-                                                    glong                samples,
-                                                    const GeglRectangle *roi,
-                                                    gint                 level,
-                                                    GimpLayerBlendTRC    blend_trc, 
-                                                    GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_normal_process_pixels_sse4 (gfloat                *in,
+                                                    gfloat                *aux,
+                                                    gfloat                *mask,
+                                                    gfloat                *out,
+                                                    gfloat                 opacity,
+                                                    glong                  samples,
+                                                    const GeglRectangle   *roi,
+                                                    gint                   level,
+                                                    GimpLayerBlendTRC      blend_trc, 
+                                                    GimpLayerBlendTRC      composite_trc,
                                                     GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationoverlay.h 
b/app/operations/layer-modes/gimpoperationoverlay.h
index c92d8bf..57001b8 100644
--- a/app/operations/layer-modes/gimpoperationoverlay.h
+++ b/app/operations/layer-modes/gimpoperationoverlay.h
@@ -49,16 +49,16 @@ struct _GimpOperationOverlayClass
 
 GType    gimp_operation_overlay_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_overlay_process_pixels (gfloat              *in,
-                                                gfloat              *layer,
-                                                gfloat              *mask,
-                                                gfloat              *out,
-                                                gfloat               opacity,
-                                                glong                samples,
-                                                const GeglRectangle *roi,
-                                                gint                 level,
-                                                GimpLayerBlendTRC    blend_trc, 
-                                                GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_overlay_process_pixels (gfloat                *in,
+                                                gfloat                *layer,
+                                                gfloat                *mask,
+                                                gfloat                *out,
+                                                gfloat                 opacity,
+                                                glong                  samples,
+                                                const GeglRectangle   *roi,
+                                                gint                   level,
+                                                GimpLayerBlendTRC      blend_trc, 
+                                                GimpLayerBlendTRC      composite_trc,
                                                 GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationpointlayermode.h 
b/app/operations/layer-modes/gimpoperationpointlayermode.h
index 27d086a..e3a90c8 100644
--- a/app/operations/layer-modes/gimpoperationpointlayermode.h
+++ b/app/operations/layer-modes/gimpoperationpointlayermode.h
@@ -118,24 +118,32 @@ gimp_composite_blend (gfloat                *in,
                                               float *out,
                                               int samples))
 {
-  int samples_backup = samples;
+  int samples_backup  = samples;
   gfloat *blend_in    = in;
   gfloat *blend_layer = layer;
   gfloat *blend_out   = out;
+
   const Babl *fish_to_blend = NULL;
   const Babl *fish_to_composite = NULL;
   const Babl *fish_from_composite = NULL;
  
   switch (blend_trc)
   {
+    default:
     case GIMP_LAYER_BLEND_RGB_LINEAR:
+      fish_to_blend   =  NULL;
       switch (composite_trc)
       {
+        case GIMP_LAYER_BLEND_LAB:
+          fish_to_composite   = _gimp_fish_rgba_to_laba;
+          fish_from_composite = _gimp_fish_laba_to_rgba;
         default:
         case GIMP_LAYER_BLEND_RGB_LINEAR:
+          fish_to_composite   = NULL;
+          fish_from_composite = NULL;
           break;
         case GIMP_LAYER_BLEND_RGB_PERCEPTUAL:
-          fish_to_composite = _gimp_fish_rgba_to_perceptual;
+          fish_to_composite   = _gimp_fish_rgba_to_perceptual;
           fish_from_composite = _gimp_fish_perceptual_to_rgba;
           break;
       }
@@ -144,9 +152,13 @@ gimp_composite_blend (gfloat                *in,
       fish_to_blend   = _gimp_fish_rgba_to_laba;
       switch (composite_trc)
       {
+        case GIMP_LAYER_BLEND_LAB:
         default:
+          fish_to_composite = NULL;
+          fish_from_composite = _gimp_fish_laba_to_rgba;
         case GIMP_LAYER_BLEND_RGB_LINEAR:
           fish_to_composite = _gimp_fish_laba_to_rgba;
+          fish_from_composite = NULL;
           break;
         case GIMP_LAYER_BLEND_RGB_PERCEPTUAL:
           fish_to_composite = _gimp_fish_laba_to_perceptual;
@@ -155,58 +167,44 @@ gimp_composite_blend (gfloat                *in,
       }
       break;
     case GIMP_LAYER_BLEND_RGB_PERCEPTUAL:
-      fish_to_blend   = _gimp_fish_rgba_to_perceptual;
+      fish_to_blend = _gimp_fish_rgba_to_perceptual;
       switch (composite_trc)
       {
+        case GIMP_LAYER_BLEND_LAB:
         default:
+          fish_to_composite = _gimp_fish_perceptual_to_laba;
+          fish_from_composite = NULL;
         case GIMP_LAYER_BLEND_RGB_LINEAR:
           fish_to_composite = _gimp_fish_perceptual_to_rgba;
+          fish_from_composite = NULL;
           break;
         case GIMP_LAYER_BLEND_RGB_PERCEPTUAL:
+          fish_to_composite = NULL;
           fish_from_composite = _gimp_fish_perceptual_to_rgba;
           break;
       }
       break;
   }
 
-  if (blendfun == NULL)
-  {
-     if (fish_to_blend == NULL)
-       {
-         blend_out = layer;
-       }
-     else
-       {
-         blend_out = alloca (sizeof (gfloat) * 4 * samples);
-         babl_process (fish_to_blend, layer, blend_out, samples);
-       }
-  }
-  else if (fish_to_blend == NULL)
-  {
-    if (in == out)
-      blend_out = alloca (sizeof (gfloat) * 4 * samples);
+  if (in == out) /* in-place detected, avoid clobbering since we need to
+                    read it for the compositing stage  */
+    blend_out = alloca (sizeof (gfloat) * 4 * samples);
 
-    blendfun (blend_in, blend_layer, blend_out, samples);
-    if (fish_to_composite)
-    {
-      babl_process (fish_to_composite, blend_out, blend_out, samples);
-    }
-  }
-  else {
+  if (fish_to_blend)
+  {
     blend_in    = alloca (sizeof (gfloat) * 4 * samples);
     blend_layer = alloca (sizeof (gfloat) * 4 * samples);
+    babl_process (fish_to_blend, in,    blend_in,  samples);
+    babl_process (fish_to_blend, layer, blend_layer,  samples);
+  }
 
-    if (in == out)
-      blend_out   = alloca (sizeof (gfloat) * 4 * samples);
-    babl_process (fish_to_blend, in, blend_in, samples);
-    babl_process (fish_to_blend, layer, blend_layer, samples);
-    blendfun (blend_in, blend_layer, blend_out, samples);
+  blendfun (blend_in, blend_layer, blend_out, samples);
 
-    if (fish_to_composite)
+  if (fish_to_composite)
     {
+      babl_process (fish_to_composite, blend_in, blend_in,   samples);
       babl_process (fish_to_composite, blend_out, blend_out, samples);
     }
-  }
  
   switch (composite_mode)
   {
@@ -220,18 +218,17 @@ gimp_composite_blend (gfloat                *in,
  
           if (comp_alpha == 0.0f)
             {
-              out[RED]   = in[RED];
-              out[GREEN] = in[GREEN];
-              out[BLUE]  = in[BLUE];
+              out[RED]   = blend_in[RED];
+              out[GREEN] = blend_in[GREEN];
+              out[BLUE]  = blend_in[BLUE];
             }
             else
             {
               gint   b;
               for (b = RED; b < ALPHA; b++)
-                out[b] = blend_out[b] * comp_alpha + in[b] * (1.0f - comp_alpha);
+                out[b] = blend_out[b] * comp_alpha + blend_in[b] * (1.0f - comp_alpha);
             }
- 
-          out[ALPHA] = in[ALPHA];
+          out[ALPHA] = blend_in[ALPHA];
  
           in          += 4;
           out         += 4;
@@ -249,38 +246,41 @@ gimp_composite_blend (gfloat                *in,
           if (mask)
             comp_alpha *= *mask;
  
-          new_alpha = comp_alpha + (1.0f - comp_alpha) * in[ALPHA];
+          new_alpha = comp_alpha + (1.0f - comp_alpha) * blend_in[ALPHA];
  
           if (comp_alpha == 0.0f || new_alpha == 0.0f)
             {
-              out[RED]   = in[RED];
-              out[GREEN] = in[GREEN];
-              out[BLUE]  = in[BLUE];
+              out[RED]   = blend_in[RED];
+              out[GREEN] = blend_in[GREEN];
+              out[BLUE]  = blend_in[BLUE];
             }
             else
             {
               gint   b;
-              gfloat ratio = comp_alpha / new_alpha;
- 
+              //gfloat ratio = comp_alpha / new_alpha;
               for (b = RED; b < ALPHA; b++)
-                out[b] = ratio * (in[ALPHA] * (blend_out[b] - layer[b]) + layer[b] - in[b]) + in[b];
+                //out[b] = ratio * (in[ALPHA] * (blend_out[b] - layer[b]) + layer[b] - in[b]) + in[b];
+                out[b] = blend_out[b] * comp_alpha + blend_in[b] * (1.0f - comp_alpha);
             }
  
           out[ALPHA] = new_alpha;
  
-          in          += 4;
-          layer       += 4;
-          out         += 4;
+          blend_in    += 4;
           blend_out   += 4;
+          out         += 4;
  
           if (mask)
             mask++;
         }
       break;
     case GIMP_LAYER_COMPOSITE_DST_ATOP:
+
+      if (fish_to_composite)
+        babl_process (fish_to_composite, blend_layer, blend_layer,  samples);
+
       while (samples--)
         {
-          gfloat comp_alpha = in[ALPHA];
+          gfloat comp_alpha = blend_in[ALPHA];
  
           out[ALPHA] = blend_out[ALPHA] * opacity;
           if (mask)
@@ -288,19 +288,18 @@ gimp_composite_blend (gfloat                *in,
  
           if (comp_alpha == 0.0f)
             {
-              out[RED]   = layer[RED];
-              out[GREEN] = layer[GREEN];
-              out[BLUE]  = layer[BLUE];
+              out[RED]   = blend_layer[RED];
+              out[GREEN] = blend_layer[GREEN];
+              out[BLUE]  = blend_layer[BLUE];
             }
             else
             {
               gint   b;
               for (b = RED; b < ALPHA; b++)
-                out[b] = layer[b] * (1.0f -comp_alpha) + blend_out[b] * (comp_alpha);
+                out[b] = blend_layer[b] * (1.0f -comp_alpha) + blend_out[b] * (comp_alpha);
             }
- 
-          in          += 4;
-          layer       += 4;
+          blend_in    += 4;
+          blend_layer += 4;
           out         += 4;
           blend_out   += 4;
  
@@ -311,15 +310,15 @@ gimp_composite_blend (gfloat                *in,
     case GIMP_LAYER_COMPOSITE_SRC_IN:
       while (samples--)
         {
-          gfloat new_alpha = in[ALPHA] * blend_out[ALPHA] * opacity;
+          gfloat new_alpha = blend_in[ALPHA] * blend_out[ALPHA] * opacity;
           if (mask)
             new_alpha *= *mask;
  
           if (new_alpha == 0.0f)
             {
-              out[RED]   = in[RED];
-              out[GREEN] = in[GREEN];
-              out[BLUE]  = in[BLUE];
+              out[RED]   = blend_in[RED];
+              out[GREEN] = blend_in[GREEN];
+              out[BLUE]  = blend_in[BLUE];
             }
           else
             {
@@ -328,8 +327,7 @@ gimp_composite_blend (gfloat                *in,
               out[BLUE]  = blend_out[BLUE];
             }
           out[ALPHA] = new_alpha;
-          in          += 4;
-          out         += 4;
+          blend_in    += 4;
           blend_out   += 4;
  
           if (mask)
@@ -340,9 +338,8 @@ gimp_composite_blend (gfloat                *in,
 
   if (fish_from_composite)
   {
-    samples = samples_backup;
-    out -= 4 * samples;
-    babl_process (fish_from_composite, out, out, samples);
+    out -= 4 * samples_backup;
+    babl_process (fish_from_composite, out, out, samples_backup);
   }
 }
  
diff --git a/app/operations/layer-modes/gimpoperationscreen.h 
b/app/operations/layer-modes/gimpoperationscreen.h
index 2bcb964..2de2110 100644
--- a/app/operations/layer-modes/gimpoperationscreen.h
+++ b/app/operations/layer-modes/gimpoperationscreen.h
@@ -49,16 +49,16 @@ struct _GimpOperationScreenClass
 
 GType    gimp_operation_screen_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_screen_process_pixels (gfloat              *in,
-                                               gfloat              *layer,
-                                               gfloat              *mask,
-                                               gfloat              *out,
-                                               gfloat               opacity,
-                                               glong                samples,
-                                               const GeglRectangle *roi,
-                                               gint                 level,
-                                               GimpLayerBlendTRC    blend_trc, 
-                                               GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_screen_process_pixels (gfloat                *in,
+                                               gfloat                *layer,
+                                               gfloat                *mask,
+                                               gfloat                *out,
+                                               gfloat                 opacity,
+                                               glong                  samples,
+                                               const GeglRectangle   *roi,
+                                               gint                   level,
+                                               GimpLayerBlendTRC      blend_trc, 
+                                               GimpLayerBlendTRC      composite_trc,
                                                GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/operations/layer-modes/gimpoperationsoftlight.c 
b/app/operations/layer-modes/gimpoperationsoftlight.c
index 09f3085..d35fa8c 100644
--- a/app/operations/layer-modes/gimpoperationsoftlight.c
+++ b/app/operations/layer-modes/gimpoperationsoftlight.c
@@ -29,13 +29,13 @@
 
 
 static gboolean gimp_operation_softlight_process (GeglOperation       *operation,
-                                                       void                *in_buf,
-                                                       void                *aux_buf,
-                                                       void                *aux2_buf,
-                                                       void                *out_buf,
-                                                       glong                samples,
-                                                       const GeglRectangle *roi,
-                                                       gint                 level);
+                                                  void                *in_buf,
+                                                  void                *aux_buf,
+                                                  void                *aux2_buf,
+                                                  void                *out_buf,
+                                                  glong                samples,
+                                                  const GeglRectangle *roi,
+                                                  gint                 level);
 
 
 G_DEFINE_TYPE (GimpOperationSoftlight, gimp_operation_softlight,
diff --git a/app/operations/layer-modes/gimpoperationsoftlight.h 
b/app/operations/layer-modes/gimpoperationsoftlight.h
index 52162e7..cb0e085 100644
--- a/app/operations/layer-modes/gimpoperationsoftlight.h
+++ b/app/operations/layer-modes/gimpoperationsoftlight.h
@@ -49,16 +49,16 @@ struct _GimpOperationSoftlightClass
 
 GType    gimp_operation_softlight_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_softlight_process_pixels (gfloat              *in,
-                                                  gfloat              *layer,
-                                                  gfloat              *mask,
-                                                  gfloat              *out,
-                                                  gfloat               opacity,
-                                                  glong                samples,
-                                                  const GeglRectangle *roi,
-                                                  gint                 level,
-                                                  GimpLayerBlendTRC    blend_trc, 
-                                                  GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_softlight_process_pixels (gfloat                *in,
+                                                  gfloat                *layer,
+                                                  gfloat                *mask,
+                                                  gfloat                *out,
+                                                  gfloat                 opacity,
+                                                  glong                  samples,
+                                                  const GeglRectangle   *roi,
+                                                  gint                   level,
+                                                  GimpLayerBlendTRC      blend_trc, 
+                                                  GimpLayerBlendTRC      composite_trc,
                                                   GimpLayerCompositeMode composite_mode);
 
 #endif /* __GIMP_OPERATION_SOFTLIGHT_H__ */
diff --git a/app/operations/layer-modes/gimpoperationsubtract.h 
b/app/operations/layer-modes/gimpoperationsubtract.h
index 11ae47a..bb9c49b 100644
--- a/app/operations/layer-modes/gimpoperationsubtract.h
+++ b/app/operations/layer-modes/gimpoperationsubtract.h
@@ -50,16 +50,16 @@ struct _GimpOperationSubtractClass
 
 GType    gimp_operation_subtract_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_subtract_process_pixels (gfloat              *in,
-                                                 gfloat              *layer,
-                                                 gfloat              *mask,
-                                                 gfloat              *out,
-                                                 gfloat               opacity,
-                                                 glong                samples,
-                                                 const GeglRectangle *roi,
-                                                 gint                 level,
-                                                 GimpLayerBlendTRC    blend_trc, 
-                                                 GimpLayerBlendTRC    composite_trc,
+gboolean gimp_operation_subtract_process_pixels (gfloat                *in,
+                                                 gfloat                *layer,
+                                                 gfloat                *mask,
+                                                 gfloat                *out,
+                                                 gfloat                 opacity,
+                                                 glong                  samples,
+                                                 const GeglRectangle   *roi,
+                                                 gint                   level,
+                                                 GimpLayerBlendTRC      blend_trc, 
+                                                 GimpLayerBlendTRC      composite_trc,
                                                  GimpLayerCompositeMode composite_mode);
 
 
diff --git a/app/paint/gimppaintcore-loops.c b/app/paint/gimppaintcore-loops.c
index 79028b6..fe07232 100644
--- a/app/paint/gimppaintcore-loops.c
+++ b/app/paint/gimppaintcore-loops.c
@@ -299,6 +299,7 @@ do_layer_blend (GeglBuffer    *src_buffer,
 {
   GimpLayerBlendTRC   blend_trc = GIMP_LAYER_BLEND_RGB_PERCEPTUAL;//XXX
   GimpLayerBlendTRC   composite_trc = GIMP_LAYER_BLEND_RGB_LINEAR;//placeholders
+  GimpLayerCompositeMode composite_mode = GIMP_LAYER_COMPOSITE_SRC_OVER;//placeholders
   GeglRectangle       roi;
   GeglRectangle       mask_roi;
   GeglRectangle       process_roi;
@@ -370,7 +371,8 @@ do_layer_blend (GeglBuffer    *src_buffer,
                          &process_roi,
                          0,
                          blend_trc,
-                         composite_trc);
+                         composite_trc,
+                         composite_mode);
 
           in_pixel    += iter->roi[0].width * 4;
           out_pixel   += iter->roi[0].width * 4;


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