[gimp] app: remove mono-mix layer mode



commit 3fa2c9150264a02ebf2feccd838ce5550ebc7545
Author: Ell <ell_se yahoo com>
Date:   Wed Mar 15 14:52:14 2017 -0400

    app: remove mono-mix layer mode
    
    This effectively reverts commit c6c0899655740869ef401599e16d9c8e16853f80.
    
    Removing due to lack of consensus.  We can always re-add it in the
    future if we decide we want it.

 app/core/gimpimage.c                               |    1 -
 app/operations/layer-modes/gimp-layer-modes.c      |   18 +-----------
 .../layer-modes/gimpoperationlayermode.c           |   30 --------------------
 app/operations/operations-enums.c                  |    2 -
 app/operations/operations-enums.h                  |    1 -
 libgimp/gimpenums.h                                |    1 -
 tools/pdbgen/enums.pl                              |    8 ++---
 7 files changed, 4 insertions(+), 57 deletions(-)
---
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index 3d5e649..f9cedd6 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -2464,7 +2464,6 @@ gimp_image_get_xcf_version (GimpImage    *image,
         case GIMP_LAYER_MODE_LUMINANCE:
         case GIMP_LAYER_MODE_COLOR_ERASE:
         case GIMP_LAYER_MODE_ERASE:
-        case GIMP_LAYER_MODE_MONO_MIX:
         case GIMP_LAYER_MODE_MERGE:
         case GIMP_LAYER_MODE_SPLIT:
           version = MAX (10, version);
diff --git a/app/operations/layer-modes/gimp-layer-modes.c b/app/operations/layer-modes/gimp-layer-modes.c
index 83da420..7aa0e5b 100644
--- a/app/operations/layer-modes/gimp-layer-modes.c
+++ b/app/operations/layer-modes/gimp-layer-modes.c
@@ -827,17 +827,6 @@ static const GimpLayerModeInfo layer_mode_infos[] =
     .composite_space      = GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
   },
 
-  { GIMP_LAYER_MODE_MONO_MIX,
-
-    .op_name              = "gimp:layer-mode",
-    .function             = gimp_operation_layer_mode_process_pixels,
-    .context              = GIMP_LAYER_MODE_CONTEXT_ALL,
-    .paint_composite_mode = GIMP_LAYER_COMPOSITE_SRC_OVER,
-    .composite_mode       = GIMP_LAYER_COMPOSITE_SRC_ATOP,
-    .composite_space      = GIMP_LAYER_COLOR_SPACE_RGB_LINEAR,
-    .blend_space          = GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
-  },
-
   { GIMP_LAYER_MODE_MERGE,
 
     .op_name              = "gimp:merge",
@@ -947,8 +936,7 @@ static const GimpLayerMode layer_mode_group_default[] =
   GIMP_LAYER_MODE_SEPARATOR,
 
   GIMP_LAYER_MODE_EXCLUSION,
-  GIMP_LAYER_MODE_LINEAR_BURN,
-  GIMP_LAYER_MODE_MONO_MIX
+  GIMP_LAYER_MODE_LINEAR_BURN
 };
 
 static const GimpLayerMode layer_mode_group_legacy[] =
@@ -1127,10 +1115,6 @@ static const GimpLayerMode layer_mode_groups[][2] =
     [GIMP_LAYER_MODE_GROUP_LEGACY ] = -1
   },
 
-  { [GIMP_LAYER_MODE_GROUP_DEFAULT] = GIMP_LAYER_MODE_MONO_MIX,
-    [GIMP_LAYER_MODE_GROUP_LEGACY ] = -1
-  },
-
   { [GIMP_LAYER_MODE_GROUP_DEFAULT] = GIMP_LAYER_MODE_MERGE,
     [GIMP_LAYER_MODE_GROUP_LEGACY ] = -1
   },
diff --git a/app/operations/layer-modes/gimpoperationlayermode.c 
b/app/operations/layer-modes/gimpoperationlayermode.c
index c15b452..377a08b 100644
--- a/app/operations/layer-modes/gimpoperationlayermode.c
+++ b/app/operations/layer-modes/gimpoperationlayermode.c
@@ -2347,35 +2347,6 @@ blendfun_color_erase (const float *dest,
 }
 
 static inline void
-blendfun_mono_mix (const float *dest,
-                   const float *src,
-                   float       *out,
-                   int          samples)
-{
-  while (samples--)
-    {
-      if (dest[ALPHA] != 0.0f && src[ALPHA] != 0.0f)
-        {
-          gfloat value = 0.0f;
-          gint   c;
-
-          for (c = 0; c < 3; c++)
-            {
-              value += dest[c] * src[c];
-            }
-
-          out[RED] = out[GREEN] = out[BLUE] = value;
-        }
-
-      out[ALPHA] = src[ALPHA];
-
-      out  += 4;
-      src  += 4;
-      dest += 4;
-    }
-}
-
-static inline void
 blendfun_dummy (const float *dest,
                 const float *src,
                 float       *out,
@@ -2424,7 +2395,6 @@ gimp_layer_mode_get_blend_fun (GimpLayerMode mode)
     case GIMP_LAYER_MODE_LINEAR_BURN:    return blendfun_linear_burn;
     case GIMP_LAYER_MODE_COLOR_ERASE_LEGACY:
     case GIMP_LAYER_MODE_COLOR_ERASE:    return blendfun_color_erase;
-    case GIMP_LAYER_MODE_MONO_MIX:       return blendfun_mono_mix;
 
     case GIMP_LAYER_MODE_DISSOLVE:
     case GIMP_LAYER_MODE_BEHIND_LEGACY:
diff --git a/app/operations/operations-enums.c b/app/operations/operations-enums.c
index 974dc0d..766c464 100644
--- a/app/operations/operations-enums.c
+++ b/app/operations/operations-enums.c
@@ -140,7 +140,6 @@ gimp_layer_mode_get_type (void)
     { GIMP_LAYER_MODE_LUMINANCE, "GIMP_LAYER_MODE_LUMINANCE", "luminance" },
     { GIMP_LAYER_MODE_COLOR_ERASE, "GIMP_LAYER_MODE_COLOR_ERASE", "color-erase" },
     { GIMP_LAYER_MODE_ERASE, "GIMP_LAYER_MODE_ERASE", "erase" },
-    { GIMP_LAYER_MODE_MONO_MIX, "GIMP_LAYER_MODE_MONO_MIX", "mono-mix" },
     { GIMP_LAYER_MODE_MERGE, "GIMP_LAYER_MODE_MERGE", "merge" },
     { GIMP_LAYER_MODE_SPLIT, "GIMP_LAYER_MODE_SPLIT", "split" },
     { GIMP_LAYER_MODE_REPLACE, "GIMP_LAYER_MODE_REPLACE", "replace" },
@@ -209,7 +208,6 @@ gimp_layer_mode_get_type (void)
     { GIMP_LAYER_MODE_LUMINANCE, NC_("layer-mode", "Luminance"), NULL },
     { GIMP_LAYER_MODE_COLOR_ERASE, NC_("layer-mode", "Color erase"), NULL },
     { GIMP_LAYER_MODE_ERASE, NC_("layer-mode", "Erase"), NULL },
-    { GIMP_LAYER_MODE_MONO_MIX, NC_("layer-mode", "Mono mix"), NULL },
     { GIMP_LAYER_MODE_MERGE, NC_("layer-mode", "Merge"), NULL },
     { GIMP_LAYER_MODE_SPLIT, NC_("layer-mode", "Split"), NULL },
     { GIMP_LAYER_MODE_REPLACE, NC_("layer-mode", "Replace"), NULL },
diff --git a/app/operations/operations-enums.h b/app/operations/operations-enums.h
index 74aa53d..760ea96 100644
--- a/app/operations/operations-enums.h
+++ b/app/operations/operations-enums.h
@@ -118,7 +118,6 @@ typedef enum
   GIMP_LAYER_MODE_LUMINANCE,             /*< desc="Luminance"                >*/
   GIMP_LAYER_MODE_COLOR_ERASE,           /*< desc="Color erase"              >*/
   GIMP_LAYER_MODE_ERASE,                 /*< desc="Erase"                    >*/
-  GIMP_LAYER_MODE_MONO_MIX,              /*< desc="Mono mix"                 >*/
   GIMP_LAYER_MODE_MERGE,                 /*< desc="Merge"                    >*/
   GIMP_LAYER_MODE_SPLIT,                 /*< desc="Split"                    >*/
 
diff --git a/libgimp/gimpenums.h b/libgimp/gimpenums.h
index 3edee80..868d775 100644
--- a/libgimp/gimpenums.h
+++ b/libgimp/gimpenums.h
@@ -154,7 +154,6 @@ typedef enum
   GIMP_LAYER_MODE_LUMINANCE,
   GIMP_LAYER_MODE_COLOR_ERASE,
   GIMP_LAYER_MODE_ERASE,
-  GIMP_LAYER_MODE_MONO_MIX,
   GIMP_LAYER_MODE_MERGE,
   GIMP_LAYER_MODE_SPLIT
 } GimpLayerMode;
diff --git a/tools/pdbgen/enums.pl b/tools/pdbgen/enums.pl
index bee7dc7..5311398 100644
--- a/tools/pdbgen/enums.pl
+++ b/tools/pdbgen/enums.pl
@@ -748,8 +748,7 @@ package Gimp::CodeGen::enums;
                          GIMP_LAYER_MODE_LUMA_LIGHTEN_ONLY
                          GIMP_LAYER_MODE_LUMINANCE
                          GIMP_LAYER_MODE_COLOR_ERASE GIMP_LAYER_MODE_ERASE
-                         GIMP_LAYER_MODE_MONO_MIX GIMP_LAYER_MODE_MERGE
-                         GIMP_LAYER_MODE_SPLIT) ],
+                         GIMP_LAYER_MODE_MERGE GIMP_LAYER_MODE_SPLIT) ],
          mapping => { GIMP_LAYER_MODE_NORMAL_LEGACY => '0',
                       GIMP_LAYER_MODE_DISSOLVE => '1',
                       GIMP_LAYER_MODE_BEHIND_LEGACY => '2',
@@ -809,9 +808,8 @@ package Gimp::CodeGen::enums;
                       GIMP_LAYER_MODE_LUMINANCE => '56',
                       GIMP_LAYER_MODE_COLOR_ERASE => '57',
                       GIMP_LAYER_MODE_ERASE => '58',
-                      GIMP_LAYER_MODE_MONO_MIX => '59',
-                      GIMP_LAYER_MODE_MERGE => '60',
-                      GIMP_LAYER_MODE_SPLIT => '61' }
+                      GIMP_LAYER_MODE_MERGE => '59',
+                      GIMP_LAYER_MODE_SPLIT => '60' }
        },
     GimpConvertDitherType =>
        { contig => 1,


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