[gimp/pippin/linear-is-the-new-black: 3/17] app: add blend-, composite_trc and composite_mode arguments



commit d67b4c4e5b59f0a5d6359b7ed607efbb44c15fec
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue Jan 17 16:18:07 2017 +0100

    app: add blend-, composite_trc and composite_mode arguments
    
    Propagate the configure blending spaces and compositing space configured in the
    layer-mode instance.

 .../gimpoperationadditionlegacy.c                  |   23 +++++----
 .../gimpoperationadditionlegacy.h                  |    5 ++-
 .../layer-modes-legacy/gimpoperationburnlegacy.c   |   23 +++++----
 .../layer-modes-legacy/gimpoperationburnlegacy.h   |    5 ++-
 .../gimpoperationdarkenonlylegacy.c                |   21 ++++---
 .../gimpoperationdarkenonlylegacy.h                |    5 ++-
 .../gimpoperationdifferencelegacy.c                |   23 +++++----
 .../gimpoperationdifferencelegacy.h                |    5 ++-
 .../layer-modes-legacy/gimpoperationdividelegacy.c |   23 +++++----
 .../layer-modes-legacy/gimpoperationdividelegacy.h |    5 ++-
 .../layer-modes-legacy/gimpoperationdodgelegacy.c  |   23 +++++----
 .../layer-modes-legacy/gimpoperationdodgelegacy.h  |    5 ++-
 .../gimpoperationgrainextractlegacy.c              |   23 +++++----
 .../gimpoperationgrainextractlegacy.h              |    5 ++-
 .../gimpoperationgrainmergelegacy.c                |   23 +++++----
 .../gimpoperationgrainmergelegacy.h                |    5 ++-
 .../gimpoperationhardlightlegacy.c                 |   23 +++++----
 .../gimpoperationhardlightlegacy.h                 |    5 ++-
 .../gimpoperationhsvcolorlegacy.c                  |   23 +++++----
 .../gimpoperationhsvcolorlegacy.h                  |    5 ++-
 .../layer-modes-legacy/gimpoperationhsvhuelegacy.c |   23 +++++----
 .../layer-modes-legacy/gimpoperationhsvhuelegacy.h |    6 ++-
 .../gimpoperationhsvsaturationlegacy.c             |   23 +++++----
 .../gimpoperationhsvsaturationlegacy.h             |    5 ++-
 .../gimpoperationhsvvaluelegacy.c                  |   23 +++++----
 .../gimpoperationhsvvaluelegacy.h                  |    5 ++-
 .../gimpoperationlightenonlylegacy.c               |   23 +++++----
 .../gimpoperationlightenonlylegacy.h               |    5 ++-
 .../gimpoperationmultiplylegacy.c                  |   23 +++++----
 .../gimpoperationmultiplylegacy.h                  |    6 ++-
 .../layer-modes-legacy/gimpoperationscreenlegacy.c |   21 ++++---
 .../layer-modes-legacy/gimpoperationscreenlegacy.h |    5 ++-
 .../gimpoperationsoftlightlegacy.c                 |   22 ++++----
 .../gimpoperationsoftlightlegacy.h                 |    5 ++-
 .../gimpoperationsubtractlegacy.c                  |   23 +++++----
 .../gimpoperationsubtractlegacy.h                  |    5 ++-
 app/operations/layer-modes/gimpoperationaddition.c |   35 ++++++------
 app/operations/layer-modes/gimpoperationaddition.h |   19 ++++---
 .../layer-modes/gimpoperationantierase.c           |   23 +++++----
 .../layer-modes/gimpoperationantierase.h           |   19 ++++---
 app/operations/layer-modes/gimpoperationbehind.c   |   23 +++++----
 app/operations/layer-modes/gimpoperationbehind.h   |   19 ++++---
 app/operations/layer-modes/gimpoperationburn.c     |   34 ++++++------
 app/operations/layer-modes/gimpoperationburn.h     |   19 ++++---
 .../layer-modes/gimpoperationcolorerase.c          |   23 +++++----
 .../layer-modes/gimpoperationcolorerase.h          |    5 ++-
 .../layer-modes/gimpoperationdarkenonly.c          |   32 +++++------
 .../layer-modes/gimpoperationdarkenonly.h          |    5 ++-
 .../layer-modes/gimpoperationdifference.c          |   32 +++++------
 .../layer-modes/gimpoperationdifference.h          |    5 ++-
 app/operations/layer-modes/gimpoperationdissolve.c |   23 +++++----
 app/operations/layer-modes/gimpoperationdissolve.h |    5 ++-
 app/operations/layer-modes/gimpoperationdivide.c   |   32 +++++------
 app/operations/layer-modes/gimpoperationdivide.h   |    5 ++-
 app/operations/layer-modes/gimpoperationdodge.c    |   32 +++++------
 app/operations/layer-modes/gimpoperationdodge.h    |    5 ++-
 app/operations/layer-modes/gimpoperationerase.c    |   23 +++++----
 app/operations/layer-modes/gimpoperationerase.h    |    5 ++-
 .../layer-modes/gimpoperationgrainextract.c        |   33 +++++------
 .../layer-modes/gimpoperationgrainextract.h        |    5 ++-
 .../layer-modes/gimpoperationgrainmerge.c          |   33 +++++------
 .../layer-modes/gimpoperationgrainmerge.h          |    5 ++-
 .../layer-modes/gimpoperationhardlight.c           |   32 +++++------
 .../layer-modes/gimpoperationhardlight.h           |    5 ++-
 app/operations/layer-modes/gimpoperationhsvcolor.c |   32 +++++------
 app/operations/layer-modes/gimpoperationhsvcolor.h |    5 ++-
 app/operations/layer-modes/gimpoperationhsvhue.c   |   18 +++----
 app/operations/layer-modes/gimpoperationhsvhue.h   |    5 ++-
 .../layer-modes/gimpoperationhsvsaturation.c       |   33 +++++------
 .../layer-modes/gimpoperationhsvsaturation.h       |    5 ++-
 app/operations/layer-modes/gimpoperationhsvvalue.c |   33 +++++------
 app/operations/layer-modes/gimpoperationhsvvalue.h |    5 ++-
 .../layer-modes/gimpoperationlchchroma.c           |   49 +++++++++--------
 .../layer-modes/gimpoperationlchchroma.h           |   10 +++-
 app/operations/layer-modes/gimpoperationlchcolor.c |   53 +++++++++---------
 app/operations/layer-modes/gimpoperationlchcolor.h |   10 +++-
 app/operations/layer-modes/gimpoperationlchhue.c   |   55 +++++++++----------
 app/operations/layer-modes/gimpoperationlchhue.h   |   11 +++-
 .../layer-modes/gimpoperationlchlightness.c        |   57 +++++++++----------
 .../layer-modes/gimpoperationlchlightness.h        |   10 +++-
 .../layer-modes/gimpoperationlightenonly.c         |   32 +++++------
 .../layer-modes/gimpoperationlightenonly.h         |    5 ++-
 app/operations/layer-modes/gimpoperationmultiply.c |   32 +++++------
 app/operations/layer-modes/gimpoperationmultiply.h |    5 ++-
 .../layer-modes/gimpoperationnormal-sse2.c         |   23 +++++---
 .../layer-modes/gimpoperationnormal-sse4.c         |   23 +++++---
 app/operations/layer-modes/gimpoperationnormal.c   |   24 +++++----
 app/operations/layer-modes/gimpoperationnormal.h   |   15 ++++-
 app/operations/layer-modes/gimpoperationoverlay.c  |   32 +++++------
 app/operations/layer-modes/gimpoperationoverlay.h  |    5 ++-
 .../layer-modes/gimpoperationpointlayermode.h      |   18 +++---
 app/operations/layer-modes/gimpoperationreplace.c  |   23 +++++----
 app/operations/layer-modes/gimpoperationreplace.h  |   19 ++++---
 app/operations/layer-modes/gimpoperationscreen.c   |   32 +++++------
 app/operations/layer-modes/gimpoperationscreen.h   |    5 ++-
 .../layer-modes/gimpoperationsoftlight.c           |   33 +++++------
 .../layer-modes/gimpoperationsoftlight.h           |    6 ++-
 app/operations/layer-modes/gimpoperationsubtract.c |   32 +++++------
 app/operations/layer-modes/gimpoperationsubtract.h |    5 ++-
 app/operations/operations-types.h                  |   19 ++++---
 app/paint/gimppaintcore-loops.c                    |    6 ++-
 101 files changed, 1014 insertions(+), 808 deletions(-)
---
diff --git a/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.c
index 0fcb0a7..ebb7e76 100644
--- a/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.c
@@ -74,20 +74,23 @@ gimp_operation_addition_legacy_process (GeglOperation       *operation,
                                       const GeglRectangle *roi,
                                       gint                 level)
 {
-  gfloat opacity  = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_addition_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, 
samples, roi, level);
+  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
-gimp_operation_addition_legacy_process_pixels (gfloat              *in,
-                                               gfloat              *layer,
-                                               gfloat              *mask,
-                                               gfloat              *out,
-                                               gfloat               opacity,
-                                               glong                samples,
-                                               const GeglRectangle *roi,
-                                               gint                 level)
+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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.h
index c070005..eb8e32a 100644
--- a/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_addition_legacy_process_pixels (gfloat              *in,
                                                         gfloat               opacity,
                                                         glong                samples,
                                                         const GeglRectangle *roi,
-                                                        gint                 level);
+                                                        gint                 level,
+                                                        GimpLayerBlendTRC    blend_trc, 
+                                                        GimpLayerBlendTRC    composite_trc,
+                                                        GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_ADDITION_LEGACY_H__ */
diff --git a/app/operations/layer-modes-legacy/gimpoperationburnlegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationburnlegacy.c
index d5dc65f..1ed5d50 100644
--- a/app/operations/layer-modes-legacy/gimpoperationburnlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationburnlegacy.c
@@ -74,20 +74,23 @@ gimp_operation_burn_legacy_process (GeglOperation       *operation,
                                     const GeglRectangle *roi,
                                     gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_burn_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, 
roi, level);
+  return gimp_operation_burn_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
-gimp_operation_burn_legacy_process_pixels (gfloat              *in,
-                                           gfloat              *layer,
-                                           gfloat              *mask,
-                                           gfloat              *out,
-                                           gfloat               opacity,
-                                           glong                samples,
-                                           const GeglRectangle *roi,
-                                           gint                 level)
+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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationburnlegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationburnlegacy.h
index d967f40..3f253f9 100644
--- a/app/operations/layer-modes-legacy/gimpoperationburnlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationburnlegacy.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_burn_legacy_process_pixels (gfloat              *in,
                                                     gfloat               opacity,
                                                     glong                samples,
                                                     const GeglRectangle *roi,
-                                                    gint                 level);
+                                                    gint                 level,
+                                                    GimpLayerBlendTRC    blend_trc, 
+                                                    GimpLayerBlendTRC    composite_trc,
+                                                    GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_BURN_LEGACY_H__ */
diff --git a/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.c
index bd56644..764b039 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.c
@@ -74,20 +74,23 @@ gimp_operation_darken_only_legacy_process (GeglOperation       *operation,
                                            const GeglRectangle *roi,
                                            gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_darken_only_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, 
samples, roi, level);
+  return gimp_operation_darken_only_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
 gimp_operation_darken_only_legacy_process_pixels (gfloat              *in,
-                                                gfloat              *layer,
-                                                gfloat              *mask,
-                                                gfloat              *out,
-                                                gfloat               opacity,
-                                                glong                samples,
-                                                const GeglRectangle *roi,
-                                                gint                 level)
+                                                gfloat                *layer,
+                                                gfloat                *mask,
+                                                gfloat                *out,
+                                                gfloat                 opacity,
+                                                glong                  samples,
+                                                const GeglRectangle   *roi,
+                                                gint                   level,
+                                                GimpLayerBlendTRC      blend_trc,
+                                                GimpLayerBlendTRC      composite_trc,
+                                                GimpLayerCompositeMode composite_mode)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.h
index 331e84f..502178d 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_darken_only_legacy_process_pixels (gfloat              *
                                                            gfloat               opacity,
                                                            glong                samples,
                                                            const GeglRectangle *roi,
-                                                           gint                 level);
+                                                           gint                 level,
+                                                           GimpLayerBlendTRC    blend_trc, 
+                                                           GimpLayerBlendTRC    composite_trc,
+                                                           GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_DARKEN_ONLY_LEGACY_H__ */
diff --git a/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.c
index 0fcb6d0..36143fa 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.c
@@ -74,20 +74,23 @@ gimp_operation_difference_legacy_process (GeglOperation       *operation,
                                           const GeglRectangle *roi,
                                           gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_difference_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, 
samples, roi, level);
+  return gimp_operation_difference_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
-gimp_operation_difference_legacy_process_pixels (gfloat              *in,
-                                                 gfloat              *layer,
-                                                 gfloat              *mask,
-                                                 gfloat              *out,
-                                                 gfloat               opacity,
-                                                 glong                samples,
-                                                 const GeglRectangle *roi,
-                                                 gint                 level)
+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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.h
index 50e1434..322eed0 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_difference_legacy_process_pixels (gfloat              *i
                                                           gfloat               opacity,
                                                           glong                samples,
                                                           const GeglRectangle *roi,
-                                                          gint                 level);
+                                                          gint                 level,
+                                                          GimpLayerBlendTRC    blend_trc, 
+                                                          GimpLayerBlendTRC    composite_trc,
+                                                          GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_DIFFERENCE_LEGACY_H__ */
diff --git a/app/operations/layer-modes-legacy/gimpoperationdividelegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationdividelegacy.c
index 50bfac7..e82a901 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdividelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationdividelegacy.c
@@ -74,20 +74,23 @@ gimp_operation_divide_legacy_process (GeglOperation       *operation,
                                       const GeglRectangle *roi,
                                       gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_divide_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, 
roi, level);
+  return gimp_operation_divide_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
-gimp_operation_divide_legacy_process_pixels (gfloat              *in,
-                                             gfloat              *layer,
-                                             gfloat              *mask,
-                                             gfloat              *out,
-                                             gfloat               opacity,
-                                             glong                samples,
-                                             const GeglRectangle *roi,
-                                             gint                 level)
+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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationdividelegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationdividelegacy.h
index 5b6a6c2..a6d88d3 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdividelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationdividelegacy.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_divide_legacy_process_pixels (gfloat              *in,
                                                       gfloat               opacity,
                                                       glong                samples,
                                                       const GeglRectangle *roi,
-                                                      gint                 level);
+                                                      gint                 level,
+                                                      GimpLayerBlendTRC    blend_trc, 
+                                                      GimpLayerBlendTRC    composite_trc,
+                                                      GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_DIVIDE_LEGACY_H__ */
diff --git a/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.c
index 966aabf..024ecb6 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.c
@@ -74,20 +74,23 @@ gimp_operation_dodge_legacy_process (GeglOperation       *operation,
                                      const GeglRectangle *roi,
                                      gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_dodge_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, 
roi, level);
+  return gimp_operation_dodge_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
-gimp_operation_dodge_legacy_process_pixels (gfloat              *in,
-                                            gfloat              *layer,
-                                            gfloat              *mask,
-                                            gfloat              *out,
-                                            gfloat               opacity,
-                                            glong                samples,
-                                            const GeglRectangle *roi,
-                                            gint                 level)
+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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.h
index 73d09f4..7f9d126 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_dodge_legacy_process_pixels (gfloat              *in,
                                                      gfloat               opacity,
                                                      glong                samples,
                                                      const GeglRectangle *roi,
-                                                     gint                 level);
+                                                     gint                 level,
+                                                     GimpLayerBlendTRC    blend_trc, 
+                                                     GimpLayerBlendTRC    composite_trc,
+                                                     GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_DODGE_LEGACY_H__ */
diff --git a/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.c
index 1ee14de..47c379d 100644
--- a/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.c
@@ -74,20 +74,23 @@ gimp_operation_grain_extract_legacy_process (GeglOperation       *operation,
                                              const GeglRectangle *roi,
                                              gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_grain_extract_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, 
samples, roi, level);
+  return gimp_operation_grain_extract_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
-gimp_operation_grain_extract_legacy_process_pixels (gfloat              *in,
-                                                    gfloat              *layer,
-                                                    gfloat              *mask,
-                                                    gfloat              *out,
-                                                    gfloat               opacity,
-                                                    glong                samples,
-                                                    const GeglRectangle *roi,
-                                                    gint                 level)
+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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.h
index 28306e5..28e9cb1 100644
--- a/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_grain_extract_legacy_process_pixels (gfloat
                                                              gfloat               opacity,
                                                              glong                samples,
                                                              const GeglRectangle *roi,
-                                                             gint                 level);
+                                                             gint                 level,
+                                                             GimpLayerBlendTRC    blend_trc, 
+                                                             GimpLayerBlendTRC    composite_trc,
+                                                             GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_GRAIN_EXTRACT_LEGACY_H__ */
diff --git a/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.c
index 9ee1690..d296611 100644
--- a/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.c
@@ -74,20 +74,23 @@ gimp_operation_grain_merge_legacy_process (GeglOperation       *operation,
                                            const GeglRectangle *roi,
                                            gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_grain_merge_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, 
samples, roi, level);
+  return gimp_operation_grain_merge_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
-gimp_operation_grain_merge_legacy_process_pixels (gfloat              *in,
-                                                  gfloat              *layer,
-                                                  gfloat              *mask,
-                                                  gfloat              *out,
-                                                  gfloat               opacity,
-                                                  glong                samples,
-                                                  const GeglRectangle *roi,
-                                                  gint                 level)
+gimp_operation_grain_merge_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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.h
index 789098a..4f4db94 100644
--- a/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_grain_merge_legacy_process_pixels (gfloat              *
                                                            gfloat               opacity,
                                                            glong                samples,
                                                            const GeglRectangle *roi,
-                                                           gint                 level);
+                                                           gint                 level,
+                                                           GimpLayerBlendTRC    blend_trc, 
+                                                           GimpLayerBlendTRC    composite_trc,
+                                                           GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_GRAIN_MERGE_LEGACY_H__ */
diff --git a/app/operations/layer-modes-legacy/gimpoperationhardlightlegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationhardlightlegacy.c
index 826bca6..6b7dc4c 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhardlightlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationhardlightlegacy.c
@@ -74,20 +74,23 @@ gimp_operation_hardlight_legacy_process (GeglOperation       *operation,
                                          const GeglRectangle *roi,
                                          gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_hardlight_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, 
samples, roi, level);
+  return gimp_operation_hardlight_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
-gimp_operation_hardlight_legacy_process_pixels (gfloat              *in,
-                                                gfloat              *layer,
-                                                gfloat              *mask,
-                                                gfloat              *out,
-                                                gfloat               opacity,
-                                                glong                samples,
-                                                const GeglRectangle *roi,
-                                                gint                 level)
+gimp_operation_hardlight_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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationhardlightlegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationhardlightlegacy.h
index bbc4894..a704750 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhardlightlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationhardlightlegacy.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_hardlight_legacy_process_pixels (gfloat              *in
                                                          gfloat               opacity,
                                                          glong                samples,
                                                          const GeglRectangle *roi,
-                                                         gint                 level);
+                                                         gint                 level,
+                                                         GimpLayerBlendTRC    blend_trc, 
+                                                         GimpLayerBlendTRC    composite_trc,
+                                                         GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_HARDLIGHT_LEGACY_H__ */
diff --git a/app/operations/layer-modes-legacy/gimpoperationhsvcolorlegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationhsvcolorlegacy.c
index 43e2ec4..b653132 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvcolorlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvcolorlegacy.c
@@ -78,20 +78,23 @@ gimp_operation_hsv_color_legacy_process (GeglOperation       *operation,
                                          const GeglRectangle *roi,
                                          gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_hsv_color_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, 
samples, roi, level);
+  return gimp_operation_hsv_color_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
-gimp_operation_hsv_color_legacy_process_pixels (gfloat              *in,
-                                                gfloat              *layer,
-                                                gfloat              *mask,
-                                                gfloat              *out,
-                                                gfloat               opacity,
-                                                glong                samples,
-                                                const GeglRectangle *roi,
-                                                gint                 level)
+gimp_operation_hsv_color_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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationhsvcolorlegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationhsvcolorlegacy.h
index 67edae4..268654c 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvcolorlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvcolorlegacy.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_hsv_color_legacy_process_pixels (gfloat              *in
                                                          gfloat               opacity,
                                                          glong                samples,
                                                          const GeglRectangle *roi,
-                                                         gint                 level);
+                                                         gint                 level,
+                                                         GimpLayerBlendTRC    blend_trc, 
+                                                         GimpLayerBlendTRC    composite_trc,
+                                                         GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_HSV_COLOR_LEGACY_H__ */
diff --git a/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.c
index b7c2897..5cd4cbd 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.c
@@ -78,20 +78,23 @@ gimp_operation_hsv_hue_legacy_process (GeglOperation       *operation,
                                        const GeglRectangle *roi,
                                        gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_hsv_hue_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, 
roi, level);
+  return gimp_operation_hsv_hue_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
-gimp_operation_hsv_hue_legacy_process_pixels (gfloat              *in,
-                                              gfloat              *layer,
-                                              gfloat              *mask,
-                                              gfloat              *out,
-                                              gfloat               opacity,
-                                              glong                samples,
-                                              const GeglRectangle *roi,
-                                              gint                 level)
+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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.h
index 3316c15..2b28563 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.h
@@ -56,7 +56,11 @@ gboolean gimp_operation_hsv_hue_legacy_process_pixels (gfloat              *in,
                                                        gfloat               opacity,
                                                        glong                samples,
                                                        const GeglRectangle *roi,
-                                                       gint                 level);
+                                                       gint                 level,
+                                                       GimpLayerBlendTRC    blend_trc, 
+                                                       GimpLayerBlendTRC    composite_trc,
+                                                       GimpLayerCompositeMode composite_mode);
+
 
 
 #endif /* __GIMP_OPERATION_HSV_HUE_LEGACY_H__ */
diff --git a/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.c
index 5be8b2a..42ebe11 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.c
@@ -78,20 +78,23 @@ gimp_operation_hsv_saturation_legacy_process (GeglOperation       *operation,
                                               const GeglRectangle *roi,
                                               gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_hsv_saturation_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, 
samples, roi, level);
+  return gimp_operation_hsv_saturation_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
-gimp_operation_hsv_saturation_legacy_process_pixels (gfloat              *in,
-                                                     gfloat              *layer,
-                                                     gfloat              *mask,
-                                                     gfloat              *out,
-                                                     gfloat               opacity,
-                                                     glong                samples,
-                                                     const GeglRectangle *roi,
-                                                     gint                 level)
+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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.h
index acfc343..0d913f9 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_hsv_saturation_legacy_process_pixels (gfloat
                                                               gfloat               opacity,
                                                               glong                samples,
                                                               const GeglRectangle *roi,
-                                                              gint                 level);
+                                                              gint                 level,
+                                                              GimpLayerBlendTRC    blend_trc, 
+                                                              GimpLayerBlendTRC    composite_trc,
+                                                              GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_HSV_SATURATION_LEGACY_H__ */
diff --git a/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.c
index c75681d..6424b11 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.c
@@ -78,20 +78,23 @@ gimp_operation_hsv_value_legacy_process (GeglOperation       *operation,
                                          const GeglRectangle *roi,
                                          gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_hsv_value_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, 
samples, roi, level);
+  return gimp_operation_hsv_value_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
-gimp_operation_hsv_value_legacy_process_pixels (gfloat              *in,
-                                                gfloat              *layer,
-                                                gfloat              *mask,
-                                                gfloat              *out,
-                                                gfloat               opacity,
-                                                glong                samples,
-                                                const GeglRectangle *roi,
-                                                gint                 level)
+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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.h
index 8d88a9c..9d2794a 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_hsv_value_legacy_process_pixels (gfloat              *in
                                                          gfloat               opacity,
                                                          glong                samples,
                                                          const GeglRectangle *roi,
-                                                         gint                 level);
+                                                         gint                 level,
+                                                         GimpLayerBlendTRC    blend_trc, 
+                                                         GimpLayerBlendTRC    composite_trc,
+                                                         GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_HSV_VALUE_LEGACY_H__ */
diff --git a/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.c
index b84814c..628c924 100644
--- a/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.c
@@ -74,20 +74,23 @@ gimp_operation_lighten_only_legacy_process (GeglOperation       *operation,
                                             const GeglRectangle *roi,
                                             gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_lighten_only_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, 
samples, roi, level);
+  return gimp_operation_lighten_only_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
-gimp_operation_lighten_only_legacy_process_pixels (gfloat              *in,
-                                                   gfloat              *layer,
-                                                   gfloat              *mask,
-                                                   gfloat              *out,
-                                                   gfloat               opacity,
-                                                   glong                samples,
-                                                   const GeglRectangle *roi,
-                                                   gint                 level)
+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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.h
index 4d93515..fa57ce0 100644
--- a/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_lighten_only_legacy_process_pixels (gfloat
                                                             gfloat               opacity,
                                                             glong                samples,
                                                             const GeglRectangle *roi,
-                                                            gint                 level);
+                                                            gint                 level,
+                                                            GimpLayerBlendTRC    blend_trc, 
+                                                            GimpLayerBlendTRC    composite_trc,
+                                                            GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_LIGHTEN_ONLY_LEGACY_H__ */
diff --git a/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.c
index 280c844..bdfed8b 100644
--- a/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.c
@@ -74,20 +74,23 @@ gimp_operation_multiply_legacy_process (GeglOperation       *operation,
                                         const GeglRectangle *roi,
                                         gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_multiply_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, 
samples, roi, level);
+  return gimp_operation_multiply_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
-gimp_operation_multiply_legacy_process_pixels (gfloat              *in,
-                                               gfloat              *layer,
-                                               gfloat              *mask,
-                                               gfloat              *out,
-                                               gfloat               opacity,
-                                               glong                samples,
-                                               const GeglRectangle *roi,
-                                               gint                 level)
+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)
 {
   const gboolean  has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.h
index 20b8c83..26e20f7 100644
--- a/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.h
@@ -56,7 +56,9 @@ gboolean gimp_operation_multiply_legacy_process_pixels (gfloat              *in,
                                                         gfloat               opacity,
                                                         glong                samples,
                                                         const GeglRectangle *roi,
-                                                        gint                 level);
-
+                                                        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.c 
b/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.c
index b7ab4f4..9023c9a 100644
--- a/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.c
@@ -74,20 +74,23 @@ gimp_operation_screen_legacy_process (GeglOperation       *operation,
                                       const GeglRectangle *roi,
                                       gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_screen_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, 
roi, level);
+  return gimp_operation_screen_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
 gimp_operation_screen_legacy_process_pixels (gfloat              *in,
-                                           gfloat              *layer,
-                                           gfloat              *mask,
-                                           gfloat              *out,
-                                           gfloat               opacity,
-                                           glong                samples,
-                                           const GeglRectangle *roi,
-                                           gint                 level)
+                                           gfloat                *layer,
+                                           gfloat                *mask,
+                                           gfloat                *out,
+                                           gfloat                 opacity,
+                                           glong                  samples,
+                                           const GeglRectangle   *roi,
+                                           gint                   level,
+                                           GimpLayerBlendTRC      blend_trc,
+                                           GimpLayerBlendTRC      composite_trc,
+                                           GimpLayerCompositeMode composite_mode)
 {
   const gboolean  has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.h
index 6d80e0d..cc1e4cd 100644
--- a/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_screen_legacy_process_pixels (gfloat              *in,
                                                       gfloat               opacity,
                                                       glong                samples,
                                                       const GeglRectangle *roi,
-                                                      gint                 level);
+                                                      gint                 level,
+                                                      GimpLayerBlendTRC    blend_trc, 
+                                                      GimpLayerBlendTRC    composite_trc,
+                                                      GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_SCREEN_LEGACY_H__ */
diff --git a/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.c
index ee1e4ed..c9950a4 100644
--- a/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.c
@@ -92,20 +92,22 @@ gimp_operation_softlight_legacy_process (GeglOperation       *operation,
                                        const GeglRectangle *roi,
                                        gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
-
-  return gimp_operation_softlight_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, 
samples, roi, level);
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
+  return gimp_operation_softlight_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
 gimp_operation_softlight_legacy_process_pixels (gfloat              *in,
-                                              gfloat              *layer,
-                                              gfloat              *mask,
-                                              gfloat              *out,
-                                              gfloat               opacity,
-                                              glong                samples,
-                                              const GeglRectangle *roi,
-                                              gint                 level)
+                                                gfloat                *layer,
+                                                gfloat                *mask,
+                                                gfloat                *out,
+                                                gfloat                 opacity,
+                                                glong                  samples,
+                                                const GeglRectangle   *roi,
+                                                gint                   level,
+                                                GimpLayerBlendTRC      blend_trc,
+                                                GimpLayerBlendTRC      composite_trc,
+                                                GimpLayerCompositeMode composite_mode)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.h
index a9f76e2..b918e51 100644
--- a/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_softlight_legacy_process_pixels (gfloat              *in
                                                          gfloat               opacity,
                                                          glong                samples,
                                                          const GeglRectangle *roi,
-                                                         gint                 level);
+                                                         gint                 level,
+                                                         GimpLayerBlendTRC    blend_trc, 
+                                                         GimpLayerBlendTRC    composite_trc,
+                                                         GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_SOFTLIGHT_LEGACY_H__ */
diff --git a/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.c
index 504956a..2c66bca 100644
--- a/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.c
@@ -74,20 +74,23 @@ gimp_operation_subtract_legacy_process (GeglOperation       *operation,
                                       const GeglRectangle *roi,
                                       gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_subtract_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, 
samples, roi, level);
+  return gimp_operation_subtract_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
-gimp_operation_subtract_legacy_process_pixels (gfloat              *in,
-                                             gfloat              *layer,
-                                             gfloat              *mask,
-                                             gfloat              *out,
-                                             gfloat               opacity,
-                                             glong                samples,
-                                             const GeglRectangle *roi,
-                                             gint                 level)
+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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.h 
b/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.h
index 45c6582..582186a 100644
--- a/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_subtract_legacy_process_pixels (gfloat              *in,
                                                         gfloat               opacity,
                                                         glong                samples,
                                                         const GeglRectangle *roi,
-                                                        gint                 level);
+                                                        gint                 level,
+                                                        GimpLayerBlendTRC    blend_trc, 
+                                                        GimpLayerBlendTRC    composite_trc,
+                                                        GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_SUBTRACT_LEGACY_H__ */
diff --git a/app/operations/layer-modes/gimpoperationaddition.c 
b/app/operations/layer-modes/gimpoperationaddition.c
index 0d6c2e6..d975b3c 100644
--- a/app/operations/layer-modes/gimpoperationaddition.c
+++ b/app/operations/layer-modes/gimpoperationaddition.c
@@ -75,27 +75,28 @@ gimp_operation_addition_process (GeglOperation       *operation,
                                  const GeglRectangle *roi,
                                  gint                 level)
 {
-  gfloat opacity  = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
-  return gimp_operation_addition_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, 
level);
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
+  return gimp_operation_addition_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
-gimp_operation_addition_process_pixels (gfloat              *in,
-                                        gfloat              *layer,
-                                        gfloat              *mask,
-                                        gfloat              *out,
-                                        gfloat               opacity,
-                                        glong                samples,
-                                        const GeglRectangle *roi,
-                                        gint                 level)
+gimp_operation_addition_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,
-     GIMP_LAYER_BLEND_RGB_PERCEPTUAL,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_addition
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples,
+                   blend_trc, composite_trc, composite_mode, blendfun_addition);
   return TRUE;
 }
 
diff --git a/app/operations/layer-modes/gimpoperationaddition.h 
b/app/operations/layer-modes/gimpoperationaddition.h
index f467b94..01f24bd 100644
--- a/app/operations/layer-modes/gimpoperationaddition.h
+++ b/app/operations/layer-modes/gimpoperationaddition.h
@@ -50,14 +50,17 @@ struct _GimpOperationAdditionClass
 
 GType    gimp_operation_addition_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_addition_process_pixels (gfloat              *in,
-                                                 gfloat              *layer,
-                                                 gfloat              *mask,
-                                                 gfloat              *out,
-                                                 gfloat               opacity,
-                                                 glong                samples,
-                                                 const GeglRectangle *roi,
-                                                 gint                 level);
+gboolean gimp_operation_addition_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_ADDITION_H__ */
diff --git a/app/operations/layer-modes/gimpoperationantierase.c 
b/app/operations/layer-modes/gimpoperationantierase.c
index fff71b1..40c1585 100644
--- a/app/operations/layer-modes/gimpoperationantierase.c
+++ b/app/operations/layer-modes/gimpoperationantierase.c
@@ -87,20 +87,23 @@ gimp_operation_anti_erase_process (GeglOperation       *operation,
                                    const GeglRectangle *roi,
                                    gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (void*)operation;
 
-  return gimp_operation_anti_erase_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, 
roi, level);
+  return gimp_operation_anti_erase_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
-gimp_operation_anti_erase_process_pixels (gfloat              *in,
-                                          gfloat              *layer,
-                                          gfloat              *mask,
-                                          gfloat              *out,
-                                          gfloat               opacity,
-                                          glong                samples,
-                                          const GeglRectangle *roi,
-                                          gint                 level)
+gimp_operation_anti_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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes/gimpoperationantierase.h 
b/app/operations/layer-modes/gimpoperationantierase.h
index d582792..58e2d41 100644
--- a/app/operations/layer-modes/gimpoperationantierase.h
+++ b/app/operations/layer-modes/gimpoperationantierase.h
@@ -49,14 +49,17 @@ struct _GimpOperationAntiEraseClass
 
 GType    gimp_operation_anti_erase_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_anti_erase_process_pixels (gfloat              *in,
-                                                   gfloat              *layer,
-                                                   gfloat              *mask,
-                                                   gfloat              *out,
-                                                   gfloat               opacity,
-                                                   glong                samples,
-                                                   const GeglRectangle *roi,
-                                                   gint                 level);
+gboolean gimp_operation_anti_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);
 
 
 #endif /* __GIMP_OPERATION_ANTI_ERASE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationbehind.c 
b/app/operations/layer-modes/gimpoperationbehind.c
index 332c73a..74afd0b 100644
--- a/app/operations/layer-modes/gimpoperationbehind.c
+++ b/app/operations/layer-modes/gimpoperationbehind.c
@@ -74,20 +74,23 @@ gimp_operation_behind_process (GeglOperation       *operation,
                                const GeglRectangle *roi,
                                gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (void*)operation;
 
-  return gimp_operation_behind_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, 
level);
+  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
-gimp_operation_behind_process_pixels (gfloat              *in,
-                                      gfloat              *layer,
-                                      gfloat              *mask,
-                                      gfloat              *out,
-                                      gfloat               opacity,
-                                      glong                samples,
-                                      const GeglRectangle *roi,
-                                      gint                 level)
+gimp_operation_behind_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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes/gimpoperationbehind.h 
b/app/operations/layer-modes/gimpoperationbehind.h
index 41c95b2..764f7f6 100644
--- a/app/operations/layer-modes/gimpoperationbehind.h
+++ b/app/operations/layer-modes/gimpoperationbehind.h
@@ -49,14 +49,17 @@ struct _GimpOperationBehindClass
 
 GType    gimp_operation_behind_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_behind_process_pixels (gfloat              *in,
-                                               gfloat              *layer,
-                                               gfloat              *mask,
-                                               gfloat              *out,
-                                               gfloat               opacity,
-                                               glong                samples,
-                                               const GeglRectangle *roi,
-                                               gint                 level);
+gboolean gimp_operation_behind_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_BEHIND_H__ */
diff --git a/app/operations/layer-modes/gimpoperationburn.c b/app/operations/layer-modes/gimpoperationburn.c
index 3cffe69..5fddf2a 100644
--- a/app/operations/layer-modes/gimpoperationburn.c
+++ b/app/operations/layer-modes/gimpoperationburn.c
@@ -75,29 +75,27 @@ gimp_operation_burn_process (GeglOperation       *operation,
                              const GeglRectangle *roi,
                              gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (void*)operation;
 
-  return gimp_operation_burn_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, 
level);
-}
+  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);
+} 
 
 
 gboolean
-gimp_operation_burn_process_pixels (gfloat              *in,
-                                    gfloat              *layer,
-                                    gfloat              *mask,
-                                    gfloat              *out,
-                                    gfloat               opacity,
-                                    glong                samples,
-                                    const GeglRectangle *roi,
-                                    gint                 level)
+gimp_operation_burn_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,
-     GIMP_LAYER_BLEND_RGB_PERCEPTUAL,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_burn
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples, blend_trc,
+                        composite_trc, composite_mode, blendfun_burn);
   return TRUE;
 }
 
diff --git a/app/operations/layer-modes/gimpoperationburn.h b/app/operations/layer-modes/gimpoperationburn.h
index 8a1d605..3804e22 100644
--- a/app/operations/layer-modes/gimpoperationburn.h
+++ b/app/operations/layer-modes/gimpoperationburn.h
@@ -50,14 +50,17 @@ struct _GimpOperationBurnClass
 
 GType    gimp_operation_burn_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_burn_process_pixels (gfloat              *in,
-                                             gfloat              *layer,
-                                             gfloat              *mask,
-                                             gfloat              *out,
-                                             gfloat               opacity,
-                                             glong                samples,
-                                             const GeglRectangle *roi,
-                                             gint                 level);
+gboolean gimp_operation_burn_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_BURN_H__ */
diff --git a/app/operations/layer-modes/gimpoperationcolorerase.c 
b/app/operations/layer-modes/gimpoperationcolorerase.c
index 04e7533..06b8fec 100644
--- a/app/operations/layer-modes/gimpoperationcolorerase.c
+++ b/app/operations/layer-modes/gimpoperationcolorerase.c
@@ -78,20 +78,23 @@ gimp_operation_color_erase_process (GeglOperation       *operation,
                                     const GeglRectangle *roi,
                                     gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (void*)operation;
 
-  return gimp_operation_color_erase_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, 
roi, level);
+  return gimp_operation_color_erase_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
-gimp_operation_color_erase_process_pixels (gfloat              *in,
-                                           gfloat              *layer,
-                                           gfloat              *mask,
-                                           gfloat              *out,
-                                           gfloat               opacity,
-                                           glong                samples,
-                                           const GeglRectangle *roi,
-                                           gint                 level)
+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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes/gimpoperationcolorerase.h 
b/app/operations/layer-modes/gimpoperationcolorerase.h
index 8f3a8f4..e38decc 100644
--- a/app/operations/layer-modes/gimpoperationcolorerase.h
+++ b/app/operations/layer-modes/gimpoperationcolorerase.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_color_erase_process_pixels (gfloat              *in,
                                                     gfloat               opacity,
                                                     glong                samples,
                                                     const GeglRectangle *roi,
-                                                    gint                 level);
+                                                    gint                 level,
+                                                    GimpLayerBlendTRC    blend_trc, 
+                                                    GimpLayerBlendTRC    composite_trc,
+                                                    GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_COLOR_ERASE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationdarkenonly.c 
b/app/operations/layer-modes/gimpoperationdarkenonly.c
index 0eae2d9..627af49 100644
--- a/app/operations/layer-modes/gimpoperationdarkenonly.c
+++ b/app/operations/layer-modes/gimpoperationdarkenonly.c
@@ -75,27 +75,25 @@ gimp_operation_darken_only_process (GeglOperation       *operation,
                                     const GeglRectangle *roi,
                                     gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (void*)operation;
 
-  return gimp_operation_darken_only_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, 
roi, level);
+  return gimp_operation_darken_only_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
-gimp_operation_darken_only_process_pixels (gfloat              *in,
-                                           gfloat              *layer,
-                                           gfloat              *mask,
-                                           gfloat              *out,
-                                           gfloat               opacity,
-                                           glong                samples,
-                                           const GeglRectangle *roi,
-                                           gint                 level)
+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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_darken_only
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples,
+     blend_trc, composite_trc, composite_mode, blendfun_darken_only);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationdarkenonly.h 
b/app/operations/layer-modes/gimpoperationdarkenonly.h
index 578a0f2..8e394e8 100644
--- a/app/operations/layer-modes/gimpoperationdarkenonly.h
+++ b/app/operations/layer-modes/gimpoperationdarkenonly.h
@@ -57,7 +57,10 @@ gboolean gimp_operation_darken_only_process_pixels (gfloat              *in,
                                                     gfloat               opacity,
                                                     glong                samples,
                                                     const GeglRectangle *roi,
-                                                    gint                 level);
+                                                    gint                 level,
+                                                    GimpLayerBlendTRC    blend_trc, 
+                                                    GimpLayerBlendTRC    composite_trc,
+                                                    GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_DARKEN_ONLY_H__ */
diff --git a/app/operations/layer-modes/gimpoperationdifference.c 
b/app/operations/layer-modes/gimpoperationdifference.c
index ae5d697..8244345 100644
--- a/app/operations/layer-modes/gimpoperationdifference.c
+++ b/app/operations/layer-modes/gimpoperationdifference.c
@@ -75,27 +75,25 @@ gimp_operation_difference_process (GeglOperation       *operation,
                                    const GeglRectangle *roi,
                                    gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (void*)operation;
 
-  return gimp_operation_difference_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, 
roi, level);
+  return gimp_operation_difference_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
-gimp_operation_difference_process_pixels (gfloat              *in,
-                                          gfloat              *layer,
-                                          gfloat              *mask,
-                                          gfloat              *out,
-                                          gfloat               opacity,
-                                          glong                samples,
-                                          const GeglRectangle *roi,
-                                          gint                 level)
+gimp_operation_difference_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,
-     GIMP_LAYER_BLEND_RGB_PERCEPTUAL,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_difference
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples, blend_trc,
+     composite_trc, composite_mode, blendfun_difference);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationdifference.h 
b/app/operations/layer-modes/gimpoperationdifference.h
index 72ed1e8..dfe1aa5 100644
--- a/app/operations/layer-modes/gimpoperationdifference.h
+++ b/app/operations/layer-modes/gimpoperationdifference.h
@@ -58,7 +58,10 @@ gboolean gimp_operation_difference_process_pixels (gfloat              *in,
                                                    gfloat               opacity,
                                                    glong                samples,
                                                    const GeglRectangle *roi,
-                                                   gint                 level);
+                                                   gint                 level,
+                                                   GimpLayerBlendTRC    blend_trc, 
+                                                   GimpLayerBlendTRC    composite_trc,
+                                                   GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_DIFFERENCE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationdissolve.c 
b/app/operations/layer-modes/gimpoperationdissolve.c
index 1476c17..38afe83 100644
--- a/app/operations/layer-modes/gimpoperationdissolve.c
+++ b/app/operations/layer-modes/gimpoperationdissolve.c
@@ -90,20 +90,23 @@ gimp_operation_dissolve_process (GeglOperation       *operation,
                                  const GeglRectangle *result,
                                  gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (void*) operation;
 
-  return gimp_operation_dissolve_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, 
result, level);
+  return gimp_operation_dissolve_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, layer_mode->opacity, 
samples, result, level, layer_mode->blend_trc, layer_mode->composite_trc, layer_mode->composite_mode);
 }
 
 gboolean
-gimp_operation_dissolve_process_pixels (gfloat              *in,
-                                        gfloat              *aux,
-                                        gfloat              *mask,
-                                        gfloat              *out,
-                                        gfloat               opacity,
-                                        glong                samples,
-                                        const GeglRectangle *result,
-                                        gint                 level)
+gimp_operation_dissolve_process_pixels (gfloat                *in,
+                                        gfloat                *aux,
+                                        gfloat                *mask,
+                                        gfloat                *out,
+                                        gfloat                 opacity,
+                                        glong                  samples,
+                                        const GeglRectangle   *result,
+                                        gint                   level,
+                                        GimpLayerBlendTRC      blend_trc,
+                                        GimpLayerBlendTRC      composite_trc,
+                                        GimpLayerCompositeMode composite_mode)
 {
   const gboolean has_mask = mask != NULL;
   gint           x, y;
diff --git a/app/operations/layer-modes/gimpoperationdissolve.h 
b/app/operations/layer-modes/gimpoperationdissolve.h
index 89795fb..4e21a61 100644
--- a/app/operations/layer-modes/gimpoperationdissolve.h
+++ b/app/operations/layer-modes/gimpoperationdissolve.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_dissolve_process_pixels (gfloat              *in,
                                                  gfloat               opacity,
                                                  glong                samples,
                                                  const GeglRectangle *result,
-                                                 gint                 level);
+                                                 gint                 level,
+                                                 GimpLayerBlendTRC    blend_trc, 
+                                                 GimpLayerBlendTRC    composite_trc,
+                                                 GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_DISSOLVE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationdivide.c 
b/app/operations/layer-modes/gimpoperationdivide.c
index 92014b0..e57d7c7 100644
--- a/app/operations/layer-modes/gimpoperationdivide.c
+++ b/app/operations/layer-modes/gimpoperationdivide.c
@@ -75,27 +75,25 @@ gimp_operation_divide_process (GeglOperation       *operation,
                                const GeglRectangle *roi,
                                gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (void*)operation;
 
-  return gimp_operation_divide_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, 
level);
+  return gimp_operation_divide_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
-gimp_operation_divide_process_pixels (gfloat              *in,
-                                      gfloat              *layer,
-                                      gfloat              *mask,
-                                      gfloat              *out,
-                                      gfloat               opacity,
-                                      glong                samples,
-                                      const GeglRectangle *roi,
-                                      gint                 level)
+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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_RGB_PERCEPTUAL,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_divide
-     );
+   gimp_composite_blend (in, layer, mask, out, opacity, samples,
+                    blend_trc, composite_trc, composite_mode, blendfun_divide);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationdivide.h 
b/app/operations/layer-modes/gimpoperationdivide.h
index 39ead05..92b52cd 100644
--- a/app/operations/layer-modes/gimpoperationdivide.h
+++ b/app/operations/layer-modes/gimpoperationdivide.h
@@ -57,7 +57,10 @@ gboolean gimp_operation_divide_process_pixels (gfloat              *in,
                                                gfloat               opacity,
                                                glong                samples,
                                                const GeglRectangle *roi,
-                                               gint                 level);
+                                               gint                 level,
+                                               GimpLayerBlendTRC    blend_trc, 
+                                               GimpLayerBlendTRC    composite_trc,
+                                               GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_DIVIDE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationdodge.c b/app/operations/layer-modes/gimpoperationdodge.c
index 1097ece..025eb38 100644
--- a/app/operations/layer-modes/gimpoperationdodge.c
+++ b/app/operations/layer-modes/gimpoperationdodge.c
@@ -75,27 +75,25 @@ gimp_operation_dodge_process (GeglOperation       *operation,
                               const GeglRectangle *roi,
                               gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (void*)operation;
 
-  return gimp_operation_dodge_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, 
level);
+  return gimp_operation_dodge_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
-gimp_operation_dodge_process_pixels (gfloat              *in,
-                                     gfloat              *layer,
-                                     gfloat              *mask,
-                                     gfloat              *out,
-                                     gfloat               opacity,
-                                     glong                samples,
-                                     const GeglRectangle *roi,
-                                     gint                 level)
+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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_RGB_PERCEPTUAL,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_dodge
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples,
+     blend_trc, composite_trc, composite_mode, blendfun_dodge);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationdodge.h b/app/operations/layer-modes/gimpoperationdodge.h
index f6e98f4..476fecb 100644
--- a/app/operations/layer-modes/gimpoperationdodge.h
+++ b/app/operations/layer-modes/gimpoperationdodge.h
@@ -57,7 +57,10 @@ gboolean gimp_operation_dodge_process_pixels (gfloat              *in,
                                               gfloat               opacity,
                                               glong                samples,
                                               const GeglRectangle *roi,
-                                              gint                 level);
+                                              gint                 level,
+                                              GimpLayerBlendTRC    blend_trc, 
+                                              GimpLayerBlendTRC    composite_trc,
+                                              GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_DODGE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationerase.c b/app/operations/layer-modes/gimpoperationerase.c
index 138c2df..922df8f 100644
--- a/app/operations/layer-modes/gimpoperationerase.c
+++ b/app/operations/layer-modes/gimpoperationerase.c
@@ -87,20 +87,23 @@ gimp_operation_erase_process (GeglOperation       *operation,
                               const GeglRectangle *roi,
                               gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_erase_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, 
level);
+  return gimp_operation_erase_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
-gimp_operation_erase_process_pixels (gfloat              *in,
-                                     gfloat              *layer,
-                                     gfloat              *mask,
-                                     gfloat              *out,
-                                     gfloat               opacity,
-                                     glong                samples,
-                                     const GeglRectangle *roi,
-                                     gint                 level)
+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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes/gimpoperationerase.h b/app/operations/layer-modes/gimpoperationerase.h
index ae48749..a22213c 100644
--- a/app/operations/layer-modes/gimpoperationerase.h
+++ b/app/operations/layer-modes/gimpoperationerase.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_erase_process_pixels (gfloat              *in,
                                               gfloat               opacity,
                                               glong                samples,
                                               const GeglRectangle *roi,
-                                              gint                 level);
+                                              gint                 level,
+                                              GimpLayerBlendTRC    blend_trc, 
+                                              GimpLayerBlendTRC    composite_trc,
+                                              GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_ERASE_MODE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationgrainextract.c 
b/app/operations/layer-modes/gimpoperationgrainextract.c
index 6d89d57..9f29b09 100644
--- a/app/operations/layer-modes/gimpoperationgrainextract.c
+++ b/app/operations/layer-modes/gimpoperationgrainextract.c
@@ -75,27 +75,24 @@ gimp_operation_grain_extract_process (GeglOperation       *operation,
                                       const GeglRectangle *roi,
                                       gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
-
-  return gimp_operation_grain_extract_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, 
roi, level);
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
+  return gimp_operation_grain_extract_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
-gimp_operation_grain_extract_process_pixels (gfloat              *in,
-                                             gfloat              *layer,
-                                             gfloat              *mask,
-                                             gfloat              *out,
-                                             gfloat               opacity,
-                                             glong                samples,
-                                             const GeglRectangle *roi,
-                                             gint                 level)
+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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_RGB_PERCEPTUAL,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_grain_extract
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples, blend_trc,
+                        composite_trc, composite_mode, blendfun_grain_extract);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationgrainextract.h 
b/app/operations/layer-modes/gimpoperationgrainextract.h
index 575bc40..27bd07c 100644
--- a/app/operations/layer-modes/gimpoperationgrainextract.h
+++ b/app/operations/layer-modes/gimpoperationgrainextract.h
@@ -57,7 +57,10 @@ gboolean gimp_operation_grain_extract_process_pixels (gfloat              *in,
                                                       gfloat               opacity,
                                                       glong                samples,
                                                       const GeglRectangle *roi,
-                                                      gint                 level);
+                                                      gint                 level,
+                                                      GimpLayerBlendTRC    blend_trc, 
+                                                      GimpLayerBlendTRC    composite_trc,
+                                                      GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_GRAIN_EXTRACT_H__ */
diff --git a/app/operations/layer-modes/gimpoperationgrainmerge.c 
b/app/operations/layer-modes/gimpoperationgrainmerge.c
index 8102164..f15d58e 100644
--- a/app/operations/layer-modes/gimpoperationgrainmerge.c
+++ b/app/operations/layer-modes/gimpoperationgrainmerge.c
@@ -75,27 +75,24 @@ gimp_operation_grain_merge_process (GeglOperation       *operation,
                                     const GeglRectangle *roi,
                                     gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
-
-  return gimp_operation_grain_merge_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, 
roi, level);
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
+  return gimp_operation_grain_merge_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
-gimp_operation_grain_merge_process_pixels (gfloat              *in,
-                                           gfloat              *layer,
-                                           gfloat              *mask,
-                                           gfloat              *out,
-                                           gfloat               opacity,
-                                           glong                samples,
-                                           const GeglRectangle *roi,
-                                           gint                 level)
+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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_RGB_PERCEPTUAL,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_grain_merge
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples, blend_trc,
+     composite_trc, composite_mode, blendfun_grain_merge);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationgrainmerge.h 
b/app/operations/layer-modes/gimpoperationgrainmerge.h
index 47ba029..af77341 100644
--- a/app/operations/layer-modes/gimpoperationgrainmerge.h
+++ b/app/operations/layer-modes/gimpoperationgrainmerge.h
@@ -57,7 +57,10 @@ gboolean gimp_operation_grain_merge_process_pixels (gfloat              *in,
                                                     gfloat               opacity,
                                                     glong                samples,
                                                     const GeglRectangle *roi,
-                                                    gint                 level);
+                                                    gint                 level,
+                                                    GimpLayerBlendTRC    blend_trc, 
+                                                    GimpLayerBlendTRC    composite_trc,
+                                                    GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_GRAIN_MERGE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationhardlight.c 
b/app/operations/layer-modes/gimpoperationhardlight.c
index fa410ad..6127f1d 100644
--- a/app/operations/layer-modes/gimpoperationhardlight.c
+++ b/app/operations/layer-modes/gimpoperationhardlight.c
@@ -74,27 +74,25 @@ gimp_operation_hardlight_process (GeglOperation       *operation,
                                   const GeglRectangle *roi,
                                   gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_hardlight_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, 
level);
+  return gimp_operation_hardlight_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
-gimp_operation_hardlight_process_pixels (gfloat              *in,
-                                         gfloat              *layer,
-                                         gfloat              *mask,
-                                         gfloat              *out,
-                                         gfloat               opacity,
-                                         glong                samples,
-                                         const GeglRectangle *roi,
-                                         gint                 level)
+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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_RGB_PERCEPTUAL,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_hardlight
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples,
+             blend_trc, composite_trc, composite_mode, blendfun_hardlight);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationhardlight.h 
b/app/operations/layer-modes/gimpoperationhardlight.h
index 1986600..55f734d 100644
--- a/app/operations/layer-modes/gimpoperationhardlight.h
+++ b/app/operations/layer-modes/gimpoperationhardlight.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_hardlight_process_pixels (gfloat              *in,
                                                   gfloat               opacity,
                                                   glong                samples,
                                                   const GeglRectangle *roi,
-                                                  gint                 level);
+                                                  gint                 level,
+                                                  GimpLayerBlendTRC    blend_trc, 
+                                                  GimpLayerBlendTRC    composite_trc,
+                                                  GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_HARDLIGHT_H__ */
diff --git a/app/operations/layer-modes/gimpoperationhsvcolor.c 
b/app/operations/layer-modes/gimpoperationhsvcolor.c
index 3b2e182..8c4ae94 100644
--- a/app/operations/layer-modes/gimpoperationhsvcolor.c
+++ b/app/operations/layer-modes/gimpoperationhsvcolor.c
@@ -79,27 +79,25 @@ gimp_operation_hsv_color_process (GeglOperation       *operation,
                                   const GeglRectangle *roi,
                                   gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_hsv_color_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, 
level);
+  return gimp_operation_hsv_color_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
-gimp_operation_hsv_color_process_pixels (gfloat              *in,
-                                         gfloat              *layer,
-                                         gfloat              *mask,
-                                         gfloat              *out,
-                                         gfloat               opacity,
-                                         glong                samples,
-                                         const GeglRectangle *roi,
-                                         gint                 level)
+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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_RGB_PERCEPTUAL,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_hsv_color
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples,
+                blend_trc, composite_trc, composite_mode, blendfun_hsv_color);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationhsvcolor.h 
b/app/operations/layer-modes/gimpoperationhsvcolor.h
index b7c607e..43e91ea 100644
--- a/app/operations/layer-modes/gimpoperationhsvcolor.h
+++ b/app/operations/layer-modes/gimpoperationhsvcolor.h
@@ -57,7 +57,10 @@ gboolean gimp_operation_hsv_color_process_pixels (gfloat              *in,
                                                   gfloat               opacity,
                                                   glong                samples,
                                                   const GeglRectangle *roi,
-                                                  gint                 level);
+                                                  gint                 level,
+                                                  GimpLayerBlendTRC    blend_trc, 
+                                                  GimpLayerBlendTRC    composite_trc,
+                                                  GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_HSV_COLOR_H__ */
diff --git a/app/operations/layer-modes/gimpoperationhsvhue.c 
b/app/operations/layer-modes/gimpoperationhsvhue.c
index 92603cc..159f015 100644
--- a/app/operations/layer-modes/gimpoperationhsvhue.c
+++ b/app/operations/layer-modes/gimpoperationhsvhue.c
@@ -79,9 +79,9 @@ gimp_operation_hsv_hue_process (GeglOperation       *operation,
                                 const GeglRectangle *roi,
                                 gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_hsv_hue_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, 
level);
+  return gimp_operation_hsv_hue_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
@@ -92,14 +92,12 @@ gimp_operation_hsv_hue_process_pixels (gfloat              *in,
                                        gfloat               opacity,
                                        glong                samples,
                                        const GeglRectangle *roi,
-                                       gint                 level)
+                                       gint                 level,
+                                       GimpLayerBlendTRC    blend_trc,
+                                       GimpLayerBlendTRC    composite_trc,
+                                       GimpLayerCompositeMode composite_mode)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_RGB_PERCEPTUAL,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_hsv_hue
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples, blend_trc,
+                        composite_trc, composite_mode, blendfun_hsv_hue);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationhsvhue.h 
b/app/operations/layer-modes/gimpoperationhsvhue.h
index 18ab422..6fcd343 100644
--- a/app/operations/layer-modes/gimpoperationhsvhue.h
+++ b/app/operations/layer-modes/gimpoperationhsvhue.h
@@ -57,7 +57,10 @@ gboolean gimp_operation_hsv_hue_process_pixels (gfloat              *in,
                                                 gfloat               opacity,
                                                 glong                samples,
                                                 const GeglRectangle *roi,
-                                                gint                 level);
+                                                gint                 level,
+                                                GimpLayerBlendTRC    blend_trc, 
+                                                GimpLayerBlendTRC    composite_trc,
+                                                GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_HSV_HUE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationhsvsaturation.c 
b/app/operations/layer-modes/gimpoperationhsvsaturation.c
index 1cba1b7..32ce7f2 100644
--- a/app/operations/layer-modes/gimpoperationhsvsaturation.c
+++ b/app/operations/layer-modes/gimpoperationhsvsaturation.c
@@ -79,27 +79,24 @@ gimp_operation_hsv_saturation_process (GeglOperation       *operation,
                                        const GeglRectangle *roi,
                                        gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
-
-  return gimp_operation_hsv_saturation_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, 
roi, level);
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
+  return gimp_operation_hsv_saturation_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
-gimp_operation_hsv_saturation_process_pixels (gfloat              *in,
-                                              gfloat              *layer,
-                                              gfloat              *mask,
-                                              gfloat              *out,
-                                              gfloat               opacity,
-                                              glong                samples,
-                                              const GeglRectangle *roi,
-                                              gint                 level)
+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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_RGB_PERCEPTUAL,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_hsv_saturation
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples,
+     blend_trc, composite_trc, composite_mode, blendfun_hsv_saturation);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationhsvsaturation.h 
b/app/operations/layer-modes/gimpoperationhsvsaturation.h
index 5031c80..29bab15 100644
--- a/app/operations/layer-modes/gimpoperationhsvsaturation.h
+++ b/app/operations/layer-modes/gimpoperationhsvsaturation.h
@@ -57,7 +57,10 @@ gboolean gimp_operation_hsv_saturation_process_pixels (gfloat              *in,
                                                        gfloat               opacity,
                                                        glong                samples,
                                                        const GeglRectangle *roi,
-                                                       gint                 level);
+                                                       gint                 level,
+                                                       GimpLayerBlendTRC    blend_trc, 
+                                                       GimpLayerBlendTRC    composite_trc,
+                                                       GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_HSV_SATURATION_H__ */
diff --git a/app/operations/layer-modes/gimpoperationhsvvalue.c 
b/app/operations/layer-modes/gimpoperationhsvvalue.c
index 3843bdb..f3ec3d1 100644
--- a/app/operations/layer-modes/gimpoperationhsvvalue.c
+++ b/app/operations/layer-modes/gimpoperationhsvvalue.c
@@ -79,27 +79,24 @@ gimp_operation_hsv_value_process (GeglOperation       *operation,
                                   const GeglRectangle *roi,
                                   gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
-
-  return gimp_operation_hsv_value_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, 
level);
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
+  return gimp_operation_hsv_value_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
-gimp_operation_hsv_value_process_pixels (gfloat              *in,
-                                         gfloat              *layer,
-                                         gfloat              *mask,
-                                         gfloat              *out,
-                                         gfloat               opacity,
-                                         glong                samples,
-                                         const GeglRectangle *roi,
-                                         gint                 level)
+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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_RGB_PERCEPTUAL,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_hsv_value
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples, blend_trc,
+                        composite_trc, composite_mode, blendfun_hsv_value);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationhsvvalue.h 
b/app/operations/layer-modes/gimpoperationhsvvalue.h
index 081ed31..07012a2 100644
--- a/app/operations/layer-modes/gimpoperationhsvvalue.h
+++ b/app/operations/layer-modes/gimpoperationhsvvalue.h
@@ -57,7 +57,10 @@ gboolean gimp_operation_hsv_value_process_pixels (gfloat              *in,
                                                   gfloat               opacity,
                                                   glong                samples,
                                                   const GeglRectangle *roi,
-                                                  gint                 level);
+                                                  gint                 level,
+                                                  GimpLayerBlendTRC    blend_trc, 
+                                                  GimpLayerBlendTRC    composite_trc,
+                                                  GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_HSV_VALUE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlchchroma.c 
b/app/operations/layer-modes/gimpoperationlchchroma.c
index 7a8c705..f446de5 100644
--- a/app/operations/layer-modes/gimpoperationlchchroma.c
+++ b/app/operations/layer-modes/gimpoperationlchchroma.c
@@ -83,7 +83,7 @@ gimp_operation_lch_chroma_process (GeglOperation       *operation,
 
   return (linear ? gimp_operation_lch_chroma_process_pixels_linear :
                    gimp_operation_lch_chroma_process_pixels)
-    (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, level);
+    (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, level, gimp_op->blend_trc, 
gimp_op->composite_trc, gimp_op->composite_mode);
 }
 
 static void
@@ -124,14 +124,17 @@ chroma_pre_process (const Babl   *from_fish,
 
 /* XXX: this and pre_process should be removed */
 gboolean
-gimp_operation_lch_chroma_process_pixels (gfloat              *in,
-                                          gfloat              *layer,
-                                          gfloat              *mask,
-                                          gfloat              *out,
-                                          gfloat               opacity,
-                                          glong                samples,
-                                          const GeglRectangle *roi,
-                                          gint                 level)
+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)
 {
   static const Babl *from_fish = NULL;
   static const Babl *to_fish = NULL;
@@ -148,21 +151,19 @@ gimp_operation_lch_chroma_process_pixels (gfloat              *in,
 }
 
 gboolean
-gimp_operation_lch_chroma_process_pixels_linear (gfloat              *in,
-                                                 gfloat              *layer,
-                                                 gfloat              *mask,
-                                                 gfloat              *out,
-                                                 gfloat               opacity,
-                                                 glong                samples,
-                                                 const GeglRectangle *roi,
-                                                 gint                 level)
+gimp_operation_lch_chroma_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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_LAB,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_lch_chroma
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples, blend_trc,
+                        composite_trc, composite_mode, blendfun_lch_chroma);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationlchchroma.h 
b/app/operations/layer-modes/gimpoperationlchchroma.h
index 123d59d..86658d1 100644
--- a/app/operations/layer-modes/gimpoperationlchchroma.h
+++ b/app/operations/layer-modes/gimpoperationlchchroma.h
@@ -58,7 +58,10 @@ gboolean gimp_operation_lch_chroma_process_pixels_linear (gfloat              *i
                                                           gfloat               opacity,
                                                           glong                samples,
                                                           const GeglRectangle *roi,
-                                                          gint                 level);
+                                                          gint                 level,
+                                                          GimpLayerBlendTRC    blend_trc, 
+                                                          GimpLayerBlendTRC    composite_trc,
+                                                          GimpLayerCompositeMode composite_mode);
 
 gboolean gimp_operation_lch_chroma_process_pixels        (gfloat              *in,
                                                           gfloat              *layer,
@@ -67,7 +70,10 @@ gboolean gimp_operation_lch_chroma_process_pixels        (gfloat              *i
                                                           gfloat               opacity,
                                                           glong                samples,
                                                           const GeglRectangle *roi,
-                                                          gint                 level);
+                                                          gint                 level,
+                                                          GimpLayerBlendTRC    blend_trc, 
+                                                          GimpLayerBlendTRC    composite_trc,
+                                                          GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_LCH_CHROMA_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlchcolor.c 
b/app/operations/layer-modes/gimpoperationlchcolor.c
index 3985422..43ecb8e 100644
--- a/app/operations/layer-modes/gimpoperationlchcolor.c
+++ b/app/operations/layer-modes/gimpoperationlchcolor.c
@@ -78,12 +78,10 @@ gimp_operation_lch_color_process (GeglOperation       *operation,
                                   gint                 level)
 {
   GimpOperationPointLayerMode *gimp_op = GIMP_OPERATION_POINT_LAYER_MODE (operation);
-  gfloat                       opacity = gimp_op->opacity;
-  gboolean                     linear  = gimp_op->linear;
 
-  return (linear ? gimp_operation_lch_color_process_pixels_linear :
+  return (gimp_op->linear ? gimp_operation_lch_color_process_pixels_linear :
                    gimp_operation_lch_color_process_pixels)
-    (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, level);
+    (in_buf, aux_buf, aux2_buf, out_buf, gimp_op->opacity, samples, roi, level, gimp_op->blend_trc, 
gimp_op->composite_trc, gimp_op->composite_mode);
 }
 
 static void
@@ -114,14 +112,17 @@ color_pre_process (const Babl   *from_fish_la,
 
 /* XXX: should be removed along with the pre_process fun */
 gboolean
-gimp_operation_lch_color_process_pixels (gfloat              *in,
-                                         gfloat              *layer,
-                                         gfloat              *mask,
-                                         gfloat              *out,
-                                         gfloat               opacity,
-                                         glong                samples,
-                                         const GeglRectangle *roi,
-                                         gint                 level)
+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)
 {
   static const Babl *from_fish_laba = NULL;
   static const Babl *from_fish_la = NULL;
@@ -142,21 +143,19 @@ gimp_operation_lch_color_process_pixels (gfloat              *in,
 
 
 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)
+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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_LAB,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_lch_color
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples,
+     blend_trc, composite_trc, composite_mode, blendfun_lch_color);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationlchcolor.h 
b/app/operations/layer-modes/gimpoperationlchcolor.h
index 8f2f10c..51e396a 100644
--- a/app/operations/layer-modes/gimpoperationlchcolor.h
+++ b/app/operations/layer-modes/gimpoperationlchcolor.h
@@ -58,7 +58,10 @@ gboolean gimp_operation_lch_color_process_pixels_linear (gfloat              *in
                                                          gfloat               opacity,
                                                          glong                samples,
                                                          const GeglRectangle *roi,
-                                                         gint                 level);
+                                                         gint                 level,
+                                                         GimpLayerBlendTRC    blend_trc, 
+                                                         GimpLayerBlendTRC    composite_trc,
+                                                         GimpLayerCompositeMode composite_mode);
 
 gboolean gimp_operation_lch_color_process_pixels        (gfloat              *in,
                                                          gfloat              *layer,
@@ -67,7 +70,10 @@ gboolean gimp_operation_lch_color_process_pixels        (gfloat              *in
                                                          gfloat               opacity,
                                                          glong                samples,
                                                          const GeglRectangle *roi,
-                                                         gint                 level);
+                                                         gint                 level,
+                                                         GimpLayerBlendTRC    blend_trc, 
+                                                         GimpLayerBlendTRC    composite_trc,
+                                                         GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_LCH_COLOR_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlchhue.c 
b/app/operations/layer-modes/gimpoperationlchhue.c
index ea21e0b..226dd6e 100644
--- a/app/operations/layer-modes/gimpoperationlchhue.c
+++ b/app/operations/layer-modes/gimpoperationlchhue.c
@@ -78,13 +78,11 @@ gimp_operation_lch_hue_process (GeglOperation       *operation,
                                 const GeglRectangle *roi,
                                 gint                 level)
 {
-  GimpOperationPointLayerMode *gimp_op = GIMP_OPERATION_POINT_LAYER_MODE (operation);
-  gfloat                       opacity = gimp_op->opacity;
-  gboolean                     linear  = gimp_op->linear;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return (linear ? gimp_operation_lch_hue_process_pixels_linear :
+  return (layer_mode->linear ? gimp_operation_lch_hue_process_pixels_linear :
                    gimp_operation_lch_hue_process_pixels)
-    (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, level);
+    (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);
 }
 
 static void
@@ -125,14 +123,17 @@ hue_pre_process (const Babl   *from_fish,
 
 /* XXX: this should be removed along with _pre_process */
 gboolean
-gimp_operation_lch_hue_process_pixels (gfloat              *in,
-                                       gfloat              *layer,
-                                       gfloat              *mask,
-                                       gfloat              *out,
-                                       gfloat               opacity,
-                                       glong                samples,
-                                       const GeglRectangle *roi,
-                                       gint                 level)
+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)
 {
   static const Babl *from_fish = NULL;
   static const Babl *to_fish = NULL;
@@ -150,21 +151,19 @@ gimp_operation_lch_hue_process_pixels (gfloat              *in,
 
 
 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)
+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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_LAB,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_lch_hue
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples, blend_trc,
+                        composite_trc, composite_mode, blendfun_lch_hue);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationlchhue.h 
b/app/operations/layer-modes/gimpoperationlchhue.h
index 99472b7..7edf1e5 100644
--- a/app/operations/layer-modes/gimpoperationlchhue.h
+++ b/app/operations/layer-modes/gimpoperationlchhue.h
@@ -58,7 +58,10 @@ gboolean gimp_operation_lch_hue_process_pixels_linear (gfloat              *in,
                                                        gfloat               opacity,
                                                        glong                samples,
                                                        const GeglRectangle *roi,
-                                                       gint                 level);
+                                                       gint                 level,
+                                                       GimpLayerBlendTRC    blend_trc, 
+                                                       GimpLayerBlendTRC    composite_trc,
+                                                       GimpLayerCompositeMode composite_mode);
 
 gboolean gimp_operation_lch_hue_process_pixels        (gfloat              *in,
                                                        gfloat              *layer,
@@ -67,7 +70,9 @@ gboolean gimp_operation_lch_hue_process_pixels        (gfloat              *in,
                                                        gfloat               opacity,
                                                        glong                samples,
                                                        const GeglRectangle *roi,
-                                                       gint                 level);
-
+                                                       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.c 
b/app/operations/layer-modes/gimpoperationlchlightness.c
index c9bc3b5..6cd1e7f 100644
--- a/app/operations/layer-modes/gimpoperationlchlightness.c
+++ b/app/operations/layer-modes/gimpoperationlchlightness.c
@@ -78,13 +78,9 @@ gimp_operation_lch_lightness_process (GeglOperation       *operation,
                                       const GeglRectangle *roi,
                                       gint                 level)
 {
-  GimpOperationPointLayerMode *gimp_op = GIMP_OPERATION_POINT_LAYER_MODE (operation);
-  gfloat                       opacity = gimp_op->opacity;
-  gboolean                     linear  = gimp_op->linear;
-
-  return (linear ? gimp_operation_lch_lightness_process_pixels_linear :
-                   gimp_operation_lch_lightness_process_pixels)
-    (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, level);
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
+  return (layer_mode->linear ? gimp_operation_lch_lightness_process_pixels_linear : 
gimp_operation_lch_lightness_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);
 }
 
 static void
@@ -110,14 +106,17 @@ lightness_pre_process (const Babl   *from_fish_la,
 
 /* XXX: this should be remove along with _pre_process */
 gboolean
-gimp_operation_lch_lightness_process_pixels (gfloat              *in,
-                                             gfloat              *layer,
-                                             gfloat              *mask,
-                                             gfloat              *out,
-                                             gfloat               opacity,
-                                             glong                samples,
-                                             const GeglRectangle *roi,
-                                             gint                 level)
+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)
 {
   static const Babl *from_fish_laba = NULL;
   static const Babl *from_fish_la = NULL;
@@ -139,21 +138,19 @@ gimp_operation_lch_lightness_process_pixels (gfloat              *in,
 
 
 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)
+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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_LAB,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_lch_lightness
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples,
+     blend_trc, composite_trc, composite_mode, blendfun_lch_lightness);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationlchlightness.h 
b/app/operations/layer-modes/gimpoperationlchlightness.h
index 7af7797..4b97610 100644
--- a/app/operations/layer-modes/gimpoperationlchlightness.h
+++ b/app/operations/layer-modes/gimpoperationlchlightness.h
@@ -58,7 +58,10 @@ gboolean gimp_operation_lch_lightness_process_pixels_linear (gfloat
                                                              gfloat               opacity,
                                                              glong                samples,
                                                              const GeglRectangle *roi,
-                                                             gint                 level);
+                                                             gint                 level,
+                                                             GimpLayerBlendTRC    blend_trc, 
+                                                             GimpLayerBlendTRC    composite_trc,
+                                                             GimpLayerCompositeMode composite_mode);
 
 gboolean gimp_operation_lch_lightness_process_pixels        (gfloat              *in,
                                                              gfloat              *layer,
@@ -67,7 +70,10 @@ gboolean gimp_operation_lch_lightness_process_pixels        (gfloat
                                                              gfloat               opacity,
                                                              glong                samples,
                                                              const GeglRectangle *roi,
-                                                             gint                 level);
+                                                             gint                 level,
+                                                             GimpLayerBlendTRC    blend_trc, 
+                                                             GimpLayerBlendTRC    composite_trc,
+                                                             GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_LCH_LIGHTNESS_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlightenonly.c 
b/app/operations/layer-modes/gimpoperationlightenonly.c
index a67e7f0..55d8c33 100644
--- a/app/operations/layer-modes/gimpoperationlightenonly.c
+++ b/app/operations/layer-modes/gimpoperationlightenonly.c
@@ -75,27 +75,25 @@ gimp_operation_lighten_only_process (GeglOperation       *operation,
                                      const GeglRectangle *roi,
                                      gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_lighten_only_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, 
roi, level);
+  return gimp_operation_lighten_only_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
-gimp_operation_lighten_only_process_pixels (gfloat              *in,
-                                            gfloat              *layer,
-                                            gfloat              *mask,
-                                            gfloat              *out,
-                                            gfloat               opacity,
-                                            glong                samples,
-                                            const GeglRectangle *roi,
-                                            gint                 level)
+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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_lighten_only
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples,
+     blend_trc, composite_trc, composite_mode, blendfun_lighten_only);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationlightenonly.h 
b/app/operations/layer-modes/gimpoperationlightenonly.h
index 6e4cea6..6c18e99 100644
--- a/app/operations/layer-modes/gimpoperationlightenonly.h
+++ b/app/operations/layer-modes/gimpoperationlightenonly.h
@@ -57,7 +57,10 @@ gboolean gimp_operation_lighten_only_process_pixels (gfloat              *in,
                                                      gfloat               opacity,
                                                      glong                samples,
                                                      const GeglRectangle *roi,
-                                                     gint                 level);
+                                                     gint                 level,
+                                                     GimpLayerBlendTRC    blend_trc, 
+                                                     GimpLayerBlendTRC    composite_trc,
+                                                     GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_LIGHTEN_ONLY_H__ */
diff --git a/app/operations/layer-modes/gimpoperationmultiply.c 
b/app/operations/layer-modes/gimpoperationmultiply.c
index 4367062..eb0532f 100644
--- a/app/operations/layer-modes/gimpoperationmultiply.c
+++ b/app/operations/layer-modes/gimpoperationmultiply.c
@@ -75,27 +75,25 @@ gimp_operation_multiply_process (GeglOperation       *operation,
                                  const GeglRectangle *roi,
                                  gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_multiply_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, 
level);
+  return gimp_operation_multiply_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
-gimp_operation_multiply_process_pixels (gfloat              *in,
-                                        gfloat              *layer,
-                                        gfloat              *mask,
-                                        gfloat              *out,
-                                        gfloat               opacity,
-                                        glong                samples,
-                                        const GeglRectangle *roi,
-                                        gint                 level)
+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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_RGB_PERCEPTUAL,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_multiply
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples,
+     blend_trc, composite_trc, composite_mode, blendfun_multiply);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationmultiply.h 
b/app/operations/layer-modes/gimpoperationmultiply.h
index 4417e84..2d2bffa 100644
--- a/app/operations/layer-modes/gimpoperationmultiply.h
+++ b/app/operations/layer-modes/gimpoperationmultiply.h
@@ -57,7 +57,10 @@ gboolean gimp_operation_multiply_process_pixels (gfloat              *in,
                                                  gfloat               opacity,
                                                  glong                samples,
                                                  const GeglRectangle *roi,
-                                                 gint                 level);
+                                                 gint                 level,
+                                                 GimpLayerBlendTRC    blend_trc, 
+                                                 GimpLayerBlendTRC    composite_trc,
+                                                 GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_MULTIPLY_H__ */
diff --git a/app/operations/layer-modes/gimpoperationnormal-sse2.c 
b/app/operations/layer-modes/gimpoperationnormal-sse2.c
index de69a53..065dcc4 100644
--- a/app/operations/layer-modes/gimpoperationnormal-sse2.c
+++ b/app/operations/layer-modes/gimpoperationnormal-sse2.c
@@ -32,21 +32,26 @@
 #include <emmintrin.h>
 
 gboolean
-gimp_operation_normal_process_pixels_sse2 (gfloat              *in,
-                                           gfloat              *aux,
-                                           gfloat              *mask,
-                                           gfloat              *out,
-                                           gfloat               opacity,
-                                           glong                samples,
-                                           const GeglRectangle *roi,
-                                           gint                 level)
+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)
 {
   /* check alignment */
   if ((((uintptr_t)in) | ((uintptr_t)aux) | ((uintptr_t)out)) & 0x0F)
     {
       return gimp_operation_normal_process_pixels_core (in, aux, mask, out,
                                                         opacity, samples,
-                                                        roi, level);
+                                                        roi, level, blend_trc,
+                                                        composite_trc,
+                                                        composite_mode);
     }
   else
     {
diff --git a/app/operations/layer-modes/gimpoperationnormal-sse4.c 
b/app/operations/layer-modes/gimpoperationnormal-sse4.c
index 29e33c4..502d3a5 100644
--- a/app/operations/layer-modes/gimpoperationnormal-sse4.c
+++ b/app/operations/layer-modes/gimpoperationnormal-sse4.c
@@ -32,21 +32,26 @@
 #include <smmintrin.h>
 
 gboolean
-gimp_operation_normal_process_pixels_sse4 (gfloat              *in,
-                                           gfloat              *aux,
-                                           gfloat              *mask,
-                                           gfloat              *out,
-                                           gfloat               opacity,
-                                           glong                samples,
-                                           const GeglRectangle *roi,
-                                           gint                 level)
+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)
 {
   /* check alignment */
   if ((((uintptr_t)in) | ((uintptr_t)aux) | ((uintptr_t)out)) & 0x0F)
     {
       return gimp_operation_normal_process_pixels_core (in, aux, mask, out,
                                                         opacity, samples,
-                                                        roi, level);
+                                                        roi, level, blend_trc,
+                                                        composite_trc,
+                                                        composite_mode);
     }
   else
     {
diff --git a/app/operations/layer-modes/gimpoperationnormal.c 
b/app/operations/layer-modes/gimpoperationnormal.c
index e492000..da9f5d4 100644
--- a/app/operations/layer-modes/gimpoperationnormal.c
+++ b/app/operations/layer-modes/gimpoperationnormal.c
@@ -173,20 +173,22 @@ gimp_operation_normal_process (GeglOperation       *operation,
                                const GeglRectangle *roi,
                                gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
-
-  return gimp_operation_normal_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, 
level);
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
+  return gimp_operation_normal_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
-gimp_operation_normal_process_pixels_core (gfloat              *in,
-                                           gfloat              *aux,
-                                           gfloat              *mask,
-                                           gfloat              *out,
-                                           gfloat               opacity,
-                                           glong                samples,
-                                           const GeglRectangle *roi,
-                                           gint                 level)
+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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes/gimpoperationnormal.h 
b/app/operations/layer-modes/gimpoperationnormal.h
index 1b8e401..f767ec6 100644
--- a/app/operations/layer-modes/gimpoperationnormal.h
+++ b/app/operations/layer-modes/gimpoperationnormal.h
@@ -58,7 +58,10 @@ gboolean gimp_operation_normal_process_pixels_core (gfloat              *in,
                                                     gfloat               opacity,
                                                     glong                samples,
                                                     const GeglRectangle *roi,
-                                                    gint                 level);
+                                                    gint                 level,
+                                                    GimpLayerBlendTRC    blend_trc, 
+                                                    GimpLayerBlendTRC    composite_trc,
+                                                    GimpLayerCompositeMode composite_mode);
 
 gboolean gimp_operation_normal_process_pixels_sse2 (gfloat              *in,
                                                     gfloat              *aux,
@@ -67,7 +70,10 @@ gboolean gimp_operation_normal_process_pixels_sse2 (gfloat              *in,
                                                     gfloat               opacity,
                                                     glong                samples,
                                                     const GeglRectangle *roi,
-                                                    gint                 level);
+                                                    gint                 level,
+                                                    GimpLayerBlendTRC    blend_trc, 
+                                                    GimpLayerBlendTRC    composite_trc,
+                                                    GimpLayerCompositeMode composite_mode);
 
 gboolean gimp_operation_normal_process_pixels_sse4 (gfloat              *in,
                                                     gfloat              *aux,
@@ -76,7 +82,10 @@ gboolean gimp_operation_normal_process_pixels_sse4 (gfloat              *in,
                                                     gfloat               opacity,
                                                     glong                samples,
                                                     const GeglRectangle *roi,
-                                                    gint                 level);
+                                                    gint                 level,
+                                                    GimpLayerBlendTRC    blend_trc, 
+                                                    GimpLayerBlendTRC    composite_trc,
+                                                    GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_NORMAL_H__ */
diff --git a/app/operations/layer-modes/gimpoperationoverlay.c 
b/app/operations/layer-modes/gimpoperationoverlay.c
index 34229a7..e674f0e 100644
--- a/app/operations/layer-modes/gimpoperationoverlay.c
+++ b/app/operations/layer-modes/gimpoperationoverlay.c
@@ -74,28 +74,26 @@ gimp_operation_overlay_process (GeglOperation       *operation,
                                 const GeglRectangle *roi,
                                 gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_overlay_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, 
level);
+  return gimp_operation_overlay_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
-gimp_operation_overlay_process_pixels (gfloat              *in,
-                                       gfloat              *layer,
-                                       gfloat              *mask,
-                                       gfloat              *out,
-                                       gfloat               opacity,
-                                       glong                samples,
-                                       const GeglRectangle *roi,
-                                       gint                 level)
+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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_RGB_PERCEPTUAL,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_overlay
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples, blend_trc,
+                        composite_trc, composite_mode, blendfun_overlay);
   return TRUE;
 }
 
diff --git a/app/operations/layer-modes/gimpoperationoverlay.h 
b/app/operations/layer-modes/gimpoperationoverlay.h
index d31f01d..c92d8bf 100644
--- a/app/operations/layer-modes/gimpoperationoverlay.h
+++ b/app/operations/layer-modes/gimpoperationoverlay.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_overlay_process_pixels (gfloat              *in,
                                                 gfloat               opacity,
                                                 glong                samples,
                                                 const GeglRectangle *roi,
-                                                gint                 level);
+                                                gint                 level,
+                                                GimpLayerBlendTRC    blend_trc, 
+                                                GimpLayerBlendTRC    composite_trc,
+                                                GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_OVERLAY_H__ */
diff --git a/app/operations/layer-modes/gimpoperationpointlayermode.h 
b/app/operations/layer-modes/gimpoperationpointlayermode.h
index 80600a5..27d086a 100644
--- a/app/operations/layer-modes/gimpoperationpointlayermode.h
+++ b/app/operations/layer-modes/gimpoperationpointlayermode.h
@@ -104,15 +104,15 @@ gimp_operation_layer_composite (const gfloat *in,
 
 
 static inline void
-gimp_composite_blend (gfloat              *in,
-                      gfloat              *layer,
-                      gfloat              *mask,
-                      gfloat              *out,
-                      gfloat               opacity,
-                      glong                samples,
-                      GimpBlendBlend       blend_trc,
-                      GimpBlendBlend       composite_trc,
-                      GimpLayerComposite   composite_mode,
+gimp_composite_blend (gfloat                *in,
+                      gfloat                *layer,
+                      gfloat                *mask,
+                      gfloat                *out,
+                      gfloat                 opacity,
+                      glong                  samples,
+                      GimpLayerBlendTRC      blend_trc,
+                      GimpLayerBlendTRC      composite_trc,
+                      GimpLayerCompositeMode composite_mode,
                       void (*blendfun) (const float *dst,
                                         const float *src,
                                               float *out,
diff --git a/app/operations/layer-modes/gimpoperationreplace.c 
b/app/operations/layer-modes/gimpoperationreplace.c
index 93c895b..12450ce 100644
--- a/app/operations/layer-modes/gimpoperationreplace.c
+++ b/app/operations/layer-modes/gimpoperationreplace.c
@@ -73,20 +73,23 @@ gimp_operation_replace_process (GeglOperation       *operation,
                                 const GeglRectangle *roi,
                                 gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_replace_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, 
level);
+  return gimp_operation_replace_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
-gimp_operation_replace_process_pixels (gfloat              *in,
-                                       gfloat              *layer,
-                                       gfloat              *mask,
-                                       gfloat              *out,
-                                       gfloat               opacity,
-                                       glong                samples,
-                                       const GeglRectangle *roi,
-                                       gint                 level)
+gimp_operation_replace_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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes/gimpoperationreplace.h 
b/app/operations/layer-modes/gimpoperationreplace.h
index 5747bcb..ad34751 100644
--- a/app/operations/layer-modes/gimpoperationreplace.h
+++ b/app/operations/layer-modes/gimpoperationreplace.h
@@ -49,14 +49,17 @@ struct _GimpOperationReplaceClass
 
 GType    gimp_operation_replace_get_type       (void) G_GNUC_CONST;
 
-gboolean gimp_operation_replace_process_pixels (gfloat              *in,
-                                                gfloat              *layer,
-                                                gfloat              *mask,
-                                                gfloat              *out,
-                                                gfloat               opacity,
-                                                glong                samples,
-                                                const GeglRectangle *roi,
-                                                gint                 level);
+gboolean gimp_operation_replace_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_REPLACE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationscreen.c 
b/app/operations/layer-modes/gimpoperationscreen.c
index 2c1451f..90881be 100644
--- a/app/operations/layer-modes/gimpoperationscreen.c
+++ b/app/operations/layer-modes/gimpoperationscreen.c
@@ -76,27 +76,25 @@ gimp_operation_screen_process (GeglOperation       *operation,
                                const GeglRectangle *roi,
                                gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
-  return gimp_operation_screen_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, 
level);
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
+  return gimp_operation_screen_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
-gimp_operation_screen_process_pixels (gfloat              *in,
-                                      gfloat              *layer,
-                                      gfloat              *mask,
-                                      gfloat              *out,
-                                      gfloat               opacity,
-                                      glong                samples,
-                                      const GeglRectangle *roi,
-                                      gint                 level)
+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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_RGB_PERCEPTUAL,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_screen
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples,
+               blend_trc, composite_trc, composite_mode, blendfun_screen);
   return TRUE;
 }
 
diff --git a/app/operations/layer-modes/gimpoperationscreen.h 
b/app/operations/layer-modes/gimpoperationscreen.h
index 200f679..2bcb964 100644
--- a/app/operations/layer-modes/gimpoperationscreen.h
+++ b/app/operations/layer-modes/gimpoperationscreen.h
@@ -56,7 +56,10 @@ gboolean gimp_operation_screen_process_pixels (gfloat              *in,
                                                gfloat               opacity,
                                                glong                samples,
                                                const GeglRectangle *roi,
-                                               gint                 level);
+                                               gint                 level,
+                                               GimpLayerBlendTRC    blend_trc, 
+                                               GimpLayerBlendTRC    composite_trc,
+                                               GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_SCREEN_H__ */
diff --git a/app/operations/layer-modes/gimpoperationsoftlight.c 
b/app/operations/layer-modes/gimpoperationsoftlight.c
index 3020acd..09f3085 100644
--- a/app/operations/layer-modes/gimpoperationsoftlight.c
+++ b/app/operations/layer-modes/gimpoperationsoftlight.c
@@ -92,27 +92,24 @@ gimp_operation_softlight_process (GeglOperation       *operation,
                                   const GeglRectangle *roi,
                                   gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
-
-  return gimp_operation_softlight_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, 
level);
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
+  return gimp_operation_softlight_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
-gimp_operation_softlight_process_pixels (gfloat              *in,
-                                         gfloat              *layer,
-                                         gfloat              *mask,
-                                         gfloat              *out,
-                                         gfloat               opacity,
-                                         glong                samples,
-                                         const GeglRectangle *roi,
-                                         gint                 level)
+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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_RGB_PERCEPTUAL,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_softlight
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples,
+     blend_trc, composite_trc, composite_mode, blendfun_softlight);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationsoftlight.h 
b/app/operations/layer-modes/gimpoperationsoftlight.h
index 9456095..52162e7 100644
--- a/app/operations/layer-modes/gimpoperationsoftlight.h
+++ b/app/operations/layer-modes/gimpoperationsoftlight.h
@@ -56,7 +56,9 @@ gboolean gimp_operation_softlight_process_pixels (gfloat              *in,
                                                   gfloat               opacity,
                                                   glong                samples,
                                                   const GeglRectangle *roi,
-                                                  gint                 level);
-
+                                                  gint                 level,
+                                                  GimpLayerBlendTRC    blend_trc, 
+                                                  GimpLayerBlendTRC    composite_trc,
+                                                  GimpLayerCompositeMode composite_mode);
 
 #endif /* __GIMP_OPERATION_SOFTLIGHT_H__ */
diff --git a/app/operations/layer-modes/gimpoperationsubtract.c 
b/app/operations/layer-modes/gimpoperationsubtract.c
index 90ade4e..e8a1ade 100644
--- a/app/operations/layer-modes/gimpoperationsubtract.c
+++ b/app/operations/layer-modes/gimpoperationsubtract.c
@@ -75,27 +75,25 @@ gimp_operation_subtract_process (GeglOperation       *operation,
                                  const GeglRectangle *roi,
                                  gint                 level)
 {
-  gfloat opacity = GIMP_OPERATION_POINT_LAYER_MODE (operation)->opacity;
+  GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
 
-  return gimp_operation_subtract_process_pixels (in_buf, aux_buf, aux2_buf, out_buf, opacity, samples, roi, 
level);
+  return gimp_operation_subtract_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
-gimp_operation_subtract_process_pixels (gfloat              *in,
-                                        gfloat              *layer,
-                                        gfloat              *mask,
-                                        gfloat              *out,
-                                        gfloat               opacity,
-                                        glong                samples,
-                                        const GeglRectangle *roi,
-                                        gint                 level)
+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)
 {
-  gimp_composite_blend (
-     in, layer, mask, out, opacity, samples,
-     GIMP_LAYER_BLEND_RGB_PERCEPTUAL,
-     GIMP_LAYER_BLEND_RGB_LINEAR,
-     GIMP_LAYER_COMPOSITE_SRC_ATOP,
-     blendfun_subtract
-     );
+  gimp_composite_blend (in, layer, mask, out, opacity, samples, blend_trc,
+                        composite_trc, composite_mode, blendfun_subtract);
   return TRUE;
 }
diff --git a/app/operations/layer-modes/gimpoperationsubtract.h 
b/app/operations/layer-modes/gimpoperationsubtract.h
index 23c656a..11ae47a 100644
--- a/app/operations/layer-modes/gimpoperationsubtract.h
+++ b/app/operations/layer-modes/gimpoperationsubtract.h
@@ -57,7 +57,10 @@ gboolean gimp_operation_subtract_process_pixels (gfloat              *in,
                                                  gfloat               opacity,
                                                  glong                samples,
                                                  const GeglRectangle *roi,
-                                                 gint                 level);
+                                                 gint                 level,
+                                                 GimpLayerBlendTRC    blend_trc, 
+                                                 GimpLayerBlendTRC    composite_trc,
+                                                 GimpLayerCompositeMode composite_mode);
 
 
 #endif /* __GIMP_OPERATION_SUBTRACT_H__ */
diff --git a/app/operations/operations-types.h b/app/operations/operations-types.h
index ad5088d..8068d07 100644
--- a/app/operations/operations-types.h
+++ b/app/operations/operations-types.h
@@ -55,14 +55,17 @@ typedef struct _GimpCagePoint                   GimpCagePoint;
 
 /*  functions  */
 
-typedef gboolean (* GimpLayerModeFunc) (gfloat              *in,
-                                        gfloat              *aux,
-                                        gfloat              *mask,
-                                        gfloat              *out,
-                                        gfloat               opacity,
-                                        glong                samples,
-                                        const GeglRectangle *roi,
-                                        gint                 level);
+typedef gboolean (* GimpLayerModeFunc) (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);
 
 typedef  void    (* GimpBlendFunc)     (const float         *dest,
                                         const float         *src,
diff --git a/app/paint/gimppaintcore-loops.c b/app/paint/gimppaintcore-loops.c
index 8ab5e27..79028b6 100644
--- a/app/paint/gimppaintcore-loops.c
+++ b/app/paint/gimppaintcore-loops.c
@@ -297,6 +297,8 @@ do_layer_blend (GeglBuffer    *src_buffer,
                 gboolean       linear_mode,
                 GimpLayerMode  paint_mode)
 {
+  GimpLayerBlendTRC   blend_trc = GIMP_LAYER_BLEND_RGB_PERCEPTUAL;//XXX
+  GimpLayerBlendTRC   composite_trc = GIMP_LAYER_BLEND_RGB_LINEAR;//placeholders
   GeglRectangle       roi;
   GeglRectangle       mask_roi;
   GeglRectangle       process_roi;
@@ -366,7 +368,9 @@ do_layer_blend (GeglBuffer    *src_buffer,
                          opacity,
                          iter->roi[0].width,
                          &process_roi,
-                         0);
+                         0,
+                         blend_trc,
+                         composite_trc);
 
           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]