[gimp] app: remove a trampoline in layer/paint mode dispatch
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove a trampoline in layer/paint mode dispatch
- Date: Sat, 21 Jan 2017 13:13:13 +0000 (UTC)
commit c993adf91ef3be19ccdcbdf460c2a2cda9cf2718
Author: Øyvind Kolås <pippin gimp org>
Date: Sat Jan 21 01:37:37 2017 +0100
app: remove a trampoline in layer/paint mode dispatch
Fully removes one trampoline level and passing fewer args through the remaining
trampoline.
.../gimpoperationadditionlegacy.c | 50 ++--------
.../gimpoperationadditionlegacy.h | 19 ++--
.../layer-modes-legacy/gimpoperationburnlegacy.c | 55 ++---------
.../layer-modes-legacy/gimpoperationburnlegacy.h | 19 ++--
.../gimpoperationdarkenonlylegacy.c | 53 ++--------
.../gimpoperationdarkenonlylegacy.h | 19 ++--
.../gimpoperationdifferencelegacy.c | 57 +++---------
.../gimpoperationdifferencelegacy.h | 19 ++--
.../layer-modes-legacy/gimpoperationdividelegacy.c | 55 ++---------
.../layer-modes-legacy/gimpoperationdividelegacy.h | 19 ++--
.../layer-modes-legacy/gimpoperationdodgelegacy.c | 54 ++---------
.../layer-modes-legacy/gimpoperationdodgelegacy.h | 19 ++--
.../gimpoperationgrainextractlegacy.c | 56 +++---------
.../gimpoperationgrainextractlegacy.h | 19 ++--
.../gimpoperationgrainmergelegacy.c | 56 ++---------
.../gimpoperationgrainmergelegacy.h | 19 ++--
.../gimpoperationhardlightlegacy.c | 58 +++---------
.../gimpoperationhardlightlegacy.h | 19 ++--
.../gimpoperationhsvcolorlegacy.c | 59 +++---------
.../gimpoperationhsvcolorlegacy.h | 19 ++--
.../layer-modes-legacy/gimpoperationhsvhuelegacy.c | 54 ++---------
.../layer-modes-legacy/gimpoperationhsvhuelegacy.h | 19 ++--
.../gimpoperationhsvsaturationlegacy.c | 54 ++---------
.../gimpoperationhsvsaturationlegacy.h | 19 ++--
.../gimpoperationhsvvaluelegacy.c | 59 +++---------
.../gimpoperationhsvvaluelegacy.h | 19 ++--
.../gimpoperationlightenonlylegacy.c | 54 ++---------
.../gimpoperationlightenonlylegacy.h | 19 ++--
.../gimpoperationmultiplylegacy.c | 60 +++---------
.../gimpoperationmultiplylegacy.h | 19 ++--
.../layer-modes-legacy/gimpoperationscreenlegacy.c | 55 ++---------
.../layer-modes-legacy/gimpoperationscreenlegacy.h | 19 ++--
.../gimpoperationsoftlightlegacy.c | 52 +++--------
.../gimpoperationsoftlightlegacy.h | 19 ++--
.../gimpoperationsubtractlegacy.c | 57 +++---------
.../gimpoperationsubtractlegacy.h | 19 ++--
app/operations/layer-modes/gimpblendcomposite.h | 35 ++++++-
.../layer-modes/gimplayermodefunctions.c | 100 ++++++++++----------
app/operations/layer-modes/gimpoperationaddition.c | 51 ++---------
app/operations/layer-modes/gimpoperationaddition.h | 19 ++--
.../layer-modes/gimpoperationantierase.c | 53 ++---------
.../layer-modes/gimpoperationantierase.h | 19 ++--
app/operations/layer-modes/gimpoperationbehind.c | 49 ++--------
app/operations/layer-modes/gimpoperationbehind.h | 19 ++--
app/operations/layer-modes/gimpoperationburn.c | 49 ++--------
app/operations/layer-modes/gimpoperationburn.h | 19 ++--
.../layer-modes/gimpoperationcolorerase.c | 54 ++---------
.../layer-modes/gimpoperationcolorerase.h | 19 ++--
.../layer-modes/gimpoperationdarkenonly.c | 54 ++---------
.../layer-modes/gimpoperationdarkenonly.h | 19 ++--
.../layer-modes/gimpoperationdifference.c | 53 ++---------
.../layer-modes/gimpoperationdifference.h | 19 ++--
app/operations/layer-modes/gimpoperationdissolve.c | 53 ++--------
app/operations/layer-modes/gimpoperationdissolve.h | 19 ++--
app/operations/layer-modes/gimpoperationdivide.c | 54 ++---------
app/operations/layer-modes/gimpoperationdivide.h | 19 ++--
app/operations/layer-modes/gimpoperationdodge.c | 50 ++---------
app/operations/layer-modes/gimpoperationdodge.h | 19 ++--
app/operations/layer-modes/gimpoperationerase.c | 54 ++---------
app/operations/layer-modes/gimpoperationerase.h | 19 ++--
.../layer-modes/gimpoperationgrainextract.c | 53 ++---------
.../layer-modes/gimpoperationgrainextract.h | 19 ++--
.../layer-modes/gimpoperationgrainmerge.c | 54 ++---------
.../layer-modes/gimpoperationgrainmerge.h | 19 ++--
.../layer-modes/gimpoperationhardlight.c | 53 ++---------
.../layer-modes/gimpoperationhardlight.h | 19 ++--
app/operations/layer-modes/gimpoperationhsvcolor.c | 53 ++---------
app/operations/layer-modes/gimpoperationhsvcolor.h | 19 ++--
app/operations/layer-modes/gimpoperationhsvhue.c | 50 ++---------
app/operations/layer-modes/gimpoperationhsvhue.h | 19 ++--
.../layer-modes/gimpoperationhsvsaturation.c | 55 ++---------
.../layer-modes/gimpoperationhsvsaturation.h | 19 ++--
app/operations/layer-modes/gimpoperationhsvvalue.c | 53 ++---------
app/operations/layer-modes/gimpoperationhsvvalue.h | 19 ++--
.../layer-modes/gimpoperationlchchroma.c | 54 ++---------
.../layer-modes/gimpoperationlchchroma.h | 19 ++--
app/operations/layer-modes/gimpoperationlchcolor.c | 54 ++---------
app/operations/layer-modes/gimpoperationlchcolor.h | 19 ++--
app/operations/layer-modes/gimpoperationlchhue.c | 50 ++---------
app/operations/layer-modes/gimpoperationlchhue.h | 19 ++--
.../layer-modes/gimpoperationlchlightness.c | 54 ++---------
.../layer-modes/gimpoperationlchlightness.h | 19 ++--
.../layer-modes/gimpoperationlightenonly.c | 50 ++---------
.../layer-modes/gimpoperationlightenonly.h | 19 ++--
app/operations/layer-modes/gimpoperationmultiply.c | 55 ++---------
app/operations/layer-modes/gimpoperationmultiply.h | 19 ++--
.../layer-modes/gimpoperationnormal-sse2.c | 29 +++---
.../layer-modes/gimpoperationnormal-sse4.c | 30 +++---
app/operations/layer-modes/gimpoperationnormal.c | 63 ++++---------
app/operations/layer-modes/gimpoperationnormal.h | 65 ++++++-------
app/operations/layer-modes/gimpoperationoverlay.c | 48 +--------
app/operations/layer-modes/gimpoperationoverlay.h | 19 ++--
.../layer-modes/gimpoperationpointlayermode.h | 1 +
app/operations/layer-modes/gimpoperationreplace.c | 50 ++--------
app/operations/layer-modes/gimpoperationreplace.h | 19 ++--
app/operations/layer-modes/gimpoperationscreen.c | 50 ++---------
app/operations/layer-modes/gimpoperationscreen.h | 19 ++--
.../layer-modes/gimpoperationsoftlight.c | 51 ++---------
.../layer-modes/gimpoperationsoftlight.h | 19 ++--
app/operations/layer-modes/gimpoperationsubtract.c | 50 ++---------
app/operations/layer-modes/gimpoperationsubtract.h | 19 ++--
app/operations/operations-types.h | 15 +--
app/paint/gimppaintcore-loops.c | 17 ++-
103 files changed, 1003 insertions(+), 2754 deletions(-)
---
diff --git a/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.c
b/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.c
index 712810a..0338442 100644
--- a/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.c
@@ -27,17 +27,6 @@
#include "gimpoperationadditionlegacy.h"
-
-static gboolean gimp_operation_addition_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationAdditionLegacy, gimp_operation_addition_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -64,40 +53,19 @@ gimp_operation_addition_legacy_init (GimpOperationAdditionLegacy *self)
{
}
-static gboolean
-gimp_operation_addition_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_addition_legacy_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_addition_legacy_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_addition_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *out = out_p, *layer = layer_p, *mask = mask_p;
const gboolean has_mask = mask != NULL;
while (samples--)
diff --git a/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.h
b/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.h
index fbc5f9f..21b5ea7 100644
--- a/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationadditionlegacy.h
@@ -49,17 +49,14 @@ struct _GimpOperationAdditionLegacyClass
GType gimp_operation_addition_legacy_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_addition_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_addition_legacy_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#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 3fd1b00..d7e1088 100644
--- a/app/operations/layer-modes-legacy/gimpoperationburnlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationburnlegacy.c
@@ -27,17 +27,6 @@
#include "gimpoperationburnlegacy.h"
-
-static gboolean gimp_operation_burn_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationBurnLegacy, gimp_operation_burn_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -64,48 +53,26 @@ gimp_operation_burn_legacy_init (GimpOperationBurnLegacy *self)
{
}
-static gboolean
-gimp_operation_burn_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_burn_legacy_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_burn_legacy_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_burn_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- const gboolean has_mask = mask != NULL;
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *out = out_p, *layer = layer_p, *mask = mask_p;
while (samples--)
{
gfloat comp_alpha, new_alpha;
comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
- if (has_mask)
+ if (mask)
comp_alpha *= *mask;
new_alpha = in[ALPHA] + (1.0 - in[ALPHA]) * comp_alpha;
@@ -142,7 +109,7 @@ gimp_operation_burn_legacy_process_pixels (gfloat *in,
layer += 4;
out += 4;
- if (has_mask)
+ if (mask)
mask++;
}
diff --git a/app/operations/layer-modes-legacy/gimpoperationburnlegacy.h
b/app/operations/layer-modes-legacy/gimpoperationburnlegacy.h
index 9c4f73c..22853f7 100644
--- a/app/operations/layer-modes-legacy/gimpoperationburnlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationburnlegacy.h
@@ -49,17 +49,14 @@ struct _GimpOperationBurnLegacyClass
GType gimp_operation_burn_legacy_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_burn_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_burn_legacy_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#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 ed4d555..a30fa57 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.c
@@ -28,16 +28,6 @@
#include "gimpoperationdarkenonlylegacy.h"
-static gboolean gimp_operation_darken_only_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationDarkenOnlyLegacy, gimp_operation_darken_only_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -64,48 +54,27 @@ gimp_operation_darken_only_legacy_init (GimpOperationDarkenOnlyLegacy *self)
{
}
-static gboolean
-gimp_operation_darken_only_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_darken_only_legacy_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_darken_only_legacy_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *out = out_p, *layer = layer_p, *mask = mask_p;
-gboolean
-gimp_operation_darken_only_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- const gboolean has_mask = mask != NULL;
while (samples--)
{
gfloat comp_alpha, new_alpha;
comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
- if (has_mask)
+ if (mask)
comp_alpha *= *mask;
new_alpha = in[ALPHA] + (1.0 - in[ALPHA]) * comp_alpha;
@@ -138,7 +107,7 @@ gimp_operation_darken_only_legacy_process_pixels (gfloat *in,
layer += 4;
out += 4;
- if (has_mask)
+ if (mask)
mask++;
}
diff --git a/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.h
b/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.h
index 485dae6..55f7d50 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationdarkenonlylegacy.h
@@ -49,17 +49,14 @@ struct _GimpOperationDarkenOnlyLegacyClass
GType gimp_operation_darken_only_legacy_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_darken_only_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_darken_only_legacy_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#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 21039ff..c4de0e9 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.c
@@ -27,21 +27,9 @@
#include "gimpoperationdifferencelegacy.h"
-
-static gboolean gimp_operation_difference_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationDifferenceLegacy, gimp_operation_difference_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
-
static void
gimp_operation_difference_legacy_class_init (GimpOperationDifferenceLegacyClass *klass)
{
@@ -64,48 +52,27 @@ gimp_operation_difference_legacy_init (GimpOperationDifferenceLegacy *self)
{
}
-static gboolean
-gimp_operation_difference_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+
+gboolean
+gimp_operation_difference_legacy_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_difference_legacy_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_difference_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- const gboolean has_mask = mask != NULL;
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *out = out_p, *layer = layer_p, *mask = mask_p;
while (samples--)
{
gfloat comp_alpha, new_alpha;
comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
- if (has_mask)
+ if (mask)
comp_alpha *= *mask;
new_alpha = in[ALPHA] + (1.0 - in[ALPHA]) * comp_alpha;
@@ -139,7 +106,7 @@ gimp_operation_difference_legacy_process_pixels (gfloat *in,
layer += 4;
out += 4;
- if (has_mask)
+ if (mask)
mask++;
}
diff --git a/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.h
b/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.h
index 066cada..b046c1e 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationdifferencelegacy.h
@@ -49,17 +49,14 @@ struct _GimpOperationDifferenceLegacyClass
GType gimp_operation_difference_legacy_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_difference_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_difference_legacy_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#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 e63518f..4e8e691 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdividelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationdividelegacy.c
@@ -27,17 +27,6 @@
#include "gimpoperationdividelegacy.h"
-
-static gboolean gimp_operation_divide_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationDivideLegacy, gimp_operation_divide_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -64,48 +53,26 @@ gimp_operation_divide_legacy_init (GimpOperationDivideLegacy *self)
{
}
-static gboolean
-gimp_operation_divide_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_divide_legacy_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_divide_legacy_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_divide_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- const gboolean has_mask = mask != NULL;
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *out = out_p, *layer = layer_p, *mask = mask_p;
while (samples--)
{
gfloat comp_alpha, new_alpha;
comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
- if (has_mask)
+ if (mask)
comp_alpha *= *mask;
new_alpha = in[ALPHA] + (1.0 - in[ALPHA]) * comp_alpha;
@@ -139,7 +106,7 @@ gimp_operation_divide_legacy_process_pixels (gfloat *in,
layer += 4;
out += 4;
- if (has_mask)
+ if (mask)
mask++;
}
diff --git a/app/operations/layer-modes-legacy/gimpoperationdividelegacy.h
b/app/operations/layer-modes-legacy/gimpoperationdividelegacy.h
index 4e3708f..3d01ab2 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdividelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationdividelegacy.h
@@ -49,17 +49,14 @@ struct _GimpOperationDivideLegacyClass
GType gimp_operation_divide_legacy_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_divide_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_divide_legacy_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#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 330e24f..480a6eb 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.c
@@ -28,16 +28,6 @@
#include "gimpoperationdodgelegacy.h"
-static gboolean gimp_operation_dodge_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationDodgeLegacy, gimp_operation_dodge_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -64,48 +54,26 @@ gimp_operation_dodge_legacy_init (GimpOperationDodgeLegacy *self)
{
}
-static gboolean
-gimp_operation_dodge_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_dodge_legacy_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_dodge_legacy_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_dodge_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- const gboolean has_mask = mask != NULL;
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *out = out_p, *layer = layer_p, *mask = mask_p;
while (samples--)
{
gfloat comp_alpha, new_alpha;
comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
- if (has_mask)
+ if (mask)
comp_alpha *= *mask;
new_alpha = in[ALPHA] + (1.0 - in[ALPHA]) * comp_alpha;
@@ -139,7 +107,7 @@ gimp_operation_dodge_legacy_process_pixels (gfloat *in,
layer += 4;
out += 4;
- if (has_mask)
+ if (mask)
mask++;
}
diff --git a/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.h
b/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.h
index 11dee3e..6d53efa 100644
--- a/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationdodgelegacy.h
@@ -49,17 +49,14 @@ struct _GimpOperationDodgeLegacyClass
GType gimp_operation_dodge_legacy_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_dodge_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_dodge_legacy_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#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 9b92315..f38d0e7 100644
--- a/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.c
@@ -27,17 +27,6 @@
#include "gimpoperationgrainextractlegacy.h"
-
-static gboolean gimp_operation_grain_extract_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationGrainExtractLegacy, gimp_operation_grain_extract_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -64,48 +53,27 @@ gimp_operation_grain_extract_legacy_init (GimpOperationGrainExtractLegacy *self)
{
}
-static gboolean
-gimp_operation_grain_extract_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+
+gboolean
+gimp_operation_grain_extract_legacy_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_grain_extract_legacy_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_grain_extract_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_Trc,
- GimpLayerCompositeMode composite_mode)
-{
- const gboolean has_mask = mask != NULL;
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *out = out_p, *layer = layer_p, *mask = mask_p;
while (samples--)
{
gfloat comp_alpha, new_alpha;
comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
- if (has_mask)
+ if (mask)
comp_alpha *= *mask;
new_alpha = in[ALPHA] + (1.0 - in[ALPHA]) * comp_alpha;
@@ -139,7 +107,7 @@ gimp_operation_grain_extract_legacy_process_pixels (gfloat *in,
layer += 4;
out += 4;
- if (has_mask)
+ if (mask)
mask++;
}
diff --git a/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.h
b/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.h
index f8c3e86..2fe6c51 100644
--- a/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationgrainextractlegacy.h
@@ -49,17 +49,14 @@ struct _GimpOperationGrainExtractLegacyClass
GType gimp_operation_grain_extract_legacy_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_grain_extract_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_grain_extract_legacy_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#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 3859f10..c71e4fb 100644
--- a/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.c
@@ -27,21 +27,9 @@
#include "gimpoperationgrainmergelegacy.h"
-
-static gboolean gimp_operation_grain_merge_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationGrainMergeLegacy, gimp_operation_grain_merge_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
-
static void
gimp_operation_grain_merge_legacy_class_init (GimpOperationGrainMergeLegacyClass *klass)
{
@@ -64,48 +52,26 @@ gimp_operation_grain_merge_legacy_init (GimpOperationGrainMergeLegacy *self)
{
}
-static gboolean
-gimp_operation_grain_merge_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_grain_merge_legacy_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_grain_merge_legacy_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_grain_merge_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- const gboolean has_mask = mask != NULL;
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *out = out_p, *layer = layer_p, *mask = mask_p;
while (samples--)
{
gfloat comp_alpha, new_alpha;
comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
- if (has_mask)
+ if (mask)
comp_alpha *= *mask;
new_alpha = in[ALPHA] + (1.0 - in[ALPHA]) * comp_alpha;
@@ -139,7 +105,7 @@ gimp_operation_grain_merge_legacy_process_pixels (gfloat *in,
layer += 4;
out += 4;
- if (has_mask)
+ if (mask)
mask ++;
}
diff --git a/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.h
b/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.h
index 4521081..fdc4dc3 100644
--- a/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationgrainmergelegacy.h
@@ -49,17 +49,14 @@ struct _GimpOperationGrainMergeLegacyClass
GType gimp_operation_grain_merge_legacy_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_grain_merge_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_grain_merge_legacy_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#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 395bfd3..189448b 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhardlightlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationhardlightlegacy.c
@@ -28,16 +28,6 @@
#include "gimpoperationhardlightlegacy.h"
-static gboolean gimp_operation_hardlight_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationHardlightLegacy, gimp_operation_hardlight_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -64,48 +54,26 @@ gimp_operation_hardlight_legacy_init (GimpOperationHardlightLegacy *self)
{
}
-static gboolean
-gimp_operation_hardlight_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_hardlight_legacy_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_hardlight_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_hardlight_legacy_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
- const gboolean has_mask = mask != NULL;
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *out = out_p, *layer = layer_p, *mask = mask_p;
while (samples--)
{
gfloat comp_alpha, new_alpha;
comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
- if (has_mask)
+ if (mask)
comp_alpha *= *mask;
new_alpha = in[ALPHA] + (1.0 - in[ALPHA]) * comp_alpha;
@@ -149,7 +117,7 @@ gimp_operation_hardlight_legacy_process_pixels (gfloat *in,
layer += 4;
out += 4;
- if (has_mask)
+ if (mask)
mask ++;
}
diff --git a/app/operations/layer-modes-legacy/gimpoperationhardlightlegacy.h
b/app/operations/layer-modes-legacy/gimpoperationhardlightlegacy.h
index 945feb1..0e15be1 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhardlightlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationhardlightlegacy.h
@@ -49,17 +49,14 @@ struct _GimpOperationHardlightLegacyClass
GType gimp_operation_hardlight_legacy_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_hardlight_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_hardlight_legacy_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#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 6bfba7a..25f564b 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvcolorlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvcolorlegacy.c
@@ -31,17 +31,6 @@
#include "gimpoperationhsvcolorlegacy.h"
-
-static gboolean gimp_operation_hsv_color_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationHsvColorLegacy, gimp_operation_hsv_color_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -68,41 +57,19 @@ gimp_operation_hsv_color_legacy_init (GimpOperationHsvColorLegacy *self)
{
}
-static gboolean
-gimp_operation_hsv_color_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_hsv_color_legacy_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_hsv_color_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_hsv_color_legacy_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
- const gboolean has_mask = mask != NULL;
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *out = out_p, *layer = layer_p, *mask = mask_p;
while (samples--)
{
@@ -112,7 +79,7 @@ gimp_operation_hsv_color_legacy_process_pixels (gfloat *in,
gfloat comp_alpha, new_alpha;
comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
- if (has_mask)
+ if (mask)
comp_alpha *= *mask;
new_alpha = in[ALPHA] + (1.0 - in[ALPHA]) * comp_alpha;
@@ -155,7 +122,7 @@ gimp_operation_hsv_color_legacy_process_pixels (gfloat *in,
layer += 4;
out += 4;
- if (has_mask)
+ if (mask)
mask++;
}
diff --git a/app/operations/layer-modes-legacy/gimpoperationhsvcolorlegacy.h
b/app/operations/layer-modes-legacy/gimpoperationhsvcolorlegacy.h
index e38a0ca..9ef93be 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvcolorlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvcolorlegacy.h
@@ -49,17 +49,14 @@ struct _GimpOperationHsvColorLegacyClass
GType gimp_operation_hsv_color_legacy_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_hsv_color_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_hsv_color_legacy_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#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 33fee2f..ccfc631 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.c
@@ -32,16 +32,6 @@
#include "gimpoperationhsvhuelegacy.h"
-static gboolean gimp_operation_hsv_hue_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationHsvHueLegacy, gimp_operation_hsv_hue_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -68,41 +58,19 @@ gimp_operation_hsv_hue_legacy_init (GimpOperationHsvHueLegacy *self)
{
}
-static gboolean
-gimp_operation_hsv_hue_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_hsv_hue_legacy_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_hsv_hue_legacy_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_hsv_hue_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- const gboolean has_mask = mask != NULL;
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *out = out_p, *layer = layer_p, *mask = mask_p;
while (samples--)
{
@@ -112,7 +80,7 @@ gimp_operation_hsv_hue_legacy_process_pixels (gfloat *in,
gfloat comp_alpha, new_alpha;
comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
- if (has_mask)
+ if (mask)
comp_alpha *= *mask;
new_alpha = in[ALPHA] + (1.0 - in[ALPHA]) * comp_alpha;
@@ -160,7 +128,7 @@ gimp_operation_hsv_hue_legacy_process_pixels (gfloat *in,
layer += 4;
out += 4;
- if (has_mask)
+ if (mask)
mask++;
}
diff --git a/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.h
b/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.h
index 1fd7faf..a1cf5dc 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvhuelegacy.h
@@ -49,17 +49,14 @@ struct _GimpOperationHsvHueLegacyClass
GType gimp_operation_hsv_hue_legacy_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_hsv_hue_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_hsv_hue_legacy_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#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 9fd169f..029fab1 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.c
@@ -32,16 +32,6 @@
#include "gimpoperationhsvsaturationlegacy.h"
-static gboolean gimp_operation_hsv_saturation_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationHsvSaturationLegacy, gimp_operation_hsv_saturation_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -68,41 +58,19 @@ gimp_operation_hsv_saturation_legacy_init (GimpOperationHsvSaturationLegacy *sel
{
}
-static gboolean
-gimp_operation_hsv_saturation_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_hsv_saturation_legacy_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_hsv_saturation_legacy_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_hsv_saturation_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- const gboolean has_mask = mask != NULL;
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *out = out_p, *layer = layer_p, *mask = mask_p;
while (samples--)
{
@@ -112,7 +80,7 @@ gimp_operation_hsv_saturation_legacy_process_pixels (gfloat *in,
gfloat comp_alpha, new_alpha;
comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
- if (has_mask)
+ if (mask)
comp_alpha *= *mask;
new_alpha = in[ALPHA] + (1.0 - in[ALPHA]) * comp_alpha;
@@ -154,7 +122,7 @@ gimp_operation_hsv_saturation_legacy_process_pixels (gfloat *in,
layer += 4;
out += 4;
- if (has_mask)
+ if (mask)
mask++;
}
diff --git a/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.h
b/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.h
index 9539221..5fb2459 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvsaturationlegacy.h
@@ -49,17 +49,14 @@ struct _GimpOperationHsvSaturationLegacyClass
GType gimp_operation_hsv_saturation_legacy_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_hsv_saturation_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_hsv_saturation_legacy_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#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 4e42d50..9aa369d 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.c
@@ -31,17 +31,6 @@
#include "gimpoperationhsvvaluelegacy.h"
-
-static gboolean gimp_operation_hsv_value_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationHsvValueLegacy, gimp_operation_hsv_value_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -68,41 +57,19 @@ gimp_operation_hsv_value_legacy_init (GimpOperationHsvValueLegacy *self)
{
}
-static gboolean
-gimp_operation_hsv_value_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_hsv_value_legacy_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_hsv_value_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_hsv_value_legacy_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
- const gboolean has_mask = mask != NULL;
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *out = out_p, *layer = layer_p, *mask = mask_p;
while (samples--)
{
@@ -112,7 +79,7 @@ gimp_operation_hsv_value_legacy_process_pixels (gfloat *in,
gfloat comp_alpha, new_alpha;
comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
- if (has_mask)
+ if (mask)
comp_alpha *= *mask;
new_alpha = in[ALPHA] + (1.0 - in[ALPHA]) * comp_alpha;
@@ -154,7 +121,7 @@ gimp_operation_hsv_value_legacy_process_pixels (gfloat *in,
layer += 4;
out += 4;
- if (has_mask)
+ if (mask)
mask++;
}
diff --git a/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.h
b/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.h
index 00c5311..bbef81c 100644
--- a/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationhsvvaluelegacy.h
@@ -49,17 +49,14 @@ struct _GimpOperationHsvValueLegacyClass
GType gimp_operation_hsv_value_legacy_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_hsv_value_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_hsv_value_legacy_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#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 58b832a..3a555ae 100644
--- a/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.c
@@ -28,16 +28,6 @@
#include "gimpoperationlightenonlylegacy.h"
-static gboolean gimp_operation_lighten_only_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationLightenOnlyLegacy, gimp_operation_lighten_only_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -64,48 +54,26 @@ gimp_operation_lighten_only_legacy_init (GimpOperationLightenOnlyLegacy *self)
{
}
-static gboolean
-gimp_operation_lighten_only_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_lighten_only_legacy_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_lighten_only_legacy_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_lighten_only_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- const gboolean has_mask = mask != NULL;
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *out = out_p, *layer = layer_p, *mask = mask_p;
while (samples--)
{
gfloat comp_alpha, new_alpha;
comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
- if (has_mask)
+ if (mask)
comp_alpha *= *mask;
new_alpha = in[ALPHA] + (1.0 - in[ALPHA]) * comp_alpha;
@@ -138,7 +106,7 @@ gimp_operation_lighten_only_legacy_process_pixels (gfloat *in,
layer += 4;
out += 4;
- if (has_mask)
+ if (mask)
mask++;
}
diff --git a/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.h
b/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.h
index 8b98e33..9b6ada2 100644
--- a/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationlightenonlylegacy.h
@@ -49,17 +49,14 @@ struct _GimpOperationLightenOnlyLegacyClass
GType gimp_operation_lighten_only_legacy_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_lighten_only_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_lighten_only_legacy_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#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 4d4ddef..6445752 100644
--- a/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.c
@@ -27,17 +27,6 @@
#include "gimpoperationmultiplylegacy.h"
-
-static gboolean gimp_operation_multiply_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationMultiplyLegacy, gimp_operation_multiply_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -64,48 +53,27 @@ gimp_operation_multiply_legacy_init (GimpOperationMultiplyLegacy *self)
{
}
-static gboolean
-gimp_operation_multiply_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_multiply_legacy_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_multiply_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_multiply_legacy_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
- const gboolean has_mask = mask != NULL;
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *out = out_p, *layer = layer_p, *mask = mask_p;
+
while (samples--)
{
gfloat comp_alpha, new_alpha;
comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
- if (has_mask)
+ if (mask)
comp_alpha *= *mask;
new_alpha = in[ALPHA] + (1.0 - in[ALPHA]) * comp_alpha;
@@ -138,7 +106,7 @@ gimp_operation_multiply_legacy_process_pixels (gfloat *in,
layer += 4;
out += 4;
- if (has_mask)
+ if (mask)
mask++;
}
diff --git a/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.h
b/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.h
index 2e3aff7..dbeb9cd 100644
--- a/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationmultiplylegacy.h
@@ -49,17 +49,14 @@ struct _GimpOperationMultiplyLegacyClass
GType gimp_operation_multiply_legacy_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_multiply_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_multiply_legacy_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#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 d969702..88e4402 100644
--- a/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.c
@@ -27,17 +27,6 @@
#include "gimpoperationscreenlegacy.h"
-
-static gboolean gimp_operation_screen_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationScreenLegacy, gimp_operation_screen_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -64,48 +53,26 @@ gimp_operation_screen_legacy_init (GimpOperationScreenLegacy *self)
{
}
-static gboolean
-gimp_operation_screen_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_screen_legacy_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_screen_legacy_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_screen_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- const gboolean has_mask = mask != NULL;
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *out = out_p, *layer = layer_p, *mask = mask_p;
while (samples--)
{
gfloat comp_alpha, new_alpha;
comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
- if (has_mask)
+ if (mask)
comp_alpha *= *mask;
new_alpha = in[ALPHA] + (1.0 - in[ALPHA]) * comp_alpha;
@@ -138,7 +105,7 @@ gimp_operation_screen_legacy_process_pixels (gfloat *in,
layer += 4;
out += 4;
- if (has_mask)
+ if (mask)
mask++;
}
diff --git a/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.h
b/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.h
index c43e18a..5a16a59 100644
--- a/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationscreenlegacy.h
@@ -49,17 +49,14 @@ struct _GimpOperationScreenLegacyClass
GType gimp_operation_screen_legacy_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_screen_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_screen_legacy_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#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 a314a3e..55cd819 100644
--- a/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.c
@@ -27,17 +27,6 @@
#include "gimpoperationsoftlightlegacy.h"
-
-static gboolean gimp_operation_softlight_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationSoftlightLegacy, gimp_operation_softlight_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -82,41 +71,26 @@ gimp_operation_softlight_legacy_init (GimpOperationSoftlightLegacy *self)
{
}
-static gboolean
-gimp_operation_softlight_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
- return gimp_operation_softlight_legacy_process_pixels (in_buf, aux_buf, aux2_buf, out_buf,
layer_mode->opacity, samples, roi, level, layer_mode->blend_trc, layer_mode->composite_trc,
layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_softlight_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_softlight_legacy_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
- const gboolean has_mask = mask != NULL;
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *out = out_p, *layer = layer_p, *mask = mask_p;
while (samples--)
{
gfloat comp_alpha, new_alpha;
comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
- if (has_mask)
+ if (mask)
comp_alpha *= *mask;
new_alpha = in[ALPHA] + (1.0 - in[ALPHA]) * comp_alpha;
@@ -163,7 +137,7 @@ gimp_operation_softlight_legacy_process_pixels (gfloat *in,
layer += 4;
out += 4;
- if (has_mask)
+ if (mask)
mask ++;
}
diff --git a/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.h
b/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.h
index 42b125e..d760e41 100644
--- a/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationsoftlightlegacy.h
@@ -49,17 +49,14 @@ struct _GimpOperationSoftlightLegacyClass
GType gimp_operation_softlight_legacy_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_softlight_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_softlight_legacy_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#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 8eeb7a2..a19d070 100644
--- a/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.c
+++ b/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.c
@@ -27,21 +27,9 @@
#include "gimpoperationsubtractlegacy.h"
-
-static gboolean gimp_operation_subtract_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationSubtractLegacy, gimp_operation_subtract_legacy,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
-
static void
gimp_operation_subtract_legacy_class_init (GimpOperationSubtractLegacyClass *klass)
{
@@ -64,48 +52,27 @@ gimp_operation_subtract_legacy_init (GimpOperationSubtractLegacy *self)
{
}
-static gboolean
-gimp_operation_subtract_legacy_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+
+gboolean
+gimp_operation_subtract_legacy_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_subtract_legacy_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_subtract_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- const gboolean has_mask = mask != NULL;
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *out = out_p, *layer = layer_p, *mask = mask_p;
while (samples--)
{
gfloat comp_alpha, new_alpha;
comp_alpha = MIN (in[ALPHA], layer[ALPHA]) * opacity;
- if (has_mask)
+ if (mask)
comp_alpha *= *mask;
new_alpha = in[ALPHA] + (1.0 - in[ALPHA]) * comp_alpha;
@@ -138,7 +105,7 @@ gimp_operation_subtract_legacy_process_pixels (gfloat *in,
layer += 4;
out += 4;
- if (has_mask)
+ if (mask)
mask++;
}
diff --git a/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.h
b/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.h
index 97ce1d6..ff39e0e 100644
--- a/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.h
+++ b/app/operations/layer-modes-legacy/gimpoperationsubtractlegacy.h
@@ -49,17 +49,14 @@ struct _GimpOperationSubtractLegacyClass
GType gimp_operation_subtract_legacy_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_subtract_legacy_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_subtract_legacy_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_SUBTRACT_LEGACY_H__ */
diff --git a/app/operations/layer-modes/gimpblendcomposite.h b/app/operations/layer-modes/gimpblendcomposite.h
index 7a5eed1..415e85d 100644
--- a/app/operations/layer-modes/gimpblendcomposite.h
+++ b/app/operations/layer-modes/gimpblendcomposite.h
@@ -203,17 +203,15 @@ compfun_src_in (gfloat *in,
}
static inline void
-gimp_composite_blend (gfloat *in,
+gimp_composite_blend (gpointer op,
+ gfloat *in,
gfloat *layer,
gfloat *mask,
gfloat *out,
- gfloat opacity,
glong samples,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode,
GimpBlendFunc blend_func)
{
+ GimpOperationPointLayerMode *layer_mode = op;
gfloat *blend_in = in;
gfloat *blend_layer = layer;
gfloat *blend_out = out;
@@ -225,6 +223,11 @@ gimp_composite_blend (gfloat *in,
const Babl *fish_to_composite = NULL;
const Babl *fish_from_composite = NULL;
+ float opacity = layer_mode->opacity;
+ GimpLayerColorSpace blend_trc = layer_mode->blend_trc;
+ GimpLayerColorSpace composite_trc = layer_mode->composite_trc;
+ GimpLayerCompositeMode composite_mode = layer_mode->composite_mode;
+
switch (blend_trc)
{
default:
@@ -1073,4 +1076,26 @@ blendfun_lch_lightness (const float *dest,
}
}
+
+static inline void
+blendfun_copy (const float *dest,
+ const float *src,
+ float *out,
+ int samples)
+{
+ while (samples--)
+ {
+ gint c;
+ for (c = 0; c < 4; c++)
+ out[c] = src[c];
+
+ out[ALPHA] = src[ALPHA];
+
+ out += 4;
+ src += 4;
+ dest += 4;
+ }
+}
+
+
#endif /* __GIMP_BLEND_COMPOSITE_H__ */
diff --git a/app/operations/layer-modes/gimplayermodefunctions.c
b/app/operations/layer-modes/gimplayermodefunctions.c
index cb9a50c..3bc190e 100644
--- a/app/operations/layer-modes/gimplayermodefunctions.c
+++ b/app/operations/layer-modes/gimplayermodefunctions.c
@@ -86,217 +86,217 @@ gimp_get_layer_mode_function (GimpLayerMode paint_mode)
{
case GIMP_LAYER_MODE_NORMAL:
case GIMP_LAYER_MODE_NORMAL_NON_LINEAR:
- func = gimp_operation_normal_process_pixels;
+ func = gimp_operation_normal_process;
break;
case GIMP_LAYER_MODE_DISSOLVE:
- func = gimp_operation_dissolve_process_pixels;
+ func = gimp_operation_dissolve_process;
break;
case GIMP_LAYER_MODE_BEHIND:
case GIMP_LAYER_MODE_BEHIND_LINEAR:
- func = gimp_operation_behind_process_pixels;
+ func = gimp_operation_behind_process;
break;
case GIMP_LAYER_MODE_MULTIPLY_LEGACY:
- func = gimp_operation_multiply_legacy_process_pixels;
+ func = gimp_operation_multiply_legacy_process;
break;
case GIMP_LAYER_MODE_MULTIPLY:
case GIMP_LAYER_MODE_MULTIPLY_LINEAR:
- func = gimp_operation_multiply_process_pixels;
+ func = gimp_operation_multiply_process;
break;
case GIMP_LAYER_MODE_SCREEN_LEGACY:
- func = gimp_operation_screen_legacy_process_pixels;
+ func = gimp_operation_screen_legacy_process;
break;
case GIMP_LAYER_MODE_SCREEN:
- func = gimp_operation_screen_process_pixels;
+ func = gimp_operation_screen_process;
break;
case GIMP_LAYER_MODE_OVERLAY_LEGACY:
- func = gimp_operation_softlight_legacy_process_pixels;
+ func = gimp_operation_softlight_legacy_process;
break;
case GIMP_LAYER_MODE_DIFFERENCE_LEGACY:
- func = gimp_operation_difference_legacy_process_pixels;
+ func = gimp_operation_difference_legacy_process;
break;
case GIMP_LAYER_MODE_DIFFERENCE:
case GIMP_LAYER_MODE_DIFFERENCE_LINEAR:
- func = gimp_operation_difference_process_pixels;
+ func = gimp_operation_difference_process;
break;
case GIMP_LAYER_MODE_ADDITION_LEGACY:
- func = gimp_operation_addition_legacy_process_pixels;
+ func = gimp_operation_addition_legacy_process;
break;
case GIMP_LAYER_MODE_ADDITION:
case GIMP_LAYER_MODE_ADDITION_LINEAR:
- func = gimp_operation_addition_process_pixels;
+ func = gimp_operation_addition_process;
break;
case GIMP_LAYER_MODE_SUBTRACT_LEGACY:
- func = gimp_operation_subtract_legacy_process_pixels;
+ func = gimp_operation_subtract_legacy_process;
break;
case GIMP_LAYER_MODE_SUBTRACT:
case GIMP_LAYER_MODE_SUBTRACT_LINEAR:
- func = gimp_operation_subtract_process_pixels;
+ func = gimp_operation_subtract_process;
break;
case GIMP_LAYER_MODE_DARKEN_ONLY_LEGACY:
- func = gimp_operation_darken_only_legacy_process_pixels;
+ func = gimp_operation_darken_only_legacy_process;
break;
case GIMP_LAYER_MODE_DARKEN_ONLY:
case GIMP_LAYER_MODE_DARKEN_ONLY_LINEAR:
- func = gimp_operation_darken_only_process_pixels;
+ func = gimp_operation_darken_only_process;
break;
case GIMP_LAYER_MODE_LIGHTEN_ONLY_LEGACY:
- func = gimp_operation_lighten_only_legacy_process_pixels;
+ func = gimp_operation_lighten_only_legacy_process;
break;
case GIMP_LAYER_MODE_LIGHTEN_ONLY:
case GIMP_LAYER_MODE_LIGHTEN_ONLY_LINEAR:
- func = gimp_operation_lighten_only_process_pixels;
+ func = gimp_operation_lighten_only_process;
break;
case GIMP_LAYER_MODE_HSV_HUE:
- func = gimp_operation_hsv_hue_process_pixels;
+ func = gimp_operation_hsv_hue_process;
break;
case GIMP_LAYER_MODE_HSV_HUE_LEGACY:
- func = gimp_operation_hsv_hue_legacy_process_pixels;
+ func = gimp_operation_hsv_hue_legacy_process;
break;
case GIMP_LAYER_MODE_HSV_SATURATION:
- func = gimp_operation_hsv_saturation_process_pixels;
+ func = gimp_operation_hsv_saturation_process;
break;
case GIMP_LAYER_MODE_HSV_SATURATION_LEGACY:
- func = gimp_operation_hsv_saturation_legacy_process_pixels;
+ func = gimp_operation_hsv_saturation_legacy_process;
break;
case GIMP_LAYER_MODE_HSV_COLOR:
- func = gimp_operation_hsv_color_process_pixels;
+ func = gimp_operation_hsv_color_process;
break;
case GIMP_LAYER_MODE_HSV_COLOR_LEGACY:
- func = gimp_operation_hsv_color_legacy_process_pixels;
+ func = gimp_operation_hsv_color_legacy_process;
break;
case GIMP_LAYER_MODE_HSV_VALUE:
- func = gimp_operation_hsv_value_process_pixels;
+ func = gimp_operation_hsv_value_process;
break;
case GIMP_LAYER_MODE_HSV_VALUE_LEGACY:
- func = gimp_operation_hsv_value_legacy_process_pixels;
+ func = gimp_operation_hsv_value_legacy_process;
break;
case GIMP_LAYER_MODE_DIVIDE_LEGACY:
- func = gimp_operation_divide_legacy_process_pixels;
+ func = gimp_operation_divide_legacy_process;
break;
case GIMP_LAYER_MODE_DIVIDE:
case GIMP_LAYER_MODE_DIVIDE_LINEAR:
- func = gimp_operation_divide_process_pixels;
+ func = gimp_operation_divide_process;
break;
case GIMP_LAYER_MODE_DODGE_LEGACY:
- func = gimp_operation_dodge_legacy_process_pixels;
+ func = gimp_operation_dodge_legacy_process;
break;
case GIMP_LAYER_MODE_DODGE:
case GIMP_LAYER_MODE_DODGE_LINEAR:
- func = gimp_operation_dodge_process_pixels;
+ func = gimp_operation_dodge_process;
break;
case GIMP_LAYER_MODE_BURN_LEGACY:
- func = gimp_operation_burn_legacy_process_pixels;
+ func = gimp_operation_burn_legacy_process;
break;
case GIMP_LAYER_MODE_BURN:
case GIMP_LAYER_MODE_BURN_LINEAR:
- func = gimp_operation_burn_process_pixels;
+ func = gimp_operation_burn_process;
break;
case GIMP_LAYER_MODE_HARDLIGHT_LEGACY:
- func = gimp_operation_hardlight_legacy_process_pixels;
+ func = gimp_operation_hardlight_legacy_process;
break;
case GIMP_LAYER_MODE_HARDLIGHT:
- func = gimp_operation_hardlight_process_pixels;
+ func = gimp_operation_hardlight_process;
break;
case GIMP_LAYER_MODE_SOFTLIGHT_LEGACY:
- func = gimp_operation_softlight_legacy_process_pixels;
+ func = gimp_operation_softlight_legacy_process;
break;
case GIMP_LAYER_MODE_SOFTLIGHT:
- func = gimp_operation_softlight_process_pixels;
+ func = gimp_operation_softlight_process;
break;
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY:
- func = gimp_operation_grain_extract_legacy_process_pixels;
+ func = gimp_operation_grain_extract_legacy_process;
break;
case GIMP_LAYER_MODE_GRAIN_EXTRACT:
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR:
- func = gimp_operation_grain_extract_process_pixels;
+ func = gimp_operation_grain_extract_process;
break;
case GIMP_LAYER_MODE_GRAIN_MERGE_LEGACY:
- func = gimp_operation_grain_merge_legacy_process_pixels;
+ func = gimp_operation_grain_merge_legacy_process;
break;
case GIMP_LAYER_MODE_GRAIN_MERGE:
case GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR:
- func = gimp_operation_grain_merge_process_pixels;
+ func = gimp_operation_grain_merge_process;
break;
case GIMP_LAYER_MODE_COLOR_ERASE:
- func = gimp_operation_color_erase_process_pixels;
+ func = gimp_operation_color_erase_process;
break;
case GIMP_LAYER_MODE_OVERLAY:
- func = gimp_operation_overlay_process_pixels;
+ func = gimp_operation_overlay_process;
break;
case GIMP_LAYER_MODE_LCH_HUE:
- func = gimp_operation_lch_hue_process_pixels;
+ func = gimp_operation_lch_hue_process;
break;
case GIMP_LAYER_MODE_LCH_CHROMA:
- func = gimp_operation_lch_chroma_process_pixels;
+ func = gimp_operation_lch_chroma_process;
break;
case GIMP_LAYER_MODE_LCH_COLOR:
- func = gimp_operation_lch_color_process_pixels;
+ func = gimp_operation_lch_color_process;
break;
case GIMP_LAYER_MODE_LCH_LIGHTNESS:
- func = gimp_operation_lch_lightness_process_pixels;
+ func = gimp_operation_lch_lightness_process;
break;
case GIMP_LAYER_MODE_ERASE:
- func = gimp_operation_erase_process_pixels;
+ func = gimp_operation_erase_process;
break;
case GIMP_LAYER_MODE_REPLACE:
- func = gimp_operation_replace_process_pixels;
+ func = gimp_operation_replace_process;
break;
case GIMP_LAYER_MODE_ANTI_ERASE:
- func = gimp_operation_anti_erase_process_pixels;
+ func = gimp_operation_anti_erase_process;
break;
default:
g_warning ("No direct function for layer mode (%d), using gimp:normal",
paint_mode);
- func = gimp_operation_normal_process_pixels;
+ func = gimp_operation_normal_process;
break;
}
diff --git a/app/operations/layer-modes/gimpoperationaddition.c
b/app/operations/layer-modes/gimpoperationaddition.c
index d758cf7..c915dd6 100644
--- a/app/operations/layer-modes/gimpoperationaddition.c
+++ b/app/operations/layer-modes/gimpoperationaddition.c
@@ -29,17 +29,6 @@
#include "gimpoperationaddition.h"
#include "gimpblendcomposite.h"
-
-static gboolean gimp_operation_addition_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationAddition, gimp_operation_addition,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -66,42 +55,16 @@ gimp_operation_addition_init (GimpOperationAddition *self)
{
}
-static gboolean
-gimp_operation_addition_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_addition_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_addition_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_addition_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
- blendfun_addition);
+ gimp_composite_blend (op, in, layer, mask, out, samples, blendfun_addition);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationaddition.h
b/app/operations/layer-modes/gimpoperationaddition.h
index 6538ffa..4772ff7 100644
--- a/app/operations/layer-modes/gimpoperationaddition.h
+++ b/app/operations/layer-modes/gimpoperationaddition.h
@@ -50,17 +50,14 @@ struct _GimpOperationAdditionClass
GType gimp_operation_addition_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_addition_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_addition_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_ADDITION_H__ */
diff --git a/app/operations/layer-modes/gimpoperationantierase.c
b/app/operations/layer-modes/gimpoperationantierase.c
index 9fd6286..c968707 100644
--- a/app/operations/layer-modes/gimpoperationantierase.c
+++ b/app/operations/layer-modes/gimpoperationantierase.c
@@ -27,17 +27,6 @@
#include "gimpoperationantierase.h"
-
-static gboolean gimp_operation_anti_erase_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationAntiErase, gimp_operation_anti_erase,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -64,40 +53,18 @@ gimp_operation_anti_erase_init (GimpOperationAntiErase *self)
{
}
-static gboolean
-gimp_operation_anti_erase_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_anti_erase_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_anti_erase_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_anti_erase_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
+ gfloat *out = out_p, *in = in_p, *layer = layer_p, *mask = mask_p;
+ gfloat opacity = ((GimpOperationPointLayerMode*)(op))->opacity;
const gboolean has_mask = mask != NULL;
while (samples--)
diff --git a/app/operations/layer-modes/gimpoperationantierase.h
b/app/operations/layer-modes/gimpoperationantierase.h
index c108324..77d3303 100644
--- a/app/operations/layer-modes/gimpoperationantierase.h
+++ b/app/operations/layer-modes/gimpoperationantierase.h
@@ -49,17 +49,14 @@ struct _GimpOperationAntiEraseClass
GType gimp_operation_anti_erase_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_anti_erase_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_anti_erase_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_ANTI_ERASE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationbehind.c
b/app/operations/layer-modes/gimpoperationbehind.c
index a4d15b8..788d492 100644
--- a/app/operations/layer-modes/gimpoperationbehind.c
+++ b/app/operations/layer-modes/gimpoperationbehind.c
@@ -27,17 +27,6 @@
#include "gimpoperationbehind.h"
-
-static gboolean gimp_operation_behind_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationBehind, gimp_operation_behind,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -64,40 +53,18 @@ gimp_operation_behind_init (GimpOperationBehind *self)
{
}
-static gboolean
-gimp_operation_behind_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_behind_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_behind_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_behind_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
+ gfloat opacity = ((GimpOperationPointLayerMode *)(op))->opacity;
+ gfloat *in = in_p, *layer = layer_p, *mask = mask_p, *out = out_p;
const gboolean has_mask = mask != NULL;
while (samples--)
diff --git a/app/operations/layer-modes/gimpoperationbehind.h
b/app/operations/layer-modes/gimpoperationbehind.h
index fb32de8..da9f274 100644
--- a/app/operations/layer-modes/gimpoperationbehind.h
+++ b/app/operations/layer-modes/gimpoperationbehind.h
@@ -49,17 +49,14 @@ struct _GimpOperationBehindClass
GType gimp_operation_behind_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_behind_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_behind_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_BEHIND_H__ */
diff --git a/app/operations/layer-modes/gimpoperationburn.c b/app/operations/layer-modes/gimpoperationburn.c
index db1d675..7adb3ee 100644
--- a/app/operations/layer-modes/gimpoperationburn.c
+++ b/app/operations/layer-modes/gimpoperationburn.c
@@ -29,17 +29,6 @@
#include "gimpoperationburn.h"
#include "gimpblendcomposite.h"
-
-static gboolean gimp_operation_burn_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationBurn, gimp_operation_burn,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -66,42 +55,18 @@ gimp_operation_burn_init (GimpOperationBurn *self)
{
}
-static gboolean
+
+gboolean
gimp_operation_burn_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_burn_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_mode,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_burn_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (operation, in, layer, mask, out, samples,
blendfun_burn);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationburn.h b/app/operations/layer-modes/gimpoperationburn.h
index 5404290..6fad8e1 100644
--- a/app/operations/layer-modes/gimpoperationburn.h
+++ b/app/operations/layer-modes/gimpoperationburn.h
@@ -50,17 +50,14 @@ struct _GimpOperationBurnClass
GType gimp_operation_burn_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_burn_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_burn_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_BURN_H__ */
diff --git a/app/operations/layer-modes/gimpoperationcolorerase.c
b/app/operations/layer-modes/gimpoperationcolorerase.c
index 7f3f99f..faf99c1 100644
--- a/app/operations/layer-modes/gimpoperationcolorerase.c
+++ b/app/operations/layer-modes/gimpoperationcolorerase.c
@@ -31,17 +31,6 @@
#include "gimpoperationcolorerase.h"
-
-static gboolean gimp_operation_color_erase_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationColorErase, gimp_operation_color_erase,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -68,40 +57,19 @@ gimp_operation_color_erase_init (GimpOperationColorErase *self)
{
}
-static gboolean
-gimp_operation_color_erase_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_color_erase_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_color_erase_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_color_erase_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
+ GimpOperationPointLayerMode *layer_mode = (gpointer) op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *layer = layer_p, *mask = mask_p, *out = out_p;
const gboolean has_mask = mask != NULL;
while (samples--)
diff --git a/app/operations/layer-modes/gimpoperationcolorerase.h
b/app/operations/layer-modes/gimpoperationcolorerase.h
index f1f8912..cee4154 100644
--- a/app/operations/layer-modes/gimpoperationcolorerase.h
+++ b/app/operations/layer-modes/gimpoperationcolorerase.h
@@ -49,17 +49,14 @@ struct _GimpOperationColorEraseClass
GType gimp_operation_color_erase_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_color_erase_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_color_erase_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_COLOR_ERASE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationdarkenonly.c
b/app/operations/layer-modes/gimpoperationdarkenonly.c
index bc818c6..ab15d54 100644
--- a/app/operations/layer-modes/gimpoperationdarkenonly.c
+++ b/app/operations/layer-modes/gimpoperationdarkenonly.c
@@ -29,17 +29,6 @@
#include "gimpoperationdarkenonly.h"
#include "gimpblendcomposite.h"
-
-static gboolean gimp_operation_darken_only_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationDarkenOnly, gimp_operation_darken_only,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -66,42 +55,17 @@ gimp_operation_darken_only_init (GimpOperationDarkenOnly *self)
{
}
-static gboolean
-gimp_operation_darken_only_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_darken_only_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_darken_only_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_darken_only_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (op, in, layer, mask, out, samples,
blendfun_darken_only);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationdarkenonly.h
b/app/operations/layer-modes/gimpoperationdarkenonly.h
index a075959..1407c9e 100644
--- a/app/operations/layer-modes/gimpoperationdarkenonly.h
+++ b/app/operations/layer-modes/gimpoperationdarkenonly.h
@@ -50,17 +50,14 @@ struct _GimpOperationDarkenOnlyClass
GType gimp_operation_darken_only_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_darken_only_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_darken_only_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_DARKEN_ONLY_H__ */
diff --git a/app/operations/layer-modes/gimpoperationdifference.c
b/app/operations/layer-modes/gimpoperationdifference.c
index c9bc28b..314cfa2 100644
--- a/app/operations/layer-modes/gimpoperationdifference.c
+++ b/app/operations/layer-modes/gimpoperationdifference.c
@@ -30,16 +30,6 @@
#include "gimpblendcomposite.h"
-static gboolean gimp_operation_difference_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationDifference, gimp_operation_difference,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -66,42 +56,17 @@ gimp_operation_difference_init (GimpOperationDifference *self)
{
}
-static gboolean
-gimp_operation_difference_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_difference_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_difference_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_difference_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (op, in, layer, mask, out, samples,
blendfun_difference);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationdifference.h
b/app/operations/layer-modes/gimpoperationdifference.h
index 366835b..3bbe3fd 100644
--- a/app/operations/layer-modes/gimpoperationdifference.h
+++ b/app/operations/layer-modes/gimpoperationdifference.h
@@ -50,17 +50,14 @@ struct _GimpOperationDifferenceClass
GType gimp_operation_difference_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_difference_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_difference_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_DIFFERENCE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationdissolve.c
b/app/operations/layer-modes/gimpoperationdissolve.c
index 867c573..2992c5c 100644
--- a/app/operations/layer-modes/gimpoperationdissolve.c
+++ b/app/operations/layer-modes/gimpoperationdissolve.c
@@ -32,16 +32,6 @@
#define RANDOM_TABLE_SIZE 4096
-static gboolean gimp_operation_dissolve_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *result,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationDissolve, gimp_operation_dissolve,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -80,40 +70,19 @@ gimp_operation_dissolve_init (GimpOperationDissolve *self)
{
}
-static gboolean
-gimp_operation_dissolve_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *result,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_dissolve_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, result, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_dissolve_process_pixels (gfloat *in,
- gfloat *aux,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *result,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_dissolve_process (GeglOperation *op,
+ void *in_p,
+ void *aux_p,
+ void *mask_p,
+ void *out_p,
+ glong samples,
+ const GeglRectangle *result,
+ gint level)
{
+ GimpOperationPointLayerMode *layer_mode = (gpointer) op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *aux = aux_p, *mask = mask_p, *out = out_p;
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 604aa74..7a07075 100644
--- a/app/operations/layer-modes/gimpoperationdissolve.h
+++ b/app/operations/layer-modes/gimpoperationdissolve.h
@@ -49,17 +49,14 @@ struct _GimpOperationDissolve
GType gimp_operation_dissolve_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_dissolve_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *result,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_dissolve_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *result,
+ gint level);
#endif /* __GIMP_OPERATION_DISSOLVE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationdivide.c
b/app/operations/layer-modes/gimpoperationdivide.c
index 79a4ea4..150adc6 100644
--- a/app/operations/layer-modes/gimpoperationdivide.c
+++ b/app/operations/layer-modes/gimpoperationdivide.c
@@ -30,16 +30,6 @@
#include "gimpblendcomposite.h"
-static gboolean gimp_operation_divide_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationDivide, gimp_operation_divide,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -66,42 +56,16 @@ gimp_operation_divide_init (GimpOperationDivide *self)
{
}
-static gboolean
-gimp_operation_divide_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_divide_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_divide_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_divide_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
- blendfun_divide);
+ gimp_composite_blend (op, in, layer, mask, out, samples, blendfun_divide);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationdivide.h
b/app/operations/layer-modes/gimpoperationdivide.h
index 021da6e..fd9d6de 100644
--- a/app/operations/layer-modes/gimpoperationdivide.h
+++ b/app/operations/layer-modes/gimpoperationdivide.h
@@ -50,17 +50,14 @@ struct _GimpOperationDivideClass
GType gimp_operation_divide_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_divide_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_divide_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_DIVIDE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationdodge.c b/app/operations/layer-modes/gimpoperationdodge.c
index c97ba22..671fd93 100644
--- a/app/operations/layer-modes/gimpoperationdodge.c
+++ b/app/operations/layer-modes/gimpoperationdodge.c
@@ -30,16 +30,6 @@
#include "gimpblendcomposite.h"
-static gboolean gimp_operation_dodge_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationDodge, gimp_operation_dodge,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -66,42 +56,16 @@ gimp_operation_dodge_init (GimpOperationDodge *self)
{
}
-static gboolean
-gimp_operation_dodge_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_dodge_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_dodge_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_dodge_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
- blendfun_dodge);
+ gimp_composite_blend (op, in, layer, mask, out, samples, blendfun_dodge);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationdodge.h b/app/operations/layer-modes/gimpoperationdodge.h
index 162dc2f..648e5e3 100644
--- a/app/operations/layer-modes/gimpoperationdodge.h
+++ b/app/operations/layer-modes/gimpoperationdodge.h
@@ -50,17 +50,14 @@ struct _GimpOperationDodgeClass
GType gimp_operation_dodge_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_dodge_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_dodge_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_DODGE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationerase.c b/app/operations/layer-modes/gimpoperationerase.c
index 8b50e47..f305a5e 100644
--- a/app/operations/layer-modes/gimpoperationerase.c
+++ b/app/operations/layer-modes/gimpoperationerase.c
@@ -27,17 +27,6 @@
#include "gimpoperationerase.h"
-
-static gboolean gimp_operation_erase_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationErase, gimp_operation_erase,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -64,40 +53,19 @@ gimp_operation_erase_init (GimpOperationErase *self)
{
}
-static gboolean
-gimp_operation_erase_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_erase_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_erase_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_erase_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *layer = layer_p, *mask = mask_p, *out = out_p;
const gboolean has_mask = mask != NULL;
while (samples--)
diff --git a/app/operations/layer-modes/gimpoperationerase.h b/app/operations/layer-modes/gimpoperationerase.h
index e320f0c..bb800c7 100644
--- a/app/operations/layer-modes/gimpoperationerase.h
+++ b/app/operations/layer-modes/gimpoperationerase.h
@@ -49,17 +49,14 @@ struct _GimpOperationEraseClass
GType gimp_operation_erase_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_erase_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_erase_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_ERASE_MODE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationgrainextract.c
b/app/operations/layer-modes/gimpoperationgrainextract.c
index 79aca58..c26cd12 100644
--- a/app/operations/layer-modes/gimpoperationgrainextract.c
+++ b/app/operations/layer-modes/gimpoperationgrainextract.c
@@ -30,16 +30,6 @@
#include "gimpblendcomposite.h"
-static gboolean gimp_operation_grain_extract_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationGrainExtract, gimp_operation_grain_extract,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -66,42 +56,17 @@ gimp_operation_grain_extract_init (GimpOperationGrainExtract *self)
{
}
-static gboolean
-gimp_operation_grain_extract_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_grain_extract_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_grain_extract_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_grain_extract_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (op, in, layer, mask, out, samples,
blendfun_grain_extract);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationgrainextract.h
b/app/operations/layer-modes/gimpoperationgrainextract.h
index e34bdce..bc15ffe 100644
--- a/app/operations/layer-modes/gimpoperationgrainextract.h
+++ b/app/operations/layer-modes/gimpoperationgrainextract.h
@@ -50,17 +50,14 @@ struct _GimpOperationGrainExtractClass
GType gimp_operation_grain_extract_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_grain_extract_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_grain_extract_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_GRAIN_EXTRACT_H__ */
diff --git a/app/operations/layer-modes/gimpoperationgrainmerge.c
b/app/operations/layer-modes/gimpoperationgrainmerge.c
index 492dcad..67b702a 100644
--- a/app/operations/layer-modes/gimpoperationgrainmerge.c
+++ b/app/operations/layer-modes/gimpoperationgrainmerge.c
@@ -29,17 +29,6 @@
#include "gimpoperationgrainmerge.h"
#include "gimpblendcomposite.h"
-
-static gboolean gimp_operation_grain_merge_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationGrainMerge, gimp_operation_grain_merge,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -66,42 +55,17 @@ gimp_operation_grain_merge_init (GimpOperationGrainMerge *self)
{
}
-static gboolean
-gimp_operation_grain_merge_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_grain_merge_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_grain_merge_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_grain_merge_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (op, in, layer, mask, out, samples,
blendfun_grain_merge);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationgrainmerge.h
b/app/operations/layer-modes/gimpoperationgrainmerge.h
index 875db95..e8123d5 100644
--- a/app/operations/layer-modes/gimpoperationgrainmerge.h
+++ b/app/operations/layer-modes/gimpoperationgrainmerge.h
@@ -50,17 +50,14 @@ struct _GimpOperationGrainMergeClass
GType gimp_operation_grain_merge_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_grain_merge_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_grain_merge_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_GRAIN_MERGE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationhardlight.c
b/app/operations/layer-modes/gimpoperationhardlight.c
index 50040cd..965c332 100644
--- a/app/operations/layer-modes/gimpoperationhardlight.c
+++ b/app/operations/layer-modes/gimpoperationhardlight.c
@@ -29,16 +29,6 @@
#include "gimpblendcomposite.h"
-static gboolean gimp_operation_hardlight_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationHardlight, gimp_operation_hardlight,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -65,42 +55,17 @@ gimp_operation_hardlight_init (GimpOperationHardlight *self)
{
}
-static gboolean
-gimp_operation_hardlight_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_hardlight_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_hardlight_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_hardlight_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (op, in, layer, mask, out, samples,
blendfun_hardlight);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationhardlight.h
b/app/operations/layer-modes/gimpoperationhardlight.h
index 790e5cc..7a4af0d 100644
--- a/app/operations/layer-modes/gimpoperationhardlight.h
+++ b/app/operations/layer-modes/gimpoperationhardlight.h
@@ -49,17 +49,14 @@ struct _GimpOperationHardlightClass
GType gimp_operation_hardlight_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_hardlight_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_hardlight_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_HARDLIGHT_H__ */
diff --git a/app/operations/layer-modes/gimpoperationhsvcolor.c
b/app/operations/layer-modes/gimpoperationhsvcolor.c
index 5a61fb9..7612e5f 100644
--- a/app/operations/layer-modes/gimpoperationhsvcolor.c
+++ b/app/operations/layer-modes/gimpoperationhsvcolor.c
@@ -34,16 +34,6 @@
#include "gimpblendcomposite.h"
-static gboolean gimp_operation_hsv_color_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationHsvColor, gimp_operation_hsv_color,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -70,42 +60,17 @@ gimp_operation_hsv_color_init (GimpOperationHsvColor *self)
{
}
-static gboolean
-gimp_operation_hsv_color_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_hsv_color_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_hsv_color_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_hsv_color_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (op, in, layer, mask, out, samples,
blendfun_hsv_color);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationhsvcolor.h
b/app/operations/layer-modes/gimpoperationhsvcolor.h
index 54d2b2f..a79b518 100644
--- a/app/operations/layer-modes/gimpoperationhsvcolor.h
+++ b/app/operations/layer-modes/gimpoperationhsvcolor.h
@@ -50,17 +50,14 @@ struct _GimpOperationHsvColorClass
GType gimp_operation_hsv_color_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_hsv_color_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_hsv_color_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_HSV_COLOR_H__ */
diff --git a/app/operations/layer-modes/gimpoperationhsvhue.c
b/app/operations/layer-modes/gimpoperationhsvhue.c
index f040942..e38ce10 100644
--- a/app/operations/layer-modes/gimpoperationhsvhue.c
+++ b/app/operations/layer-modes/gimpoperationhsvhue.c
@@ -33,17 +33,6 @@
#include "gimpoperationhsvhue.h"
#include "gimpblendcomposite.h"
-
-static gboolean gimp_operation_hsv_hue_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationHsvHue, gimp_operation_hsv_hue,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -70,42 +59,17 @@ gimp_operation_hsv_hue_init (GimpOperationHsvHue *self)
{
}
-static gboolean
-gimp_operation_hsv_hue_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_hsv_hue_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_hsv_hue_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_hsv_hue_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (op, in, layer, mask, out, samples,
blendfun_hsv_hue);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationhsvhue.h
b/app/operations/layer-modes/gimpoperationhsvhue.h
index 724d4bd..8c6df24 100644
--- a/app/operations/layer-modes/gimpoperationhsvhue.h
+++ b/app/operations/layer-modes/gimpoperationhsvhue.h
@@ -50,17 +50,14 @@ struct _GimpOperationHsvHueClass
GType gimp_operation_hsv_hue_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_hsv_hue_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_hsv_hue_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_HSV_HUE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationhsvsaturation.c
b/app/operations/layer-modes/gimpoperationhsvsaturation.c
index c3910c2..29ddf22 100644
--- a/app/operations/layer-modes/gimpoperationhsvsaturation.c
+++ b/app/operations/layer-modes/gimpoperationhsvsaturation.c
@@ -33,21 +33,9 @@
#include "gimpoperationhsvsaturation.h"
#include "gimpblendcomposite.h"
-
-static gboolean gimp_operation_hsv_saturation_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationHsvSaturation, gimp_operation_hsv_saturation,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
-
static void
gimp_operation_hsv_saturation_class_init (GimpOperationHsvSaturationClass *klass)
{
@@ -70,42 +58,17 @@ gimp_operation_hsv_saturation_init (GimpOperationHsvSaturation *self)
{
}
-static gboolean
-gimp_operation_hsv_saturation_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_hsv_saturation_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_hsv_saturation_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_hsv_saturation_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (op, in, layer, mask, out, samples,
blendfun_hsv_saturation);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationhsvsaturation.h
b/app/operations/layer-modes/gimpoperationhsvsaturation.h
index ba22f23..d838ca9 100644
--- a/app/operations/layer-modes/gimpoperationhsvsaturation.h
+++ b/app/operations/layer-modes/gimpoperationhsvsaturation.h
@@ -50,17 +50,14 @@ struct _GimpOperationHsvSaturationClass
GType gimp_operation_hsv_saturation_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_hsv_saturation_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_hsv_saturation_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_HSV_SATURATION_H__ */
diff --git a/app/operations/layer-modes/gimpoperationhsvvalue.c
b/app/operations/layer-modes/gimpoperationhsvvalue.c
index a8cf4b6..c2dd25d 100644
--- a/app/operations/layer-modes/gimpoperationhsvvalue.c
+++ b/app/operations/layer-modes/gimpoperationhsvvalue.c
@@ -34,16 +34,6 @@
#include "gimpblendcomposite.h"
-static gboolean gimp_operation_hsv_value_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationHsvValue, gimp_operation_hsv_value,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -70,42 +60,17 @@ gimp_operation_hsv_value_init (GimpOperationHsvValue *self)
{
}
-static gboolean
-gimp_operation_hsv_value_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_hsv_value_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_hsv_value_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_hsv_value_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (op, in, layer, mask, out, samples,
blendfun_hsv_value);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationhsvvalue.h
b/app/operations/layer-modes/gimpoperationhsvvalue.h
index 7419d76..f5bf94e 100644
--- a/app/operations/layer-modes/gimpoperationhsvvalue.h
+++ b/app/operations/layer-modes/gimpoperationhsvvalue.h
@@ -50,17 +50,14 @@ struct _GimpOperationHsvValueClass
GType gimp_operation_hsv_value_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_hsv_value_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_hsv_value_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_HSV_VALUE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlchchroma.c
b/app/operations/layer-modes/gimpoperationlchchroma.c
index 092d1bb..4503046 100644
--- a/app/operations/layer-modes/gimpoperationlchchroma.c
+++ b/app/operations/layer-modes/gimpoperationlchchroma.c
@@ -30,17 +30,6 @@
#include "gimpoperationlchchroma.h"
#include "gimpblendcomposite.h"
-
-static gboolean gimp_operation_lch_chroma_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationLchChroma, gimp_operation_lch_chroma,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -71,42 +60,17 @@ gimp_operation_lch_chroma_init (GimpOperationLchChroma *self)
{
}
-static gboolean
-gimp_operation_lch_chroma_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_lch_chroma_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_lch_chroma_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_lch_chroma_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (op, in, layer, mask, out, samples,
blendfun_lch_chroma);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationlchchroma.h
b/app/operations/layer-modes/gimpoperationlchchroma.h
index 40cab8d..67a1d63 100644
--- a/app/operations/layer-modes/gimpoperationlchchroma.h
+++ b/app/operations/layer-modes/gimpoperationlchchroma.h
@@ -51,17 +51,14 @@ struct _GimpOperationLchChromaClass
GType gimp_operation_lch_chroma_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_lch_chroma_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_lch_chroma_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_LCH_CHROMA_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlchcolor.c
b/app/operations/layer-modes/gimpoperationlchcolor.c
index f2ecadd..cc37eee 100644
--- a/app/operations/layer-modes/gimpoperationlchcolor.c
+++ b/app/operations/layer-modes/gimpoperationlchcolor.c
@@ -30,17 +30,6 @@
#include "gimpoperationlchcolor.h"
#include "gimpblendcomposite.h"
-
-static gboolean gimp_operation_lch_color_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationLchColor, gimp_operation_lch_color,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -71,42 +60,17 @@ gimp_operation_lch_color_init (GimpOperationLchColor *self)
{
}
-static gboolean
-gimp_operation_lch_color_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_lch_color_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_lch_color_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_lch_color_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (op, in, layer, mask, out, samples,
blendfun_lch_color);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationlchcolor.h
b/app/operations/layer-modes/gimpoperationlchcolor.h
index 8ea4aff..84c9dd8 100644
--- a/app/operations/layer-modes/gimpoperationlchcolor.h
+++ b/app/operations/layer-modes/gimpoperationlchcolor.h
@@ -51,17 +51,14 @@ struct _GimpOperationLchColorClass
GType gimp_operation_lch_color_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_lch_color_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_lch_color_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_LCH_COLOR_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlchhue.c
b/app/operations/layer-modes/gimpoperationlchhue.c
index 8fa855d..32bf3e9 100644
--- a/app/operations/layer-modes/gimpoperationlchhue.c
+++ b/app/operations/layer-modes/gimpoperationlchhue.c
@@ -30,17 +30,6 @@
#include "gimpoperationlchhue.h"
#include "gimpblendcomposite.h"
-
-static gboolean gimp_operation_lch_hue_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationLchHue, gimp_operation_lch_hue,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -71,42 +60,17 @@ gimp_operation_lch_hue_init (GimpOperationLchHue *self)
{
}
-static gboolean
-gimp_operation_lch_hue_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_lch_hue_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_lch_hue_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_lch_hue_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (op, in, layer, mask, out, samples,
blendfun_lch_hue);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationlchhue.h
b/app/operations/layer-modes/gimpoperationlchhue.h
index 2469342..d3e3487 100644
--- a/app/operations/layer-modes/gimpoperationlchhue.h
+++ b/app/operations/layer-modes/gimpoperationlchhue.h
@@ -51,16 +51,13 @@ struct _GimpOperationLchHueClass
GType gimp_operation_lch_hue_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_lch_hue_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_lch_hue_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_LCH_HUE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlchlightness.c
b/app/operations/layer-modes/gimpoperationlchlightness.c
index 8fa1459..3743a53 100644
--- a/app/operations/layer-modes/gimpoperationlchlightness.c
+++ b/app/operations/layer-modes/gimpoperationlchlightness.c
@@ -30,17 +30,6 @@
#include "gimpoperationlchlightness.h"
#include "gimpblendcomposite.h"
-
-static gboolean gimp_operation_lch_lightness_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationLchLightness, gimp_operation_lch_lightness,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -71,42 +60,17 @@ gimp_operation_lch_lightness_init (GimpOperationLchLightness *self)
{
}
-static gboolean
-gimp_operation_lch_lightness_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_lch_lightness_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_lch_lightness_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_lch_lightness_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (op, in, layer, mask, out, samples,
blendfun_lch_lightness);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationlchlightness.h
b/app/operations/layer-modes/gimpoperationlchlightness.h
index 6597a2d..7fcd814 100644
--- a/app/operations/layer-modes/gimpoperationlchlightness.h
+++ b/app/operations/layer-modes/gimpoperationlchlightness.h
@@ -51,17 +51,14 @@ struct _GimpOperationLchLightnessClass
GType gimp_operation_lch_lightness_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_lch_lightness_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_lch_lightness_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_LCH_LIGHTNESS_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlightenonly.c
b/app/operations/layer-modes/gimpoperationlightenonly.c
index 081b605..2fd0cfc 100644
--- a/app/operations/layer-modes/gimpoperationlightenonly.c
+++ b/app/operations/layer-modes/gimpoperationlightenonly.c
@@ -29,17 +29,6 @@
#include "gimpoperationlightenonly.h"
#include "gimpblendcomposite.h"
-
-static gboolean gimp_operation_lighten_only_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationLightenOnly, gimp_operation_lighten_only,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -66,42 +55,17 @@ gimp_operation_lighten_only_init (GimpOperationLightenOnly *self)
{
}
-static gboolean
-gimp_operation_lighten_only_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_lighten_only_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_lighten_only_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_lighten_only_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (op, in, layer, mask, out, samples,
blendfun_lighten_only);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationlightenonly.h
b/app/operations/layer-modes/gimpoperationlightenonly.h
index af36a1c..779be0b 100644
--- a/app/operations/layer-modes/gimpoperationlightenonly.h
+++ b/app/operations/layer-modes/gimpoperationlightenonly.h
@@ -50,17 +50,14 @@ struct _GimpOperationLightenOnlyClass
GType gimp_operation_lighten_only_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_lighten_only_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_lighten_only_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_LIGHTEN_ONLY_H__ */
diff --git a/app/operations/layer-modes/gimpoperationmultiply.c
b/app/operations/layer-modes/gimpoperationmultiply.c
index 27eb6e8..a87ed30 100644
--- a/app/operations/layer-modes/gimpoperationmultiply.c
+++ b/app/operations/layer-modes/gimpoperationmultiply.c
@@ -29,21 +29,9 @@
#include "gimpoperationmultiply.h"
#include "gimpblendcomposite.h"
-
-static gboolean gimp_operation_multiply_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationMultiply, gimp_operation_multiply,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
-
static void
gimp_operation_multiply_class_init (GimpOperationMultiplyClass *klass)
{
@@ -66,42 +54,17 @@ gimp_operation_multiply_init (GimpOperationMultiply *self)
{
}
-static gboolean
-gimp_operation_multiply_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_multiply_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_multiply_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_multiply_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (op, in, layer, mask, out, samples,
blendfun_multiply);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationmultiply.h
b/app/operations/layer-modes/gimpoperationmultiply.h
index e7fe255..5ee76fa 100644
--- a/app/operations/layer-modes/gimpoperationmultiply.h
+++ b/app/operations/layer-modes/gimpoperationmultiply.h
@@ -50,17 +50,14 @@ struct _GimpOperationMultiplyClass
GType gimp_operation_multiply_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_multiply_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_multiply_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_MULTIPLY_H__ */
diff --git a/app/operations/layer-modes/gimpoperationnormal-sse2.c
b/app/operations/layer-modes/gimpoperationnormal-sse2.c
index f8d48ec..9e3b048 100644
--- a/app/operations/layer-modes/gimpoperationnormal-sse2.c
+++ b/app/operations/layer-modes/gimpoperationnormal-sse2.c
@@ -32,29 +32,26 @@
#include <emmintrin.h>
gboolean
-gimp_operation_normal_process_pixels_sse2 (gfloat *in,
- gfloat *aux,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_normal_process_sse2 (GeglOperation *operation,
+ void *in,
+ void *aux,
+ void *mask_p,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
/* 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, blend_trc,
- composite_trc,
- composite_mode);
+ return gimp_operation_normal_process_core (operation, in, aux, mask_p, out,
+ samples,
+ roi, level);
}
else
{
+ gfloat opacity = ((GimpOperationPointLayerMode*)(operation))->opacity;
+ gfloat *mask = mask_p;
const __v4sf *v_in = (const __v4sf*) in;
const __v4sf *v_aux = (const __v4sf*) aux;
__v4sf *v_out = ( __v4sf*) out;
diff --git a/app/operations/layer-modes/gimpoperationnormal-sse4.c
b/app/operations/layer-modes/gimpoperationnormal-sse4.c
index ddc8d52..890a4ed 100644
--- a/app/operations/layer-modes/gimpoperationnormal-sse4.c
+++ b/app/operations/layer-modes/gimpoperationnormal-sse4.c
@@ -32,29 +32,27 @@
#include <smmintrin.h>
gboolean
-gimp_operation_normal_process_pixels_sse4 (gfloat *in,
- gfloat *aux,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_normal_process_sse4 (GeglOperation *operation,
+ void *in,
+ void *aux,
+ void *mask_p,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
/* 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, blend_trc,
- composite_trc,
- composite_mode);
+ return gimp_operation_normal_process_core (operation,
+ in, aux, mask_p, out,
+ samples,
+ roi, level);
}
else
{
+ gfloat opacity = ((GimpOperationPointLayerMode*)(operation))->opacity;
+ gfloat *mask = mask_p;
const __v4sf *v_in = (const __v4sf*) in;
const __v4sf *v_aux = (const __v4sf*) aux;
__v4sf *v_out = ( __v4sf*) out;
diff --git a/app/operations/layer-modes/gimpoperationnormal.c
b/app/operations/layer-modes/gimpoperationnormal.c
index 20b473b..9ffa9c9 100644
--- a/app/operations/layer-modes/gimpoperationnormal.c
+++ b/app/operations/layer-modes/gimpoperationnormal.c
@@ -35,15 +35,6 @@ static gboolean gimp_operation_normal_parent_process (GeglOperation *oper
const gchar *output_prop,
const GeglRectangle *result,
gint level);
-static gboolean gimp_operation_normal_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
G_DEFINE_TYPE (GimpOperationNormal, gimp_operation_normal,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -67,7 +58,7 @@ static const gchar* reference_xml = "<?xml version='1.0' encoding='UTF-8'?>"
"</node>"
"</gegl>";
-GimpLayerModeFunc gimp_operation_normal_process_pixels = NULL;
+GimpLayerModeFunc gimp_operation_normal_process = NULL;
static void
@@ -88,19 +79,20 @@ gimp_operation_normal_class_init (GimpOperationNormalClass *klass)
operation_class->process = gimp_operation_normal_parent_process;
- point_class->process = gimp_operation_normal_process;
- gimp_operation_normal_process_pixels = gimp_operation_normal_process_pixels_core;
+ gimp_operation_normal_process = gimp_operation_normal_process_core;
#if COMPILE_SSE2_INTRINISICS
if (gimp_cpu_accel_get_support() & GIMP_CPU_ACCEL_X86_SSE2)
- gimp_operation_normal_process_pixels = gimp_operation_normal_process_pixels_sse2;
+ gimp_operation_normal_process = gimp_operation_normal_process_sse2;
#endif /* COMPILE_SSE2_INTRINISICS */
#if COMPILE_SSE4_1_INTRINISICS
if (gimp_cpu_accel_get_support() & GIMP_CPU_ACCEL_X86_SSE4_1)
- gimp_operation_normal_process_pixels = gimp_operation_normal_process_pixels_sse4;
+ gimp_operation_normal_process = gimp_operation_normal_process_sse4;
#endif /* COMPILE_SSE4_1_INTRINISICS */
+
+ point_class->process = gimp_operation_normal_process;
}
static void
@@ -163,40 +155,19 @@ gimp_operation_normal_parent_process (GeglOperation *operation,
level);
}
-static gboolean
-gimp_operation_normal_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level)
-{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_normal_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
gboolean
-gimp_operation_normal_process_pixels_core (gfloat *in,
- gfloat *aux,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
+gimp_operation_normal_process_core (GeglOperation *operation,
+ void *in_p,
+ void *aux_p,
+ void *mask_p,
+ void *out_p,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level)
{
+ GimpOperationPointLayerMode *layer_mode = (gpointer)operation;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *aux = aux_p, *mask = mask_p, *out = out_p;
const gboolean has_mask = mask != NULL;
while (samples--)
diff --git a/app/operations/layer-modes/gimpoperationnormal.h
b/app/operations/layer-modes/gimpoperationnormal.h
index 1ab7e1b..5ecbd49 100644
--- a/app/operations/layer-modes/gimpoperationnormal.h
+++ b/app/operations/layer-modes/gimpoperationnormal.h
@@ -49,43 +49,34 @@ struct _GimpOperationNormalClass
GType gimp_operation_normal_get_type (void) G_GNUC_CONST;
-extern GimpLayerModeFunc gimp_operation_normal_process_pixels;
-
-gboolean gimp_operation_normal_process_pixels_core (gfloat *in,
- gfloat *aux,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
-
-gboolean gimp_operation_normal_process_pixels_sse2 (gfloat *in,
- gfloat *aux,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
-
-gboolean gimp_operation_normal_process_pixels_sse4 (gfloat *in,
- gfloat *aux,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+extern GimpLayerModeFunc gimp_operation_normal_process;
+
+gboolean gimp_operation_normal_process_core (GeglOperation *op,
+ void *in,
+ void *aux,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
+
+gboolean gimp_operation_normal_process_sse2 (GeglOperation *op,
+ void *in,
+ void *aux,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
+
+gboolean gimp_operation_normal_process_sse4 (GeglOperation *op,
+ void *in,
+ void *aux,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_NORMAL_H__ */
diff --git a/app/operations/layer-modes/gimpoperationoverlay.c
b/app/operations/layer-modes/gimpoperationoverlay.c
index cc08d9f..c849eea 100644
--- a/app/operations/layer-modes/gimpoperationoverlay.c
+++ b/app/operations/layer-modes/gimpoperationoverlay.c
@@ -28,17 +28,6 @@
#include "gimpoperationoverlay.h"
#include "gimpblendcomposite.h"
-
-static gboolean gimp_operation_overlay_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationOverlay, gimp_operation_overlay,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -65,42 +54,17 @@ gimp_operation_overlay_init (GimpOperationOverlay *self)
{
}
-static gboolean
+gboolean
gimp_operation_overlay_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_overlay_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_overlay_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (operation, in, layer, mask, out, samples,
blendfun_overlay);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationoverlay.h
b/app/operations/layer-modes/gimpoperationoverlay.h
index 4773828..01e6319 100644
--- a/app/operations/layer-modes/gimpoperationoverlay.h
+++ b/app/operations/layer-modes/gimpoperationoverlay.h
@@ -49,17 +49,14 @@ struct _GimpOperationOverlayClass
GType gimp_operation_overlay_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_overlay_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_overlay_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_OVERLAY_H__ */
diff --git a/app/operations/layer-modes/gimpoperationpointlayermode.h
b/app/operations/layer-modes/gimpoperationpointlayermode.h
index f1cd7c4..7d62e71 100644
--- a/app/operations/layer-modes/gimpoperationpointlayermode.h
+++ b/app/operations/layer-modes/gimpoperationpointlayermode.h
@@ -49,6 +49,7 @@ struct _GimpOperationPointLayerMode
GimpLayerColorSpace blend_trc;
GimpLayerColorSpace composite_trc;
GimpLayerCompositeMode composite_mode;
+ GimpBlendFunc blend_func;
};
diff --git a/app/operations/layer-modes/gimpoperationreplace.c
b/app/operations/layer-modes/gimpoperationreplace.c
index ed7b688..145f38b 100644
--- a/app/operations/layer-modes/gimpoperationreplace.c
+++ b/app/operations/layer-modes/gimpoperationreplace.c
@@ -26,17 +26,6 @@
#include "gimpoperationreplace.h"
-
-static gboolean gimp_operation_replace_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationReplace, gimp_operation_replace,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -63,40 +52,19 @@ gimp_operation_replace_init (GimpOperationReplace *self)
{
}
-static gboolean
-gimp_operation_replace_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_replace_process (GeglOperation *op,
+ void *in_p,
+ void *layer_p,
+ void *mask_p,
+ void *out_p,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_replace_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_replace_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
+ GimpOperationPointLayerMode *layer_mode = (gpointer)op;
+ gfloat opacity = layer_mode->opacity;
+ gfloat *in = in_p, *layer = layer_p, *mask = mask_p, *out = out_p;
const gboolean has_mask = mask != NULL;
while (samples--)
diff --git a/app/operations/layer-modes/gimpoperationreplace.h
b/app/operations/layer-modes/gimpoperationreplace.h
index 07f297c..d4b52de 100644
--- a/app/operations/layer-modes/gimpoperationreplace.h
+++ b/app/operations/layer-modes/gimpoperationreplace.h
@@ -49,17 +49,14 @@ struct _GimpOperationReplaceClass
GType gimp_operation_replace_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_replace_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_replace_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_REPLACE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationscreen.c
b/app/operations/layer-modes/gimpoperationscreen.c
index 576db27..a1d5273 100644
--- a/app/operations/layer-modes/gimpoperationscreen.c
+++ b/app/operations/layer-modes/gimpoperationscreen.c
@@ -29,17 +29,6 @@
#include "gimpoperationscreen.h"
#include "gimpblendcomposite.h"
-
-static gboolean gimp_operation_screen_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationScreen, gimp_operation_screen,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -66,42 +55,17 @@ gimp_operation_screen_init (GimpOperationScreen *self)
{
}
-static gboolean
-gimp_operation_screen_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_screen_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_screen_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_screen_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (op, in, layer, mask, out, samples,
blendfun_screen);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationscreen.h
b/app/operations/layer-modes/gimpoperationscreen.h
index af36c29..2acb443 100644
--- a/app/operations/layer-modes/gimpoperationscreen.h
+++ b/app/operations/layer-modes/gimpoperationscreen.h
@@ -49,17 +49,14 @@ struct _GimpOperationScreenClass
GType gimp_operation_screen_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_screen_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_screen_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_SCREEN_H__ */
diff --git a/app/operations/layer-modes/gimpoperationsoftlight.c
b/app/operations/layer-modes/gimpoperationsoftlight.c
index 0df422f..15c56bd 100644
--- a/app/operations/layer-modes/gimpoperationsoftlight.c
+++ b/app/operations/layer-modes/gimpoperationsoftlight.c
@@ -28,17 +28,6 @@
#include "gimpoperationsoftlight.h"
#include "gimpblendcomposite.h"
-
-static gboolean gimp_operation_softlight_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationSoftlight, gimp_operation_softlight,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -83,42 +72,18 @@ gimp_operation_softlight_init (GimpOperationSoftlight *self)
{
}
-static gboolean
-gimp_operation_softlight_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+
+gboolean
+gimp_operation_softlight_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_softlight_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_softlight_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (op, in, layer, mask, out, samples,
blendfun_softlight);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationsoftlight.h
b/app/operations/layer-modes/gimpoperationsoftlight.h
index a8c2c25..ddd8ae4 100644
--- a/app/operations/layer-modes/gimpoperationsoftlight.h
+++ b/app/operations/layer-modes/gimpoperationsoftlight.h
@@ -49,17 +49,14 @@ struct _GimpOperationSoftlightClass
GType gimp_operation_softlight_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_softlight_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_softlight_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_SOFTLIGHT_H__ */
diff --git a/app/operations/layer-modes/gimpoperationsubtract.c
b/app/operations/layer-modes/gimpoperationsubtract.c
index 1d2c058..5ac9acc 100644
--- a/app/operations/layer-modes/gimpoperationsubtract.c
+++ b/app/operations/layer-modes/gimpoperationsubtract.c
@@ -29,17 +29,6 @@
#include "gimpoperationsubtract.h"
#include "gimpblendcomposite.h"
-
-static gboolean gimp_operation_subtract_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
- glong samples,
- const GeglRectangle *roi,
- gint level);
-
-
G_DEFINE_TYPE (GimpOperationSubtract, gimp_operation_subtract,
GIMP_TYPE_OPERATION_POINT_LAYER_MODE)
@@ -66,42 +55,17 @@ gimp_operation_subtract_init (GimpOperationSubtract *self)
{
}
-static gboolean
-gimp_operation_subtract_process (GeglOperation *operation,
- void *in_buf,
- void *aux_buf,
- void *aux2_buf,
- void *out_buf,
+gboolean
+gimp_operation_subtract_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
glong samples,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (gpointer) operation;
-
- return gimp_operation_subtract_process_pixels (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
-}
-
-gboolean
-gimp_operation_subtract_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
- gimp_composite_blend (in, layer, mask, out, opacity, samples,
- blend_trc, composite_trc, composite_mode,
+ gimp_composite_blend (op, in, layer, mask, out, samples,
blendfun_subtract);
return TRUE;
}
diff --git a/app/operations/layer-modes/gimpoperationsubtract.h
b/app/operations/layer-modes/gimpoperationsubtract.h
index 65581a8..14c53f4 100644
--- a/app/operations/layer-modes/gimpoperationsubtract.h
+++ b/app/operations/layer-modes/gimpoperationsubtract.h
@@ -50,17 +50,14 @@ struct _GimpOperationSubtractClass
GType gimp_operation_subtract_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_subtract_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_subtract_process (GeglOperation *op,
+ void *in,
+ void *layer,
+ void *mask,
+ void *out,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level);
#endif /* __GIMP_OPERATION_SUBTRACT_H__ */
diff --git a/app/operations/operations-types.h b/app/operations/operations-types.h
index 3c82a2f..ebee4cd 100644
--- a/app/operations/operations-types.h
+++ b/app/operations/operations-types.h
@@ -55,17 +55,14 @@ typedef struct _GimpCagePoint GimpCagePoint;
/* functions */
-typedef gboolean (* GimpLayerModeFunc) (gfloat *in,
- gfloat *aux,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
+typedef gboolean (* GimpLayerModeFunc) (GeglOperation *operation,
+ void *in,
+ void *aux,
+ void *mask,
+ void *out,
glong samples,
const GeglRectangle *roi,
- gint level,
- GimpLayerColorSpace blend_trc,
- GimpLayerColorSpace composite_trc,
- GimpLayerCompositeMode composite_mode);
+ gint level);
typedef void (* GimpBlendFunc) (const float *dest,
const float *src,
diff --git a/app/paint/gimppaintcore-loops.c b/app/paint/gimppaintcore-loops.c
index 979e9e0..f3c160d 100644
--- a/app/paint/gimppaintcore-loops.c
+++ b/app/paint/gimppaintcore-loops.c
@@ -26,6 +26,7 @@
#include "core/gimptempbuf.h"
#include "operations/layer-modes/gimplayermodefunctions.h"
+#include "operations/layer-modes/gimpoperationpointlayermode.h"
#include "gimppaintcore-loops.h"
@@ -356,6 +357,12 @@ do_layer_blend (GeglBuffer *src_buffer,
gfloat *mask_pixel = NULL;
gfloat *paint_pixel = paint_data + ((iter->roi[0].y - roi.y) * paint_stride + iter->roi[0].x - roi.x)
* 4;
int iy;
+ GimpOperationPointLayerMode layer_data;
+
+ layer_data.opacity = opacity;
+ layer_data.blend_trc = blend_trc;
+ layer_data.composite_trc = composite_trc;
+ layer_data.composite_mode = composite_mode;
if (mask_buffer)
mask_pixel = (gfloat *)iter->data[2];
@@ -364,21 +371,19 @@ do_layer_blend (GeglBuffer *src_buffer,
process_roi.width = iter->roi[0].width;
process_roi.height = 1;
+
for (iy = 0; iy < iter->roi[0].height; iy++)
{
process_roi.y = iter->roi[0].y + iy;
- (*apply_func) (in_pixel,
+ (*apply_func) ((GeglOperation*)&layer_data,
+ in_pixel,
paint_pixel,
mask_pixel,
out_pixel,
- opacity,
iter->roi[0].width,
&process_roi,
- 0,
- blend_trc,
- composite_trc,
- composite_mode);
+ 0);
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]