[gimp/pippin/linear-is-the-new-black: 9/19] app: add TRC args to GimpBlendFunc



commit 4830c5b12c76b3638c03a45c3f9d6df7895596b1
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue Jan 17 19:54:30 2017 +0100

    app: add TRC args to GimpBlendFunc

 .../gimpoperationadditionlegacy.c                  |    8 ++++--
 .../gimpoperationadditionlegacy.h                  |    4 ++-
 .../layer-modes-legacy/gimpoperationburnlegacy.c   |    8 ++++--
 .../layer-modes-legacy/gimpoperationburnlegacy.h   |    4 ++-
 .../gimpoperationdarkenonlylegacy.c                |    8 ++++--
 .../gimpoperationdarkenonlylegacy.h                |    4 ++-
 .../gimpoperationdifferencelegacy.c                |    8 ++++--
 .../gimpoperationdifferencelegacy.h                |    4 ++-
 .../layer-modes-legacy/gimpoperationdividelegacy.c |    8 ++++--
 .../layer-modes-legacy/gimpoperationdividelegacy.h |    4 ++-
 .../layer-modes-legacy/gimpoperationdodgelegacy.c  |    8 ++++--
 .../layer-modes-legacy/gimpoperationdodgelegacy.h  |    4 ++-
 .../gimpoperationgrainextractlegacy.c              |    8 ++++--
 .../gimpoperationgrainextractlegacy.h              |    4 ++-
 .../gimpoperationgrainmergelegacy.c                |    8 ++++--
 .../gimpoperationgrainmergelegacy.h                |    4 ++-
 .../gimpoperationhardlightlegacy.c                 |    8 ++++--
 .../gimpoperationhardlightlegacy.h                 |    4 ++-
 .../gimpoperationhsvcolorlegacy.c                  |    8 ++++--
 .../gimpoperationhsvcolorlegacy.h                  |    4 ++-
 .../layer-modes-legacy/gimpoperationhsvhuelegacy.c |    8 ++++--
 .../layer-modes-legacy/gimpoperationhsvhuelegacy.h |    5 +++-
 .../gimpoperationhsvsaturationlegacy.c             |    8 ++++--
 .../gimpoperationhsvsaturationlegacy.h             |    4 ++-
 .../gimpoperationhsvvaluelegacy.c                  |    8 ++++--
 .../gimpoperationhsvvaluelegacy.h                  |    4 ++-
 .../gimpoperationlightenonlylegacy.c               |    8 ++++--
 .../gimpoperationlightenonlylegacy.h               |    4 ++-
 .../gimpoperationmultiplylegacy.c                  |    8 ++++--
 .../gimpoperationmultiplylegacy.h                  |    5 ++-
 .../layer-modes-legacy/gimpoperationscreenlegacy.c |    8 ++++--
 .../layer-modes-legacy/gimpoperationscreenlegacy.h |    4 ++-
 .../gimpoperationsoftlightlegacy.c                 |    9 ++++---
 .../gimpoperationsoftlightlegacy.h                 |    4 ++-
 .../gimpoperationsubtractlegacy.c                  |    8 ++++--
 .../gimpoperationsubtractlegacy.h                  |    4 ++-
 app/operations/layer-modes/gimpoperationaddition.c |   10 ++++++--
 app/operations/layer-modes/gimpoperationaddition.h |    4 ++-
 .../layer-modes/gimpoperationantierase.c           |    8 ++++--
 .../layer-modes/gimpoperationantierase.h           |    4 ++-
 app/operations/layer-modes/gimpoperationbehind.c   |    8 ++++--
 app/operations/layer-modes/gimpoperationbehind.h   |    4 ++-
 app/operations/layer-modes/gimpoperationburn.c     |   10 +++++---
 app/operations/layer-modes/gimpoperationburn.h     |    4 ++-
 .../layer-modes/gimpoperationcolorerase.c          |    8 ++++--
 .../layer-modes/gimpoperationcolorerase.h          |    4 ++-
 .../layer-modes/gimpoperationdarkenonly.c          |    8 ++++--
 .../layer-modes/gimpoperationdarkenonly.h          |    4 ++-
 .../layer-modes/gimpoperationdifference.c          |    8 ++++--
 .../layer-modes/gimpoperationdifference.h          |    4 ++-
 app/operations/layer-modes/gimpoperationdissolve.c |   22 ++++++++++---------
 app/operations/layer-modes/gimpoperationdissolve.h |    4 ++-
 app/operations/layer-modes/gimpoperationdivide.c   |    8 ++++--
 app/operations/layer-modes/gimpoperationdivide.h   |    4 ++-
 app/operations/layer-modes/gimpoperationdodge.c    |    8 ++++--
 app/operations/layer-modes/gimpoperationdodge.h    |    4 ++-
 app/operations/layer-modes/gimpoperationerase.c    |    8 ++++--
 app/operations/layer-modes/gimpoperationerase.h    |    4 ++-
 .../layer-modes/gimpoperationgrainextract.c        |    9 ++++---
 .../layer-modes/gimpoperationgrainextract.h        |    4 ++-
 .../layer-modes/gimpoperationgrainmerge.c          |    9 ++++---
 .../layer-modes/gimpoperationgrainmerge.h          |    4 ++-
 .../layer-modes/gimpoperationhardlight.c           |    8 ++++--
 .../layer-modes/gimpoperationhardlight.h           |    4 ++-
 app/operations/layer-modes/gimpoperationhsvcolor.c |    8 ++++--
 app/operations/layer-modes/gimpoperationhsvcolor.h |    4 ++-
 app/operations/layer-modes/gimpoperationhsvhue.c   |    8 ++++--
 app/operations/layer-modes/gimpoperationhsvhue.h   |    4 ++-
 .../layer-modes/gimpoperationhsvsaturation.c       |    9 ++++---
 .../layer-modes/gimpoperationhsvsaturation.h       |    4 ++-
 app/operations/layer-modes/gimpoperationhsvvalue.c |    9 ++++---
 app/operations/layer-modes/gimpoperationhsvvalue.h |    4 ++-
 .../layer-modes/gimpoperationlchchroma.c           |   10 ++++++--
 .../layer-modes/gimpoperationlchchroma.h           |    8 +++++-
 app/operations/layer-modes/gimpoperationlchcolor.c |   14 +++++++-----
 app/operations/layer-modes/gimpoperationlchcolor.h |    8 +++++-
 app/operations/layer-modes/gimpoperationlchhue.c   |   16 ++++++++------
 app/operations/layer-modes/gimpoperationlchhue.h   |    9 +++++--
 .../layer-modes/gimpoperationlchlightness.c        |   17 ++++++++-------
 .../layer-modes/gimpoperationlchlightness.h        |    8 +++++-
 .../layer-modes/gimpoperationlightenonly.c         |    8 ++++--
 .../layer-modes/gimpoperationlightenonly.h         |    4 ++-
 app/operations/layer-modes/gimpoperationmultiply.c |    8 ++++--
 app/operations/layer-modes/gimpoperationmultiply.h |    4 ++-
 .../layer-modes/gimpoperationnormal-sse2.c         |    6 +++-
 .../layer-modes/gimpoperationnormal-sse4.c         |    7 ++++-
 app/operations/layer-modes/gimpoperationnormal.c   |    9 ++++---
 app/operations/layer-modes/gimpoperationnormal.h   |   12 ++++++++--
 app/operations/layer-modes/gimpoperationoverlay.c  |    8 ++++--
 app/operations/layer-modes/gimpoperationoverlay.h  |    4 ++-
 app/operations/layer-modes/gimpoperationreplace.c  |    8 ++++--
 app/operations/layer-modes/gimpoperationreplace.h  |    4 ++-
 app/operations/layer-modes/gimpoperationscreen.c   |    8 ++++--
 app/operations/layer-modes/gimpoperationscreen.h   |    4 ++-
 .../layer-modes/gimpoperationsoftlight.c           |    9 ++++---
 .../layer-modes/gimpoperationsoftlight.h           |    5 ++-
 app/operations/layer-modes/gimpoperationsubtract.c |    8 ++++--
 app/operations/layer-modes/gimpoperationsubtract.h |    4 ++-
 app/operations/operations-types.h                  |    4 ++-
 app/paint/gimppaintcore-loops.c                    |    6 ++++-
 100 files changed, 443 insertions(+), 234 deletions(-)
---
diff --git a/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.c 
b/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.c
index 0fcb0a7..31feaf5 100644
--- a/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.c
@@ -74,9 +74,9 @@ 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);
 }
 
 gboolean
@@ -87,7 +87,9 @@ 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)
 {
   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..a56aaf1 100644
--- a/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.h
@@ -56,7 +56,9 @@ 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);
 
 
 #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..760dbd5 100644
--- a/app/operations/layer-modes-legacy/gimpoperationburnlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationburnlegacy.c
@@ -74,9 +74,9 @@ 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);
 }
 
 gboolean
@@ -87,7 +87,9 @@ 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)
 {
   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..1ee5cad 100644
--- a/app/operations/layer-modes-legacy/gimpoperationburnlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationburnlegacy.h
@@ -56,7 +56,9 @@ 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);
 
 
 #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..7c3b029 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.c
@@ -74,9 +74,9 @@ 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);
 }
 
 gboolean
@@ -87,7 +87,9 @@ gimp_operation_darken_only_legacy_process_pixels (gfloat              *in,
                                                 gfloat               opacity,
                                                 glong                samples,
                                                 const GeglRectangle *roi,
-                                                gint                 level)
+                                                gint                 level,
+                                                GimpLayerBlendTRC    blend_trc,
+                                                GimpLayerBlendTRC    composite_trc)
 {
   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..7e68cc8 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.h
@@ -56,7 +56,9 @@ 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);
 
 
 #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..6385954 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.c
@@ -74,9 +74,9 @@ 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);
 }
 
 gboolean
@@ -87,7 +87,9 @@ gimp_operation_difference_legacy_process_pixels (gfloat              *in,
                                                  gfloat               opacity,
                                                  glong                samples,
                                                  const GeglRectangle *roi,
-                                                 gint                 level)
+                                                 gint                 level,
+                                                 GimpLayerBlendTRC    blend_trc,
+                                                 GimpLayerBlendTRC    composite_trc)
 {
   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..26036f6 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.h
@@ -56,7 +56,9 @@ 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);
 
 
 #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..c00d307 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdividelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationdividelegacy.c
@@ -74,9 +74,9 @@ 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);
 }
 
 gboolean
@@ -87,7 +87,9 @@ 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)
 {
   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..40ad846 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdividelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationdividelegacy.h
@@ -56,7 +56,9 @@ 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);
 
 
 #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..34fcf8b 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.c
@@ -74,9 +74,9 @@ 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);
 }
 
 gboolean
@@ -87,7 +87,9 @@ 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)
 {
   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..60ff7a3 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.h
@@ -56,7 +56,9 @@ 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);
 
 
 #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..877625a 100644
--- a/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.c
@@ -74,9 +74,9 @@ 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);
 }
 
 gboolean
@@ -87,7 +87,9 @@ gimp_operation_grain_extract_legacy_process_pixels (gfloat              *in,
                                                     gfloat               opacity,
                                                     glong                samples,
                                                     const GeglRectangle *roi,
-                                                    gint                 level)
+                                                    gint                 level,
+                                                    GimpLayerBlendTRC    blend_trc,
+                                                    GimpLayerBlendTRC    composite_Trc)
 {
   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..5b6171e 100644
--- a/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.h
@@ -56,7 +56,9 @@ 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);
 
 
 #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..3248936 100644
--- a/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.c
@@ -74,9 +74,9 @@ 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);
 }
 
 gboolean
@@ -87,7 +87,9 @@ gimp_operation_grain_merge_legacy_process_pixels (gfloat              *in,
                                                   gfloat               opacity,
                                                   glong                samples,
                                                   const GeglRectangle *roi,
-                                                  gint                 level)
+                                                  gint                 level,
+                                                  GimpLayerBlendTRC    blend_trc,
+                                                  GimpLayerBlendTRC    composite_trc)
 {
   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..534994b 100644
--- a/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.h
@@ -56,7 +56,9 @@ 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);
 
 
 #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..fe12c16 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhardlightlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationhardlightlegacy.c
@@ -74,9 +74,9 @@ 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);
 }
 
 gboolean
@@ -87,7 +87,9 @@ 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)
 {
   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..9b3b2b3 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhardlightlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationhardlightlegacy.h
@@ -56,7 +56,9 @@ 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);
 
 
 #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..ff0766f 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvcolorlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvcolorlegacy.c
@@ -78,9 +78,9 @@ 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);
 }
 
 gboolean
@@ -91,7 +91,9 @@ 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)
 {
   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..a64e416 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvcolorlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvcolorlegacy.h
@@ -56,7 +56,9 @@ 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);
 
 
 #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..71a9c50 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.c
@@ -78,9 +78,9 @@ 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);
 }
 
 gboolean
@@ -91,7 +91,9 @@ 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)
 {
   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..fb64601 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.h
@@ -56,7 +56,10 @@ 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);
+
 
 
 #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..863386b 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.c
@@ -78,9 +78,9 @@ 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);
 }
 
 gboolean
@@ -91,7 +91,9 @@ gimp_operation_hsv_saturation_legacy_process_pixels (gfloat              *in,
                                                      gfloat               opacity,
                                                      glong                samples,
                                                      const GeglRectangle *roi,
-                                                     gint                 level)
+                                                     gint                 level,
+                                                     GimpLayerBlendTRC    blend_trc,
+                                                     GimpLayerBlendTRC    composite_trc)
 {
   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..85500e3 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.h
@@ -56,7 +56,9 @@ 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);
 
 
 #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..6bc97c4 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.c
@@ -78,9 +78,9 @@ 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);
 }
 
 gboolean
@@ -91,7 +91,9 @@ 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)
 {
   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..742b645 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.h
@@ -56,7 +56,9 @@ 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);
 
 
 #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..107cbd1 100644
--- a/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.c
@@ -74,9 +74,9 @@ 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);
 }
 
 gboolean
@@ -87,7 +87,9 @@ gimp_operation_lighten_only_legacy_process_pixels (gfloat              *in,
                                                    gfloat               opacity,
                                                    glong                samples,
                                                    const GeglRectangle *roi,
-                                                   gint                 level)
+                                                   gint                 level,
+                                                   GimpLayerBlendTRC    blend_trc,
+                                                   GimpLayerBlendTRC    composite_trc)
 {
   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..84d5050 100644
--- a/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.h
@@ -56,7 +56,9 @@ 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);
 
 
 #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..73ac367 100644
--- a/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.c
@@ -74,9 +74,9 @@ 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);
 }
 
 gboolean
@@ -87,7 +87,9 @@ 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)
 {
   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..df38c93 100644
--- a/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.h
@@ -56,7 +56,8 @@ 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);
 
 #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..0716fc4 100644
--- a/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.c
@@ -74,9 +74,9 @@ 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);
 }
 
 gboolean
@@ -87,7 +87,9 @@ 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)
 {
   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..4c11f9b 100644
--- a/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.h
@@ -56,7 +56,9 @@ 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);
 
 
 #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..dbd0053 100644
--- a/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.c
@@ -92,9 +92,8 @@ 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);
 }
 
 gboolean
@@ -105,7 +104,9 @@ 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)
 {
   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..9ccb1c7 100644
--- a/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.h
@@ -56,7 +56,9 @@ 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);
 
 
 #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..8a752b4 100644
--- a/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.c
@@ -74,9 +74,9 @@ 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);
 }
 
 gboolean
@@ -87,7 +87,9 @@ 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)
 {
   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..dbb5a37 100644
--- a/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.h
@@ -56,7 +56,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_SUBTRACT_LEGACY_H__ */
diff --git a/app/operations/layer-modes/gimpoperationaddition.c 
b/app/operations/layer-modes/gimpoperationaddition.c
index 0d6c2e6..fc71773 100644
--- a/app/operations/layer-modes/gimpoperationaddition.c
+++ b/app/operations/layer-modes/gimpoperationaddition.c
@@ -75,8 +75,10 @@ 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);
 }
 
 gboolean
@@ -87,7 +89,9 @@ gimp_operation_addition_process_pixels (gfloat              *in,
                                         gfloat               opacity,
                                         glong                samples,
                                         const GeglRectangle *roi,
-                                        gint                 level)
+                                        gint                 level,
+                                        GimpLayerBlendTRC    blend_trc,
+                                        GimpLayerBlendTRC    composite_trc)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationaddition.h 
b/app/operations/layer-modes/gimpoperationaddition.h
index f467b94..b376322 100644
--- a/app/operations/layer-modes/gimpoperationaddition.h
+++ b/app/operations/layer-modes/gimpoperationaddition.h
@@ -57,7 +57,9 @@ gboolean gimp_operation_addition_process_pixels (gfloat              *in,
                                                  gfloat               opacity,
                                                  glong                samples,
                                                  const GeglRectangle *roi,
-                                                 gint                 level);
+                                                 gint                 level,
+                                                 GimpLayerBlendTRC    blend_trc, 
+                                                 GimpLayerBlendTRC    composite_trc);
 
 
 #endif /* __GIMP_OPERATION_ADDITION_H__ */
diff --git a/app/operations/layer-modes/gimpoperationantierase.c 
b/app/operations/layer-modes/gimpoperationantierase.c
index fff71b1..85c4bc4 100644
--- a/app/operations/layer-modes/gimpoperationantierase.c
+++ b/app/operations/layer-modes/gimpoperationantierase.c
@@ -87,9 +87,9 @@ 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);
 }
 
 gboolean
@@ -100,7 +100,9 @@ gimp_operation_anti_erase_process_pixels (gfloat              *in,
                                           gfloat               opacity,
                                           glong                samples,
                                           const GeglRectangle *roi,
-                                          gint                 level)
+                                          gint                 level,
+                                          GimpLayerBlendTRC    blend_trc,
+                                          GimpLayerBlendTRC    composite_trc)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes/gimpoperationantierase.h 
b/app/operations/layer-modes/gimpoperationantierase.h
index d582792..4a81a2b 100644
--- a/app/operations/layer-modes/gimpoperationantierase.h
+++ b/app/operations/layer-modes/gimpoperationantierase.h
@@ -56,7 +56,9 @@ gboolean gimp_operation_anti_erase_process_pixels (gfloat              *in,
                                                    gfloat               opacity,
                                                    glong                samples,
                                                    const GeglRectangle *roi,
-                                                   gint                 level);
+                                                   gint                 level,
+                                                   GimpLayerBlendTRC    blend_trc, 
+                                                   GimpLayerBlendTRC    composite_trc);
 
 
 #endif /* __GIMP_OPERATION_ANTI_ERASE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationbehind.c 
b/app/operations/layer-modes/gimpoperationbehind.c
index 332c73a..435b3a6 100644
--- a/app/operations/layer-modes/gimpoperationbehind.c
+++ b/app/operations/layer-modes/gimpoperationbehind.c
@@ -74,9 +74,9 @@ 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);
 }
 
 gboolean
@@ -87,7 +87,9 @@ gimp_operation_behind_process_pixels (gfloat              *in,
                                       gfloat               opacity,
                                       glong                samples,
                                       const GeglRectangle *roi,
-                                      gint                 level)
+                                      gint                 level,
+                                      GimpLayerBlendTRC    blend_trc,
+                                      GimpLayerBlendTRC    composite_trc)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes/gimpoperationbehind.h 
b/app/operations/layer-modes/gimpoperationbehind.h
index 41c95b2..2aa387d 100644
--- a/app/operations/layer-modes/gimpoperationbehind.h
+++ b/app/operations/layer-modes/gimpoperationbehind.h
@@ -56,7 +56,9 @@ gboolean gimp_operation_behind_process_pixels (gfloat              *in,
                                                gfloat               opacity,
                                                glong                samples,
                                                const GeglRectangle *roi,
-                                               gint                 level);
+                                               gint                 level,
+                                               GimpLayerBlendTRC    blend_trc, 
+                                               GimpLayerBlendTRC    composite_trc);
 
 
 #endif /* __GIMP_OPERATION_BEHIND_H__ */
diff --git a/app/operations/layer-modes/gimpoperationburn.c b/app/operations/layer-modes/gimpoperationburn.c
index 3cffe69..7f56693 100644
--- a/app/operations/layer-modes/gimpoperationburn.c
+++ b/app/operations/layer-modes/gimpoperationburn.c
@@ -75,10 +75,10 @@ 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);
+} 
 
 
 gboolean
@@ -89,7 +89,9 @@ gimp_operation_burn_process_pixels (gfloat              *in,
                                     gfloat               opacity,
                                     glong                samples,
                                     const GeglRectangle *roi,
-                                    gint                 level)
+                                    gint                 level,
+                                    GimpLayerBlendTRC    blend_trc,
+                                    GimpLayerBlendTRC    composite_trc)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationburn.h b/app/operations/layer-modes/gimpoperationburn.h
index 8a1d605..46b4d69 100644
--- a/app/operations/layer-modes/gimpoperationburn.h
+++ b/app/operations/layer-modes/gimpoperationburn.h
@@ -57,7 +57,9 @@ gboolean gimp_operation_burn_process_pixels (gfloat              *in,
                                              gfloat               opacity,
                                              glong                samples,
                                              const GeglRectangle *roi,
-                                             gint                 level);
+                                             gint                 level,
+                                             GimpLayerBlendTRC    blend_trc, 
+                                             GimpLayerBlendTRC    composite_trc);
 
 
 #endif /* __GIMP_OPERATION_BURN_H__ */
diff --git a/app/operations/layer-modes/gimpoperationcolorerase.c 
b/app/operations/layer-modes/gimpoperationcolorerase.c
index 04e7533..a9d5084 100644
--- a/app/operations/layer-modes/gimpoperationcolorerase.c
+++ b/app/operations/layer-modes/gimpoperationcolorerase.c
@@ -78,9 +78,9 @@ 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);
 }
 
 gboolean
@@ -91,7 +91,9 @@ 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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes/gimpoperationcolorerase.h 
b/app/operations/layer-modes/gimpoperationcolorerase.h
index 8f3a8f4..8174e2a 100644
--- a/app/operations/layer-modes/gimpoperationcolorerase.h
+++ b/app/operations/layer-modes/gimpoperationcolorerase.h
@@ -56,7 +56,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_COLOR_ERASE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationdarkenonly.c 
b/app/operations/layer-modes/gimpoperationdarkenonly.c
index 0eae2d9..2e9aec5 100644
--- a/app/operations/layer-modes/gimpoperationdarkenonly.c
+++ b/app/operations/layer-modes/gimpoperationdarkenonly.c
@@ -75,9 +75,9 @@ 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);
 }
 
 gboolean
@@ -88,7 +88,9 @@ 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)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationdarkenonly.h 
b/app/operations/layer-modes/gimpoperationdarkenonly.h
index 578a0f2..dc5027d 100644
--- a/app/operations/layer-modes/gimpoperationdarkenonly.h
+++ b/app/operations/layer-modes/gimpoperationdarkenonly.h
@@ -57,7 +57,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_DARKEN_ONLY_H__ */
diff --git a/app/operations/layer-modes/gimpoperationdifference.c 
b/app/operations/layer-modes/gimpoperationdifference.c
index ae5d697..65d42da 100644
--- a/app/operations/layer-modes/gimpoperationdifference.c
+++ b/app/operations/layer-modes/gimpoperationdifference.c
@@ -75,9 +75,9 @@ 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);
 }
 
 gboolean
@@ -88,7 +88,9 @@ gimp_operation_difference_process_pixels (gfloat              *in,
                                           gfloat               opacity,
                                           glong                samples,
                                           const GeglRectangle *roi,
-                                          gint                 level)
+                                          gint                 level,
+                                          GimpLayerBlendTRC    blend_trc,
+                                          GimpLayerBlendTRC    composite_trc)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationdifference.h 
b/app/operations/layer-modes/gimpoperationdifference.h
index 72ed1e8..2ed21f7 100644
--- a/app/operations/layer-modes/gimpoperationdifference.h
+++ b/app/operations/layer-modes/gimpoperationdifference.h
@@ -58,7 +58,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_DIFFERENCE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationdissolve.c 
b/app/operations/layer-modes/gimpoperationdissolve.c
index 1476c17..ee3bf1a 100644
--- a/app/operations/layer-modes/gimpoperationdissolve.c
+++ b/app/operations/layer-modes/gimpoperationdissolve.c
@@ -90,20 +90,22 @@ 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);
 }
 
 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)
 {
   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..2f70aac 100644
--- a/app/operations/layer-modes/gimpoperationdissolve.h
+++ b/app/operations/layer-modes/gimpoperationdissolve.h
@@ -56,7 +56,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_DISSOLVE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationdivide.c 
b/app/operations/layer-modes/gimpoperationdivide.c
index 92014b0..9720ad3 100644
--- a/app/operations/layer-modes/gimpoperationdivide.c
+++ b/app/operations/layer-modes/gimpoperationdivide.c
@@ -75,9 +75,9 @@ 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);
 }
 
 gboolean
@@ -88,7 +88,9 @@ gimp_operation_divide_process_pixels (gfloat              *in,
                                       gfloat               opacity,
                                       glong                samples,
                                       const GeglRectangle *roi,
-                                      gint                 level)
+                                      gint                 level,
+                                      GimpLayerBlendTRC    blend_trc,
+                                      GimpLayerBlendTRC    composite_trc)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationdivide.h 
b/app/operations/layer-modes/gimpoperationdivide.h
index 39ead05..6653f58 100644
--- a/app/operations/layer-modes/gimpoperationdivide.h
+++ b/app/operations/layer-modes/gimpoperationdivide.h
@@ -57,7 +57,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_DIVIDE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationdodge.c b/app/operations/layer-modes/gimpoperationdodge.c
index 1097ece..8470f63 100644
--- a/app/operations/layer-modes/gimpoperationdodge.c
+++ b/app/operations/layer-modes/gimpoperationdodge.c
@@ -75,9 +75,9 @@ 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);
 }
 
 gboolean
@@ -88,7 +88,9 @@ gimp_operation_dodge_process_pixels (gfloat              *in,
                                      gfloat               opacity,
                                      glong                samples,
                                      const GeglRectangle *roi,
-                                     gint                 level)
+                                     gint                 level,
+                                     GimpLayerBlendTRC    blend_trc,
+                                     GimpLayerBlendTRC    composite_trc)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationdodge.h b/app/operations/layer-modes/gimpoperationdodge.h
index f6e98f4..5088e30 100644
--- a/app/operations/layer-modes/gimpoperationdodge.h
+++ b/app/operations/layer-modes/gimpoperationdodge.h
@@ -57,7 +57,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_DODGE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationerase.c b/app/operations/layer-modes/gimpoperationerase.c
index 138c2df..6f994eb 100644
--- a/app/operations/layer-modes/gimpoperationerase.c
+++ b/app/operations/layer-modes/gimpoperationerase.c
@@ -87,9 +87,9 @@ 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);
 }
 
 gboolean
@@ -100,7 +100,9 @@ gimp_operation_erase_process_pixels (gfloat              *in,
                                      gfloat               opacity,
                                      glong                samples,
                                      const GeglRectangle *roi,
-                                     gint                 level)
+                                     gint                 level,
+                                     GimpLayerBlendTRC    blend_trc,
+                                     GimpLayerBlendTRC    composite_trc)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes/gimpoperationerase.h b/app/operations/layer-modes/gimpoperationerase.h
index ae48749..999befd 100644
--- a/app/operations/layer-modes/gimpoperationerase.h
+++ b/app/operations/layer-modes/gimpoperationerase.h
@@ -56,7 +56,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_ERASE_MODE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationgrainextract.c 
b/app/operations/layer-modes/gimpoperationgrainextract.c
index 6d89d57..a2aaf1c 100644
--- a/app/operations/layer-modes/gimpoperationgrainextract.c
+++ b/app/operations/layer-modes/gimpoperationgrainextract.c
@@ -75,9 +75,8 @@ 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);
 }
 
 gboolean
@@ -88,7 +87,9 @@ 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)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationgrainextract.h 
b/app/operations/layer-modes/gimpoperationgrainextract.h
index 575bc40..6712ebb 100644
--- a/app/operations/layer-modes/gimpoperationgrainextract.h
+++ b/app/operations/layer-modes/gimpoperationgrainextract.h
@@ -57,7 +57,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_GRAIN_EXTRACT_H__ */
diff --git a/app/operations/layer-modes/gimpoperationgrainmerge.c 
b/app/operations/layer-modes/gimpoperationgrainmerge.c
index 8102164..cb9cc15 100644
--- a/app/operations/layer-modes/gimpoperationgrainmerge.c
+++ b/app/operations/layer-modes/gimpoperationgrainmerge.c
@@ -75,9 +75,8 @@ 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);
 }
 
 gboolean
@@ -88,7 +87,9 @@ 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)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationgrainmerge.h 
b/app/operations/layer-modes/gimpoperationgrainmerge.h
index 47ba029..9f3e009 100644
--- a/app/operations/layer-modes/gimpoperationgrainmerge.h
+++ b/app/operations/layer-modes/gimpoperationgrainmerge.h
@@ -57,7 +57,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_GRAIN_MERGE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationhardlight.c 
b/app/operations/layer-modes/gimpoperationhardlight.c
index fa410ad..058c7cb 100644
--- a/app/operations/layer-modes/gimpoperationhardlight.c
+++ b/app/operations/layer-modes/gimpoperationhardlight.c
@@ -74,9 +74,9 @@ 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);
 }
 
 gboolean
@@ -87,7 +87,9 @@ gimp_operation_hardlight_process_pixels (gfloat              *in,
                                          gfloat               opacity,
                                          glong                samples,
                                          const GeglRectangle *roi,
-                                         gint                 level)
+                                         gint                 level,
+                                         GimpLayerBlendTRC    blend_trc,
+                                         GimpLayerBlendTRC    composite_trc)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationhardlight.h 
b/app/operations/layer-modes/gimpoperationhardlight.h
index 1986600..06d3307 100644
--- a/app/operations/layer-modes/gimpoperationhardlight.h
+++ b/app/operations/layer-modes/gimpoperationhardlight.h
@@ -56,7 +56,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_HARDLIGHT_H__ */
diff --git a/app/operations/layer-modes/gimpoperationhsvcolor.c 
b/app/operations/layer-modes/gimpoperationhsvcolor.c
index 3b2e182..6c5f2be 100644
--- a/app/operations/layer-modes/gimpoperationhsvcolor.c
+++ b/app/operations/layer-modes/gimpoperationhsvcolor.c
@@ -79,9 +79,9 @@ 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);
 }
 
 gboolean
@@ -92,7 +92,9 @@ 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)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationhsvcolor.h 
b/app/operations/layer-modes/gimpoperationhsvcolor.h
index b7c607e..0df1e33 100644
--- a/app/operations/layer-modes/gimpoperationhsvcolor.h
+++ b/app/operations/layer-modes/gimpoperationhsvcolor.h
@@ -57,7 +57,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_HSV_COLOR_H__ */
diff --git a/app/operations/layer-modes/gimpoperationhsvhue.c 
b/app/operations/layer-modes/gimpoperationhsvhue.c
index 92603cc..8dd555b 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);
 }
 
 gboolean
@@ -92,7 +92,9 @@ 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)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationhsvhue.h 
b/app/operations/layer-modes/gimpoperationhsvhue.h
index 18ab422..c93f489 100644
--- a/app/operations/layer-modes/gimpoperationhsvhue.h
+++ b/app/operations/layer-modes/gimpoperationhsvhue.h
@@ -57,7 +57,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_HSV_HUE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationhsvsaturation.c 
b/app/operations/layer-modes/gimpoperationhsvsaturation.c
index 1cba1b7..b00aa91 100644
--- a/app/operations/layer-modes/gimpoperationhsvsaturation.c
+++ b/app/operations/layer-modes/gimpoperationhsvsaturation.c
@@ -79,9 +79,8 @@ 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);
 }
 
 gboolean
@@ -92,7 +91,9 @@ 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)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationhsvsaturation.h 
b/app/operations/layer-modes/gimpoperationhsvsaturation.h
index 5031c80..6bf4376 100644
--- a/app/operations/layer-modes/gimpoperationhsvsaturation.h
+++ b/app/operations/layer-modes/gimpoperationhsvsaturation.h
@@ -57,7 +57,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_HSV_SATURATION_H__ */
diff --git a/app/operations/layer-modes/gimpoperationhsvvalue.c 
b/app/operations/layer-modes/gimpoperationhsvvalue.c
index 3843bdb..253ec2f 100644
--- a/app/operations/layer-modes/gimpoperationhsvvalue.c
+++ b/app/operations/layer-modes/gimpoperationhsvvalue.c
@@ -79,9 +79,8 @@ 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);
 }
 
 gboolean
@@ -92,7 +91,9 @@ 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)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationhsvvalue.h 
b/app/operations/layer-modes/gimpoperationhsvvalue.h
index 081ed31..1db363b 100644
--- a/app/operations/layer-modes/gimpoperationhsvvalue.h
+++ b/app/operations/layer-modes/gimpoperationhsvvalue.h
@@ -57,7 +57,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_HSV_VALUE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlchchroma.c 
b/app/operations/layer-modes/gimpoperationlchchroma.c
index 7a8c705..5b9f9ff 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);
 }
 
 static void
@@ -131,7 +131,9 @@ gimp_operation_lch_chroma_process_pixels (gfloat              *in,
                                           gfloat               opacity,
                                           glong                samples,
                                           const GeglRectangle *roi,
-                                          gint                 level)
+                                          gint                 level,
+                                          GimpLayerBlendTRC    blend_trc,
+                                          GimpLayerBlendTRC    composite_trc)
 {
   static const Babl *from_fish = NULL;
   static const Babl *to_fish = NULL;
@@ -155,7 +157,9 @@ gimp_operation_lch_chroma_process_pixels_linear (gfloat              *in,
                                                  gfloat               opacity,
                                                  glong                samples,
                                                  const GeglRectangle *roi,
-                                                 gint                 level)
+                                                 gint                 level,
+                                                 GimpLayerBlendTRC    blend_trc,
+                                                 GimpLayerBlendTRC    composite_trc)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationlchchroma.h 
b/app/operations/layer-modes/gimpoperationlchchroma.h
index 123d59d..348e45c 100644
--- a/app/operations/layer-modes/gimpoperationlchchroma.h
+++ b/app/operations/layer-modes/gimpoperationlchchroma.h
@@ -58,7 +58,9 @@ 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);
 
 gboolean gimp_operation_lch_chroma_process_pixels        (gfloat              *in,
                                                           gfloat              *layer,
@@ -67,7 +69,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_LCH_CHROMA_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlchcolor.c 
b/app/operations/layer-modes/gimpoperationlchcolor.c
index 3985422..e1e9314 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);
 }
 
 static void
@@ -121,7 +119,9 @@ 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)
 {
   static const Babl *from_fish_laba = NULL;
   static const Babl *from_fish_la = NULL;
@@ -149,7 +149,9 @@ 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)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationlchcolor.h 
b/app/operations/layer-modes/gimpoperationlchcolor.h
index 8f2f10c..22c33e0 100644
--- a/app/operations/layer-modes/gimpoperationlchcolor.h
+++ b/app/operations/layer-modes/gimpoperationlchcolor.h
@@ -58,7 +58,9 @@ 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);
 
 gboolean gimp_operation_lch_color_process_pixels        (gfloat              *in,
                                                          gfloat              *layer,
@@ -67,7 +69,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_LCH_COLOR_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlchhue.c 
b/app/operations/layer-modes/gimpoperationlchhue.c
index ea21e0b..e5b3112 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);
 }
 
 static void
@@ -132,7 +130,9 @@ 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)
 {
   static const Babl *from_fish = NULL;
   static const Babl *to_fish = NULL;
@@ -157,7 +157,9 @@ 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)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationlchhue.h 
b/app/operations/layer-modes/gimpoperationlchhue.h
index 99472b7..a6e61f6 100644
--- a/app/operations/layer-modes/gimpoperationlchhue.h
+++ b/app/operations/layer-modes/gimpoperationlchhue.h
@@ -58,7 +58,9 @@ 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);
 
 gboolean gimp_operation_lch_hue_process_pixels        (gfloat              *in,
                                                        gfloat              *layer,
@@ -67,7 +69,8 @@ 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);
 
 #endif /* __GIMP_OPERATION_LCH_HUE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlchlightness.c 
b/app/operations/layer-modes/gimpoperationlchlightness.c
index c9bc3b5..c544148 100644
--- a/app/operations/layer-modes/gimpoperationlchlightness.c
+++ b/app/operations/layer-modes/gimpoperationlchlightness.c
@@ -78,13 +78,10 @@ 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 :
+  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, 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);
 }
 
 static void
@@ -117,7 +114,9 @@ gimp_operation_lch_lightness_process_pixels (gfloat              *in,
                                              gfloat               opacity,
                                              glong                samples,
                                              const GeglRectangle *roi,
-                                             gint                 level)
+                                             gint                 level,
+                                             GimpLayerBlendTRC    blend_trc,
+                                             GimpLayerBlendTRC    composite_trc)
 {
   static const Babl *from_fish_laba = NULL;
   static const Babl *from_fish_la = NULL;
@@ -146,7 +145,9 @@ gimp_operation_lch_lightness_process_pixels_linear (gfloat              *in,
                                                     gfloat               opacity,
                                                     glong                samples,
                                                     const GeglRectangle *roi,
-                                                    gint                 level)
+                                                    gint                 level,
+                                                    GimpLayerBlendTRC    blend_trc,
+                                                    GimpLayerBlendTRC    composite_trc)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationlchlightness.h 
b/app/operations/layer-modes/gimpoperationlchlightness.h
index 7af7797..29ef6da 100644
--- a/app/operations/layer-modes/gimpoperationlchlightness.h
+++ b/app/operations/layer-modes/gimpoperationlchlightness.h
@@ -58,7 +58,9 @@ 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);
 
 gboolean gimp_operation_lch_lightness_process_pixels        (gfloat              *in,
                                                              gfloat              *layer,
@@ -67,7 +69,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_LCH_LIGHTNESS_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlightenonly.c 
b/app/operations/layer-modes/gimpoperationlightenonly.c
index a67e7f0..ea428f3 100644
--- a/app/operations/layer-modes/gimpoperationlightenonly.c
+++ b/app/operations/layer-modes/gimpoperationlightenonly.c
@@ -75,9 +75,9 @@ 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);
 }
 
 gboolean
@@ -88,7 +88,9 @@ gimp_operation_lighten_only_process_pixels (gfloat              *in,
                                             gfloat               opacity,
                                             glong                samples,
                                             const GeglRectangle *roi,
-                                            gint                 level)
+                                            gint                 level,
+                                            GimpLayerBlendTRC    blend_trc,
+                                            GimpLayerBlendTRC    composite_mode)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationlightenonly.h 
b/app/operations/layer-modes/gimpoperationlightenonly.h
index 6e4cea6..c3c1056 100644
--- a/app/operations/layer-modes/gimpoperationlightenonly.h
+++ b/app/operations/layer-modes/gimpoperationlightenonly.h
@@ -57,7 +57,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_LIGHTEN_ONLY_H__ */
diff --git a/app/operations/layer-modes/gimpoperationmultiply.c 
b/app/operations/layer-modes/gimpoperationmultiply.c
index 4367062..15c089d 100644
--- a/app/operations/layer-modes/gimpoperationmultiply.c
+++ b/app/operations/layer-modes/gimpoperationmultiply.c
@@ -75,9 +75,9 @@ 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);
 }
 
 gboolean
@@ -88,7 +88,9 @@ gimp_operation_multiply_process_pixels (gfloat              *in,
                                         gfloat               opacity,
                                         glong                samples,
                                         const GeglRectangle *roi,
-                                        gint                 level)
+                                        gint                 level,
+                                        GimpLayerBlendTRC    blend_trc,
+                                        GimpLayerBlendTRC    composite_trc)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationmultiply.h 
b/app/operations/layer-modes/gimpoperationmultiply.h
index 4417e84..9e37dda 100644
--- a/app/operations/layer-modes/gimpoperationmultiply.h
+++ b/app/operations/layer-modes/gimpoperationmultiply.h
@@ -57,7 +57,9 @@ 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);
 
 
 #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..c030f89 100644
--- a/app/operations/layer-modes/gimpoperationnormal-sse2.c
+++ b/app/operations/layer-modes/gimpoperationnormal-sse2.c
@@ -39,14 +39,16 @@ 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)
 {
   /* 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);
     }
   else
     {
diff --git a/app/operations/layer-modes/gimpoperationnormal-sse4.c 
b/app/operations/layer-modes/gimpoperationnormal-sse4.c
index 29e33c4..844255b 100644
--- a/app/operations/layer-modes/gimpoperationnormal-sse4.c
+++ b/app/operations/layer-modes/gimpoperationnormal-sse4.c
@@ -39,14 +39,17 @@ 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)
 {
   /* 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);
     }
   else
     {
diff --git a/app/operations/layer-modes/gimpoperationnormal.c 
b/app/operations/layer-modes/gimpoperationnormal.c
index e492000..b1a6b11 100644
--- a/app/operations/layer-modes/gimpoperationnormal.c
+++ b/app/operations/layer-modes/gimpoperationnormal.c
@@ -173,9 +173,8 @@ 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);
 }
 
 gboolean
@@ -186,7 +185,9 @@ 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)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes/gimpoperationnormal.h 
b/app/operations/layer-modes/gimpoperationnormal.h
index 1b8e401..c1ac4fb 100644
--- a/app/operations/layer-modes/gimpoperationnormal.h
+++ b/app/operations/layer-modes/gimpoperationnormal.h
@@ -58,7 +58,9 @@ 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);
 
 gboolean gimp_operation_normal_process_pixels_sse2 (gfloat              *in,
                                                     gfloat              *aux,
@@ -67,7 +69,9 @@ 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);
 
 gboolean gimp_operation_normal_process_pixels_sse4 (gfloat              *in,
                                                     gfloat              *aux,
@@ -76,7 +80,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_NORMAL_H__ */
diff --git a/app/operations/layer-modes/gimpoperationoverlay.c 
b/app/operations/layer-modes/gimpoperationoverlay.c
index 34229a7..a109ccb 100644
--- a/app/operations/layer-modes/gimpoperationoverlay.c
+++ b/app/operations/layer-modes/gimpoperationoverlay.c
@@ -74,9 +74,9 @@ 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);
 }
 
 gboolean
@@ -87,7 +87,9 @@ gimp_operation_overlay_process_pixels (gfloat              *in,
                                        gfloat               opacity,
                                        glong                samples,
                                        const GeglRectangle *roi,
-                                       gint                 level)
+                                       gint                 level,
+                                       GimpLayerBlendTRC    blend_trc,
+                                       GimpLayerBlendTRC    composite_trc)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationoverlay.h 
b/app/operations/layer-modes/gimpoperationoverlay.h
index d31f01d..4b0b394 100644
--- a/app/operations/layer-modes/gimpoperationoverlay.h
+++ b/app/operations/layer-modes/gimpoperationoverlay.h
@@ -56,7 +56,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_OVERLAY_H__ */
diff --git a/app/operations/layer-modes/gimpoperationreplace.c 
b/app/operations/layer-modes/gimpoperationreplace.c
index 93c895b..1cce3e1 100644
--- a/app/operations/layer-modes/gimpoperationreplace.c
+++ b/app/operations/layer-modes/gimpoperationreplace.c
@@ -73,9 +73,9 @@ 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);
 }
 
 gboolean
@@ -86,7 +86,9 @@ gimp_operation_replace_process_pixels (gfloat              *in,
                                        gfloat               opacity,
                                        glong                samples,
                                        const GeglRectangle *roi,
-                                       gint                 level)
+                                       gint                 level,
+                                       GimpLayerBlendTRC    blend_trc,
+                                       GimpLayerBlendTRC    composite_trc)
 {
   const gboolean has_mask = mask != NULL;
 
diff --git a/app/operations/layer-modes/gimpoperationreplace.h 
b/app/operations/layer-modes/gimpoperationreplace.h
index 5747bcb..976d62b 100644
--- a/app/operations/layer-modes/gimpoperationreplace.h
+++ b/app/operations/layer-modes/gimpoperationreplace.h
@@ -56,7 +56,9 @@ gboolean gimp_operation_replace_process_pixels (gfloat              *in,
                                                 gfloat               opacity,
                                                 glong                samples,
                                                 const GeglRectangle *roi,
-                                                gint                 level);
+                                                gint                 level,
+                                                GimpLayerBlendTRC    blend_trc, 
+                                                GimpLayerBlendTRC    composite_trc);
 
 
 #endif /* __GIMP_OPERATION_REPLACE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationscreen.c 
b/app/operations/layer-modes/gimpoperationscreen.c
index 2c1451f..529d81a 100644
--- a/app/operations/layer-modes/gimpoperationscreen.c
+++ b/app/operations/layer-modes/gimpoperationscreen.c
@@ -76,8 +76,8 @@ 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);
 }
 
 gboolean
@@ -88,7 +88,9 @@ gimp_operation_screen_process_pixels (gfloat              *in,
                                       gfloat               opacity,
                                       glong                samples,
                                       const GeglRectangle *roi,
-                                      gint                 level)
+                                      gint                 level,
+                                      GimpLayerBlendTRC    blend_trc,
+                                      GimpLayerBlendTRC    composite_trc)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationscreen.h 
b/app/operations/layer-modes/gimpoperationscreen.h
index 200f679..026896d 100644
--- a/app/operations/layer-modes/gimpoperationscreen.h
+++ b/app/operations/layer-modes/gimpoperationscreen.h
@@ -56,7 +56,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_SCREEN_H__ */
diff --git a/app/operations/layer-modes/gimpoperationsoftlight.c 
b/app/operations/layer-modes/gimpoperationsoftlight.c
index 3020acd..4497dd8 100644
--- a/app/operations/layer-modes/gimpoperationsoftlight.c
+++ b/app/operations/layer-modes/gimpoperationsoftlight.c
@@ -92,9 +92,8 @@ 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);
 }
 
 gboolean
@@ -105,7 +104,9 @@ gimp_operation_softlight_process_pixels (gfloat              *in,
                                          gfloat               opacity,
                                          glong                samples,
                                          const GeglRectangle *roi,
-                                         gint                 level)
+                                         gint                 level,
+                                         GimpLayerBlendTRC    blend_trc,
+                                         GimpLayerBlendTRC    composite_trc)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationsoftlight.h 
b/app/operations/layer-modes/gimpoperationsoftlight.h
index 9456095..963800e 100644
--- a/app/operations/layer-modes/gimpoperationsoftlight.h
+++ b/app/operations/layer-modes/gimpoperationsoftlight.h
@@ -56,7 +56,8 @@ 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);
 
 #endif /* __GIMP_OPERATION_SOFTLIGHT_H__ */
diff --git a/app/operations/layer-modes/gimpoperationsubtract.c 
b/app/operations/layer-modes/gimpoperationsubtract.c
index 90ade4e..c22e125 100644
--- a/app/operations/layer-modes/gimpoperationsubtract.c
+++ b/app/operations/layer-modes/gimpoperationsubtract.c
@@ -75,9 +75,9 @@ 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);
 }
 
 gboolean
@@ -88,7 +88,9 @@ gimp_operation_subtract_process_pixels (gfloat              *in,
                                         gfloat               opacity,
                                         glong                samples,
                                         const GeglRectangle *roi,
-                                        gint                 level)
+                                        gint                 level,
+                                        GimpLayerBlendTRC    blend_trc,
+                                        GimpLayerBlendTRC    composite_trc)
 {
   gimp_composite_blend (
      in, layer, mask, out, opacity, samples,
diff --git a/app/operations/layer-modes/gimpoperationsubtract.h 
b/app/operations/layer-modes/gimpoperationsubtract.h
index 23c656a..fa67cb2 100644
--- a/app/operations/layer-modes/gimpoperationsubtract.h
+++ b/app/operations/layer-modes/gimpoperationsubtract.h
@@ -57,7 +57,9 @@ 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);
 
 
 #endif /* __GIMP_OPERATION_SUBTRACT_H__ */
diff --git a/app/operations/operations-types.h b/app/operations/operations-types.h
index ad5088d..1f39bd1 100644
--- a/app/operations/operations-types.h
+++ b/app/operations/operations-types.h
@@ -62,7 +62,9 @@ typedef gboolean (* GimpLayerModeFunc) (gfloat              *in,
                                         gfloat               opacity,
                                         glong                samples,
                                         const GeglRectangle *roi,
-                                        gint                 level);
+                                        gint                 level,
+                                        GimpLayerBlendTRC    blend_trc,
+                                        GimpLayerBlendTRC    composite_trc);
 
 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]