[gimp] app: remove "gboolean linear" from gimp_get_layer_mode_function()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove "gboolean linear" from gimp_get_layer_mode_function()
- Date: Thu, 19 Jan 2017 17:44:23 +0000 (UTC)
commit 349cff8c164e7568ea88204afe8d298fe791bdc1
Author: Michael Natterer <mitch gimp org>
Date: Thu Jan 19 18:43:31 2017 +0100
app: remove "gboolean linear" from gimp_get_layer_mode_function()
and get rid of the two process_pixels() functions in the LCH modes,
they always take linear now.
.../layer-modes/gimplayermodefunctions.c | 19 +---
.../layer-modes/gimplayermodefunctions.h | 3 +-
.../layer-modes/gimpoperationlchchroma.c | 86 ++-----------------
.../layer-modes/gimpoperationlchchroma.h | 36 +++------
app/operations/layer-modes/gimpoperationlchcolor.c | 78 ++----------------
app/operations/layer-modes/gimpoperationlchcolor.h | 36 +++------
app/operations/layer-modes/gimpoperationlchhue.c | 85 ++-----------------
app/operations/layer-modes/gimpoperationlchhue.h | 36 +++------
.../layer-modes/gimpoperationlchlightness.c | 72 ++--------------
.../layer-modes/gimpoperationlchlightness.h | 36 +++------
app/paint/gimppaintcore-loops.c | 3 +-
11 files changed, 91 insertions(+), 399 deletions(-)
---
diff --git a/app/operations/layer-modes/gimplayermodefunctions.c
b/app/operations/layer-modes/gimplayermodefunctions.c
index e59c4ef..cb9a50c 100644
--- a/app/operations/layer-modes/gimplayermodefunctions.c
+++ b/app/operations/layer-modes/gimplayermodefunctions.c
@@ -78,8 +78,7 @@
GimpLayerModeFunc
-gimp_get_layer_mode_function (GimpLayerMode paint_mode,
- gboolean linear_mode)
+gimp_get_layer_mode_function (GimpLayerMode paint_mode)
{
GimpLayerModeFunc func;
@@ -267,27 +266,19 @@ gimp_get_layer_mode_function (GimpLayerMode paint_mode,
break;
case GIMP_LAYER_MODE_LCH_HUE:
- func = linear_mode ?
- gimp_operation_lch_hue_process_pixels_linear :
- gimp_operation_lch_hue_process_pixels;
+ func = gimp_operation_lch_hue_process_pixels;
break;
case GIMP_LAYER_MODE_LCH_CHROMA:
- func = linear_mode ?
- gimp_operation_lch_chroma_process_pixels_linear :
- gimp_operation_lch_chroma_process_pixels;
+ func = gimp_operation_lch_chroma_process_pixels;
break;
case GIMP_LAYER_MODE_LCH_COLOR:
- func = linear_mode ?
- gimp_operation_lch_color_process_pixels_linear :
- gimp_operation_lch_color_process_pixels;
+ func = gimp_operation_lch_color_process_pixels;
break;
case GIMP_LAYER_MODE_LCH_LIGHTNESS:
- func = linear_mode ?
- gimp_operation_lch_lightness_process_pixels_linear :
- gimp_operation_lch_lightness_process_pixels;
+ func = gimp_operation_lch_lightness_process_pixels;
break;
case GIMP_LAYER_MODE_ERASE:
diff --git a/app/operations/layer-modes/gimplayermodefunctions.h
b/app/operations/layer-modes/gimplayermodefunctions.h
index 618824d..9510dbf 100644
--- a/app/operations/layer-modes/gimplayermodefunctions.h
+++ b/app/operations/layer-modes/gimplayermodefunctions.h
@@ -22,8 +22,7 @@
#define __GIMP_LAYER_MODE_FUNCTIONS_H__
-GimpLayerModeFunc gimp_get_layer_mode_function (GimpLayerMode paint_mode,
- gboolean linear_mode);
+GimpLayerModeFunc gimp_get_layer_mode_function (GimpLayerMode paint_mode);
#endif /* __GIMP_LAYER_MODE_FUNCTIONS_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlchchroma.c
b/app/operations/layer-modes/gimpoperationlchchroma.c
index 433afa7..6e691fc 100644
--- a/app/operations/layer-modes/gimpoperationlchchroma.c
+++ b/app/operations/layer-modes/gimpoperationlchchroma.c
@@ -81,58 +81,17 @@ gimp_operation_lch_chroma_process (GeglOperation *operation,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *gimp_op = GIMP_OPERATION_POINT_LAYER_MODE (operation);
- gfloat opacity = gimp_op->opacity;
- gboolean linear = gimp_op->linear;
-
- return (linear ? gimp_operation_lch_chroma_process_pixels_linear :
- gimp_operation_lch_chroma_process_pixels)
- (in_buf, aux_buf, aux2_buf,
- out_buf,
- opacity,
- samples, roi, level,
- gimp_op->blend_trc,
- gimp_op->composite_trc,
- gimp_op->composite_mode);
+ 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);
}
-static void
-chroma_pre_process (const Babl *from_fish,
- const Babl *to_fish,
- const gfloat *in,
- const gfloat *layer,
- gfloat *out,
- glong samples)
-{
- gfloat tmp[4 * samples], *layer_lab = tmp;
- gint i;
-
- babl_process (from_fish, in, out, samples);
- babl_process (from_fish, layer, layer_lab, samples);
-
- for (i = 0; i < samples; ++i)
- {
- gfloat A1 = out[4 * i + 1];
- gfloat B1 = out[4 * i + 2];
- gfloat c1 = hypotf (A1, B1);
-
- if (c1 != 0)
- {
- gfloat A2 = layer_lab[4 * i + 1];
- gfloat B2 = layer_lab[4 * i + 2];
- gfloat c2 = hypotf (A2, B2);
- gfloat A = c2 * A1 / c1;
- gfloat B = c2 * B1 / c1;
-
- out[4 * i + 1] = A;
- out[4 * i + 2] = B;
- }
- }
-
- babl_process (to_fish, out, out, samples);
-}
-
-/* XXX: this and pre_process should be removed */
gboolean
gimp_operation_lch_chroma_process_pixels (gfloat *in,
gfloat *layer,
@@ -146,33 +105,6 @@ gimp_operation_lch_chroma_process_pixels (gfloat *in,
GimpLayerBlendTRC composite_trc,
GimpLayerCompositeMode composite_mode)
{
- static const Babl *from_fish = NULL;
- static const Babl *to_fish = NULL;
-
- if (!from_fish)
- from_fish = babl_fish ("R'G'B'A float", "CIE Lab alpha float");
- if (!to_fish)
- to_fish = babl_fish ("CIE Lab alpha float", "R'G'B'A float");
-
- chroma_pre_process (from_fish, to_fish, in, layer, out, samples);
- compfun_src_atop (in, layer, mask, opacity, out, samples);
-
- return TRUE;
-}
-
-gboolean
-gimp_operation_lch_chroma_process_pixels_linear (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerBlendTRC blend_trc,
- GimpLayerBlendTRC composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
gimp_composite_blend (in, layer, mask, out, opacity, samples,
blend_trc, composite_trc, composite_mode,
blendfun_lch_chroma);
diff --git a/app/operations/layer-modes/gimpoperationlchchroma.h
b/app/operations/layer-modes/gimpoperationlchchroma.h
index ce51d06..c3e48eb 100644
--- a/app/operations/layer-modes/gimpoperationlchchroma.h
+++ b/app/operations/layer-modes/gimpoperationlchchroma.h
@@ -49,31 +49,19 @@ struct _GimpOperationLchChromaClass
};
-GType gimp_operation_lch_chroma_get_type (void) G_GNUC_CONST;
+GType gimp_operation_lch_chroma_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_lch_chroma_process_pixels_linear (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerBlendTRC blend_trc,
- GimpLayerBlendTRC composite_trc,
- GimpLayerCompositeMode composite_mode);
-
-gboolean gimp_operation_lch_chroma_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerBlendTRC blend_trc,
- GimpLayerBlendTRC composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_lch_chroma_process_pixels (gfloat *in,
+ gfloat *layer,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level,
+ GimpLayerBlendTRC blend_trc,
+ GimpLayerBlendTRC composite_trc,
+ GimpLayerCompositeMode composite_mode);
#endif /* __GIMP_OPERATION_LCH_CHROMA_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlchcolor.c
b/app/operations/layer-modes/gimpoperationlchcolor.c
index 469f600..9c910de 100644
--- a/app/operations/layer-modes/gimpoperationlchcolor.c
+++ b/app/operations/layer-modes/gimpoperationlchcolor.c
@@ -81,46 +81,17 @@ gimp_operation_lch_color_process (GeglOperation *operation,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *gimp_op = GIMP_OPERATION_POINT_LAYER_MODE (operation);
-
- return (gimp_op->linear ? gimp_operation_lch_color_process_pixels_linear :
- gimp_operation_lch_color_process_pixels)
- (in_buf, aux_buf, aux2_buf,
- out_buf,
- gimp_op->opacity,
- samples, roi, level,
- gimp_op->blend_trc,
- gimp_op->composite_trc,
- gimp_op->composite_mode);
+ 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);
}
-static void
-color_pre_process (const Babl *from_fish_la,
- const Babl *from_fish_laba,
- const Babl *to_fish,
- const gfloat *in,
- const gfloat *layer,
- gfloat *out,
- glong samples)
-{
- gfloat tmp[4 * samples], *layer_lab = tmp;
- gint i;
-
- babl_process (from_fish_la, in, &out[2 * samples], samples);
- babl_process (from_fish_laba, layer, layer_lab, samples);
-
- for (i = 0; i < samples; ++i)
- {
- out[4 * i + 0] = out[2 * samples + 2 * i + 0];
- out[4 * i + 1] = layer_lab[4 * i + 1];
- out[4 * i + 2] = layer_lab[4 * i + 2];
- out[4 * i + 3] = out[2 * samples + 2 * i + 1];
- }
-
- babl_process (to_fish, out, out, samples);
-}
-
-/* XXX: should be removed along with the pre_process fun */
gboolean
gimp_operation_lch_color_process_pixels (gfloat *in,
gfloat *layer,
@@ -134,37 +105,6 @@ gimp_operation_lch_color_process_pixels (gfloat *in,
GimpLayerBlendTRC composite_trc,
GimpLayerCompositeMode composite_mode)
{
- static const Babl *from_fish_laba = NULL;
- static const Babl *from_fish_la = NULL;
- static const Babl *to_fish = NULL;
-
- if (!from_fish_laba)
- from_fish_laba = babl_fish ("R'G'B'A float", "CIE Lab alpha float");
- if (!from_fish_la)
- from_fish_la = babl_fish ("R'G'B'A float", "CIE L alpha float");
- if (!to_fish)
- to_fish = babl_fish ("CIE Lab alpha float", "R'G'B'A float");
-
- color_pre_process (from_fish_la, from_fish_laba, to_fish, in, layer, out, samples);
- compfun_src_atop (in, layer, mask, opacity, out, samples);
-
- return TRUE;
-}
-
-
-gboolean
-gimp_operation_lch_color_process_pixels_linear (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerBlendTRC blend_trc,
- GimpLayerBlendTRC composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
gimp_composite_blend (in, layer, mask, out, opacity, samples,
blend_trc, composite_trc, composite_mode,
blendfun_lch_color);
diff --git a/app/operations/layer-modes/gimpoperationlchcolor.h
b/app/operations/layer-modes/gimpoperationlchcolor.h
index 087dfba..476f894 100644
--- a/app/operations/layer-modes/gimpoperationlchcolor.h
+++ b/app/operations/layer-modes/gimpoperationlchcolor.h
@@ -49,31 +49,19 @@ struct _GimpOperationLchColorClass
};
-GType gimp_operation_lch_color_get_type (void) G_GNUC_CONST;
+GType gimp_operation_lch_color_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_lch_color_process_pixels_linear (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerBlendTRC blend_trc,
- GimpLayerBlendTRC composite_trc,
- GimpLayerCompositeMode composite_mode);
-
-gboolean gimp_operation_lch_color_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerBlendTRC blend_trc,
- GimpLayerBlendTRC composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_lch_color_process_pixels (gfloat *in,
+ gfloat *layer,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level,
+ GimpLayerBlendTRC blend_trc,
+ GimpLayerBlendTRC composite_trc,
+ GimpLayerCompositeMode composite_mode);
#endif /* __GIMP_OPERATION_LCH_COLOR_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlchhue.c
b/app/operations/layer-modes/gimpoperationlchhue.c
index 77e7abd..bad999d 100644
--- a/app/operations/layer-modes/gimpoperationlchhue.c
+++ b/app/operations/layer-modes/gimpoperationlchhue.c
@@ -81,56 +81,17 @@ gimp_operation_lch_hue_process (GeglOperation *operation,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
-
- return (layer_mode->linear ? gimp_operation_lch_hue_process_pixels_linear :
- gimp_operation_lch_hue_process_pixels)
- (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
+ 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);
}
-static void
-hue_pre_process (const Babl *from_fish,
- const Babl *to_fish,
- const gfloat *in,
- const gfloat *layer,
- gfloat *out,
- glong samples)
-{
- gint i;
- gfloat tmp[4 * samples], *layer_lab = tmp;
-
- babl_process (from_fish, in, out, samples);
- babl_process (from_fish, layer, layer_lab, samples);
-
- for (i = 0; i < samples; ++i)
- {
- gfloat A2 = layer_lab[4 * i + 1];
- gfloat B2 = layer_lab[4 * i + 2];
- gfloat c2 = hypotf (A2, B2);
-
- if (c2 > 0.1f)
- {
- gfloat A1 = out[4 * i + 1];
- gfloat B1 = out[4 * i + 2];
- gfloat c1 = hypotf (A1, B1);
- gfloat A = c1 * A2 / c2;
- gfloat B = c1 * B2 / c2;
-
- out[4 * i + 1] = A;
- out[4 * i + 2] = B;
- }
- }
-
- babl_process (to_fish, out, out, samples);
-}
-
-/* XXX: this should be removed along with _pre_process */
gboolean
gimp_operation_lch_hue_process_pixels (gfloat *in,
gfloat *layer,
@@ -144,34 +105,6 @@ gimp_operation_lch_hue_process_pixels (gfloat *in,
GimpLayerBlendTRC composite_trc,
GimpLayerCompositeMode composite_mode)
{
- static const Babl *from_fish = NULL;
- static const Babl *to_fish = NULL;
-
- if (!from_fish)
- from_fish = babl_fish ("R'G'B'A float", "CIE Lab alpha float");
- if (!to_fish)
- to_fish = babl_fish ("CIE Lab alpha float", "R'G'B'A float");
-
- hue_pre_process (from_fish, to_fish, in, layer, out, samples);
- compfun_src_atop (in, layer, mask, opacity, out, samples);
-
- return TRUE;
-}
-
-
-gboolean
-gimp_operation_lch_hue_process_pixels_linear (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerBlendTRC blend_trc,
- GimpLayerBlendTRC composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
gimp_composite_blend (in, layer, mask, out, opacity, samples,
blend_trc, composite_trc, composite_mode,
blendfun_lch_hue);
diff --git a/app/operations/layer-modes/gimpoperationlchhue.h
b/app/operations/layer-modes/gimpoperationlchhue.h
index 316da32..2fb4d24 100644
--- a/app/operations/layer-modes/gimpoperationlchhue.h
+++ b/app/operations/layer-modes/gimpoperationlchhue.h
@@ -49,30 +49,18 @@ struct _GimpOperationLchHueClass
};
-GType gimp_operation_lch_hue_get_type (void) G_GNUC_CONST;
+GType gimp_operation_lch_hue_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_lch_hue_process_pixels_linear (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerBlendTRC blend_trc,
- GimpLayerBlendTRC composite_trc,
- GimpLayerCompositeMode composite_mode);
-
-gboolean gimp_operation_lch_hue_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerBlendTRC blend_trc,
- GimpLayerBlendTRC composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_lch_hue_process_pixels (gfloat *in,
+ gfloat *layer,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level,
+ GimpLayerBlendTRC blend_trc,
+ GimpLayerBlendTRC composite_trc,
+ GimpLayerCompositeMode composite_mode);
#endif /* __GIMP_OPERATION_LCH_HUE_H__ */
diff --git a/app/operations/layer-modes/gimpoperationlchlightness.c
b/app/operations/layer-modes/gimpoperationlchlightness.c
index f146fee..56e4065 100644
--- a/app/operations/layer-modes/gimpoperationlchlightness.c
+++ b/app/operations/layer-modes/gimpoperationlchlightness.c
@@ -81,39 +81,17 @@ gimp_operation_lch_lightness_process (GeglOperation *operation,
const GeglRectangle *roi,
gint level)
{
- GimpOperationPointLayerMode *layer_mode = (GimpOperationPointLayerMode*)operation;
- return (layer_mode->linear ? gimp_operation_lch_lightness_process_pixels_linear :
gimp_operation_lch_lightness_process_pixels)
- (in_buf, aux_buf, aux2_buf,
- out_buf,
- layer_mode->opacity,
- samples, roi, level,
- layer_mode->blend_trc,
- layer_mode->composite_trc,
- layer_mode->composite_mode);
+ 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);
}
-static void
-lightness_pre_process (const Babl *from_fish_la,
- const Babl *from_fish_laba,
- const Babl *to_fish,
- const gfloat *in,
- const gfloat *layer,
- gfloat *out,
- glong samples)
-{
- gfloat lightness_alpha[samples * 2];
- gint i;
-
- babl_process (from_fish_laba, in, out, samples);
- babl_process (from_fish_la, layer, lightness_alpha, samples);
-
- for (i = 0; i < samples; ++i)
- out[4 * i] = lightness_alpha[2 * i];
-
- babl_process (to_fish, out, out, samples);
-}
-
-/* XXX: this should be remove along with _pre_process */
gboolean
gimp_operation_lch_lightness_process_pixels (gfloat *in,
gfloat *layer,
@@ -127,38 +105,6 @@ gimp_operation_lch_lightness_process_pixels (gfloat *in,
GimpLayerBlendTRC composite_trc,
GimpLayerCompositeMode composite_mode)
{
- static const Babl *from_fish_laba = NULL;
- static const Babl *from_fish_la = NULL;
- static const Babl *to_fish = NULL;
-
- if (!from_fish_laba)
- from_fish_laba = babl_fish ("R'G'B'A float", "CIE Lab alpha float");
- if (!from_fish_la)
- from_fish_la = babl_fish ("R'G'B'A float", "CIE L alpha float");
- if (!to_fish)
- to_fish = babl_fish ("CIE Lab alpha float", "R'G'B'A float");
-
-
- lightness_pre_process (from_fish_la, from_fish_laba, to_fish, in, layer, out, samples);
- compfun_src_atop (in, layer, mask, opacity, out, samples);
-
- return TRUE;
-}
-
-
-gboolean
-gimp_operation_lch_lightness_process_pixels_linear (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerBlendTRC blend_trc,
- GimpLayerBlendTRC composite_trc,
- GimpLayerCompositeMode composite_mode)
-{
gimp_composite_blend (in, layer, mask, out, opacity, samples,
blend_trc, composite_trc, composite_mode,
blendfun_lch_lightness);
diff --git a/app/operations/layer-modes/gimpoperationlchlightness.h
b/app/operations/layer-modes/gimpoperationlchlightness.h
index d71aeec..675229a 100644
--- a/app/operations/layer-modes/gimpoperationlchlightness.h
+++ b/app/operations/layer-modes/gimpoperationlchlightness.h
@@ -49,31 +49,19 @@ struct _GimpOperationLchLightnessClass
};
-GType gimp_operation_lch_lightness_get_type (void) G_GNUC_CONST;
+GType gimp_operation_lch_lightness_get_type (void) G_GNUC_CONST;
-gboolean gimp_operation_lch_lightness_process_pixels_linear (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerBlendTRC blend_trc,
- GimpLayerBlendTRC composite_trc,
- GimpLayerCompositeMode composite_mode);
-
-gboolean gimp_operation_lch_lightness_process_pixels (gfloat *in,
- gfloat *layer,
- gfloat *mask,
- gfloat *out,
- gfloat opacity,
- glong samples,
- const GeglRectangle *roi,
- gint level,
- GimpLayerBlendTRC blend_trc,
- GimpLayerBlendTRC composite_trc,
- GimpLayerCompositeMode composite_mode);
+gboolean gimp_operation_lch_lightness_process_pixels (gfloat *in,
+ gfloat *layer,
+ gfloat *mask,
+ gfloat *out,
+ gfloat opacity,
+ glong samples,
+ const GeglRectangle *roi,
+ gint level,
+ GimpLayerBlendTRC blend_trc,
+ GimpLayerBlendTRC composite_trc,
+ GimpLayerCompositeMode composite_mode);
#endif /* __GIMP_OPERATION_LCH_LIGHTNESS_H__ */
diff --git a/app/paint/gimppaintcore-loops.c b/app/paint/gimppaintcore-loops.c
index fe07232..22b62c9 100644
--- a/app/paint/gimppaintcore-loops.c
+++ b/app/paint/gimppaintcore-loops.c
@@ -308,8 +308,7 @@ do_layer_blend (GeglBuffer *src_buffer,
const guint paint_stride = gimp_temp_buf_get_width (paint_buf);
gfloat *paint_data = (gfloat *) gimp_temp_buf_get_data (paint_buf);
- GimpLayerModeFunc apply_func = gimp_get_layer_mode_function (paint_mode,
- linear_mode);
+ GimpLayerModeFunc apply_func = gimp_get_layer_mode_function (paint_mode);
if (linear_mode)
iterator_format = babl_format ("RGBA float");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]