app: implement non-legacy blend modes in GimpOperationLayerMode

For operations needing to override default behavior sub-classes should still be
used.

This commit also enables pinligh, vividlight and linearlight blend mode modes
parent 5978def5
......@@ -352,6 +352,16 @@ gimp_layer_mode_get_type (void)
{ GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR, "GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR", "grain-extract-linear" },
{ GIMP_LAYER_MODE_GRAIN_MERGE, "GIMP_LAYER_MODE_GRAIN_MERGE", "grain-merge" },
{ GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR, "GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR", "grain-merge-linear" },
{ GIMP_LAYER_MODE_VIVID_LIGHT, "GIMP_LAYER_MODE_VIVID_LIGHT", "vivid-light" },
{ GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR, "GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR", "vivid-light-linear" },
{ GIMP_LAYER_MODE_PIN_LIGHT, "GIMP_LAYER_MODE_PIN_LIGHT", "pin-light" },
{ GIMP_LAYER_MODE_PIN_LIGHT_LINEAR, "GIMP_LAYER_MODE_PIN_LIGHT_LINEAR", "pin-light-linear" },
{ GIMP_LAYER_MODE_LINEAR_LIGHT, "GIMP_LAYER_MODE_LINEAR_LIGHT", "linear-light" },
{ GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR, "GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR", "linear-light-linear" },
{ GIMP_LAYER_MODE_EXCLUSION, "GIMP_LAYER_MODE_EXCLUSION", "exclusion" },
{ GIMP_LAYER_MODE_EXCLUSION_LINEAR, "GIMP_LAYER_MODE_EXCLUSION_LINEAR", "exclusion-linear" },
{ GIMP_LAYER_MODE_LINEAR_BURN, "GIMP_LAYER_MODE_LINEAR_BURN", "linear-burn" },
{ GIMP_LAYER_MODE_LINEAR_BURN_LINEAR, "GIMP_LAYER_MODE_LINEAR_BURN_LINEAR", "linear-burn-linear" },
{ GIMP_LAYER_MODE_ERASE, "GIMP_LAYER_MODE_ERASE", "erase" },
{ GIMP_LAYER_MODE_REPLACE, "GIMP_LAYER_MODE_REPLACE", "replace" },
{ GIMP_LAYER_MODE_ANTI_ERASE, "GIMP_LAYER_MODE_ANTI_ERASE", "anti-erase" },
......@@ -423,6 +433,16 @@ gimp_layer_mode_get_type (void)
{ GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR, NC_("layer-mode", "Grain extract (linear)"), NULL },
{ GIMP_LAYER_MODE_GRAIN_MERGE, NC_("layer-mode", "Grain merge"), NULL },
{ GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR, NC_("layer-mode", "Grain merge (linear)"), NULL },
{ GIMP_LAYER_MODE_VIVID_LIGHT, NC_("layer-mode", "Vivid light"), NULL },
{ GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR, NC_("layer-mode", "Vivid light (linear)"), NULL },
{ GIMP_LAYER_MODE_PIN_LIGHT, NC_("layer-mode", "Pin light"), NULL },
{ GIMP_LAYER_MODE_PIN_LIGHT_LINEAR, NC_("layer-mode", "Pin light (linear)"), NULL },
{ GIMP_LAYER_MODE_LINEAR_LIGHT, NC_("layer-mode", "Linear light"), NULL },
{ GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR, NC_("layer-mode", "Linear light (linear)"), NULL },
{ GIMP_LAYER_MODE_EXCLUSION, NC_("layer-mode", "Exclusion"), NULL },
{ GIMP_LAYER_MODE_EXCLUSION_LINEAR, NC_("layer-mode", "Exclusion (linear)"), NULL },
{ GIMP_LAYER_MODE_LINEAR_BURN, NC_("layer-mode", "Linear light"), NULL },
{ GIMP_LAYER_MODE_LINEAR_BURN_LINEAR, NC_("layer-mode", "Linear burn (linear)"), NULL },
{ GIMP_LAYER_MODE_ERASE, NC_("layer-mode", "Erase"), NULL },
{ GIMP_LAYER_MODE_REPLACE, NC_("layer-mode", "Replace"), NULL },
{ GIMP_LAYER_MODE_ANTI_ERASE, NC_("layer-mode", "Anti erase"), NULL },
......
......@@ -222,6 +222,16 @@ typedef enum
GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR, /*< desc="Grain extract (linear)" >*/
GIMP_LAYER_MODE_GRAIN_MERGE, /*< desc="Grain merge" >*/
GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR, /*< desc="Grain merge (linear)" >*/
GIMP_LAYER_MODE_VIVID_LIGHT, /*< desc="Vivid light" >*/
GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR, /*< desc="Vivid light (linear)" >*/
GIMP_LAYER_MODE_PIN_LIGHT, /*< desc="Pin light" >*/
GIMP_LAYER_MODE_PIN_LIGHT_LINEAR, /*< desc="Pin light (linear)" >*/
GIMP_LAYER_MODE_LINEAR_LIGHT, /*< desc="Linear light" >*/
GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR, /*< desc="Linear light (linear)" >*/
GIMP_LAYER_MODE_EXCLUSION, /*< desc="Exclusion" >*/
GIMP_LAYER_MODE_EXCLUSION_LINEAR, /*< desc="Exclusion (linear)" >*/
GIMP_LAYER_MODE_LINEAR_BURN, /*< desc="Linear light" >*/
GIMP_LAYER_MODE_LINEAR_BURN_LINEAR, /*< desc="Linear burn (linear)" >*/
/* Internal modes, not available to the PDB */
GIMP_LAYER_MODE_ERASE = 1000, /*< pdb-skip, desc="Erase" >*/
......
......@@ -128,6 +128,11 @@ gimp_layer_mode_is_linear (GimpLayerMode mode)
case GIMP_LAYER_MODE_SOFTLIGHT:
case GIMP_LAYER_MODE_GRAIN_EXTRACT:
case GIMP_LAYER_MODE_GRAIN_MERGE:
case GIMP_LAYER_MODE_VIVID_LIGHT:
case GIMP_LAYER_MODE_PIN_LIGHT:
case GIMP_LAYER_MODE_LINEAR_LIGHT:
case GIMP_LAYER_MODE_EXCLUSION:
case GIMP_LAYER_MODE_LINEAR_BURN:
return TRUE;
case GIMP_LAYER_MODE_BEHIND_LINEAR:
......@@ -146,6 +151,11 @@ gimp_layer_mode_is_linear (GimpLayerMode mode)
case GIMP_LAYER_MODE_SOFTLIGHT_LINEAR:
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR:
case GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR:
case GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR:
case GIMP_LAYER_MODE_PIN_LIGHT_LINEAR:
case GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR:
case GIMP_LAYER_MODE_EXCLUSION_LINEAR:
case GIMP_LAYER_MODE_LINEAR_BURN_LINEAR:
return TRUE;
case GIMP_LAYER_MODE_ERASE:
......@@ -158,7 +168,7 @@ gimp_layer_mode_is_linear (GimpLayerMode mode)
return TRUE;
}
return FALSE;
return TRUE;
}
GimpLayerColorSpace
......@@ -227,6 +237,11 @@ gimp_layer_mode_get_blend_space (GimpLayerMode mode)
case GIMP_LAYER_MODE_SOFTLIGHT:
case GIMP_LAYER_MODE_GRAIN_EXTRACT:
case GIMP_LAYER_MODE_GRAIN_MERGE:
case GIMP_LAYER_MODE_VIVID_LIGHT:
case GIMP_LAYER_MODE_PIN_LIGHT:
case GIMP_LAYER_MODE_LINEAR_LIGHT:
case GIMP_LAYER_MODE_EXCLUSION:
case GIMP_LAYER_MODE_LINEAR_BURN:
return GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL;
case GIMP_LAYER_MODE_BEHIND_LINEAR:
......@@ -245,6 +260,11 @@ gimp_layer_mode_get_blend_space (GimpLayerMode mode)
case GIMP_LAYER_MODE_SOFTLIGHT_LINEAR:
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR:
case GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR:
case GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR:
case GIMP_LAYER_MODE_PIN_LIGHT_LINEAR:
case GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR:
case GIMP_LAYER_MODE_EXCLUSION_LINEAR:
case GIMP_LAYER_MODE_LINEAR_BURN_LINEAR:
return GIMP_LAYER_COLOR_SPACE_RGB_LINEAR;
case GIMP_LAYER_MODE_ERASE:
......@@ -328,6 +348,11 @@ gimp_layer_mode_get_composite_mode (GimpLayerMode mode)
case GIMP_LAYER_MODE_SOFTLIGHT:
case GIMP_LAYER_MODE_GRAIN_EXTRACT:
case GIMP_LAYER_MODE_GRAIN_MERGE:
case GIMP_LAYER_MODE_VIVID_LIGHT:
case GIMP_LAYER_MODE_PIN_LIGHT:
case GIMP_LAYER_MODE_LINEAR_LIGHT:
case GIMP_LAYER_MODE_EXCLUSION:
case GIMP_LAYER_MODE_LINEAR_BURN:
return GIMP_LAYER_COMPOSITE_SRC_ATOP;
case GIMP_LAYER_MODE_BEHIND_LINEAR:
......@@ -346,6 +371,11 @@ gimp_layer_mode_get_composite_mode (GimpLayerMode mode)
case GIMP_LAYER_MODE_SOFTLIGHT_LINEAR:
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR:
case GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR:
case GIMP_LAYER_MODE_VIVID_LIGHT_LINEAR:
case GIMP_LAYER_MODE_PIN_LIGHT_LINEAR:
case GIMP_LAYER_MODE_LINEAR_LIGHT_LINEAR:
case GIMP_LAYER_MODE_EXCLUSION_LINEAR:
case GIMP_LAYER_MODE_LINEAR_BURN_LINEAR:
return GIMP_LAYER_COMPOSITE_SRC_ATOP;
case GIMP_LAYER_MODE_ERASE:
......@@ -376,147 +406,64 @@ gimp_layer_mode_get_operation (GimpLayerMode mode)
case GIMP_LAYER_MODE_MULTIPLY_LEGACY:
return "gimp:multiply-legacy";
case GIMP_LAYER_MODE_MULTIPLY:
case GIMP_LAYER_MODE_MULTIPLY_LINEAR:
return "gimp:multiply";
case GIMP_LAYER_MODE_SCREEN_LEGACY:
return "gimp:screen-legacy";
case GIMP_LAYER_MODE_SCREEN:
case GIMP_LAYER_MODE_SCREEN_LINEAR:
return "gimp:screen";
case GIMP_LAYER_MODE_OVERLAY_LEGACY:
return "gimp:softlight-legacy";
case GIMP_LAYER_MODE_OVERLAY:
case GIMP_LAYER_MODE_OVERLAY_LINEAR:
return "gimp:overlay";
return "gimp:softlight-legacy";
case GIMP_LAYER_MODE_DIFFERENCE_LEGACY:
return "gimp:difference-legacy";
case GIMP_LAYER_MODE_DIFFERENCE:
case GIMP_LAYER_MODE_DIFFERENCE_LINEAR:
return "gimp:difference";
case GIMP_LAYER_MODE_ADDITION_LEGACY:
return "gimp:addition-legacy";
case GIMP_LAYER_MODE_ADDITION:
case GIMP_LAYER_MODE_ADDITION_LINEAR:
return "gimp:addition";
case GIMP_LAYER_MODE_SUBTRACT_LEGACY:
return "gimp:subtract-legacy";
case GIMP_LAYER_MODE_SUBTRACT:
case GIMP_LAYER_MODE_SUBTRACT_LINEAR:
return "gimp:subtract";
case GIMP_LAYER_MODE_DARKEN_ONLY_LEGACY:
return "gimp:darken-only-legacy";
case GIMP_LAYER_MODE_DARKEN_ONLY:
case GIMP_LAYER_MODE_DARKEN_ONLY_LINEAR:
return "gimp:darken-only";
case GIMP_LAYER_MODE_LIGHTEN_ONLY_LEGACY:
return "gimp:lighten-only-legacy";
case GIMP_LAYER_MODE_LIGHTEN_ONLY:
case GIMP_LAYER_MODE_LIGHTEN_ONLY_LINEAR:
return "gimp:lighten-only";
case GIMP_LAYER_MODE_HSV_HUE_LEGACY:
return "gimp:hsv-hue-legacy";
case GIMP_LAYER_MODE_HSV_HUE:
return "gimp:hsv-hue";
case GIMP_LAYER_MODE_HSV_SATURATION_LEGACY:
return "gimp:hsv-saturation-legacy";
case GIMP_LAYER_MODE_HSV_SATURATION:
return "gimp:hsv-saturation";
case GIMP_LAYER_MODE_HSV_COLOR_LEGACY:
return "gimp:hsv-color-legacy";
case GIMP_LAYER_MODE_HSV_COLOR:
return "gimp:hsv-color";
case GIMP_LAYER_MODE_HSV_VALUE_LEGACY:
return "gimp:hsv-value-legacy";
case GIMP_LAYER_MODE_HSV_VALUE:
return "gimp:hsv-value";
case GIMP_LAYER_MODE_DIVIDE_LEGACY:
return "gimp:divide-legacy";
case GIMP_LAYER_MODE_DIVIDE:
case GIMP_LAYER_MODE_DIVIDE_LINEAR:
return "gimp:divide";
case GIMP_LAYER_MODE_DODGE_LEGACY:
return "gimp:dodge-legacy";
case GIMP_LAYER_MODE_DODGE:
case GIMP_LAYER_MODE_DODGE_LINEAR:
return "gimp:dodge";
case GIMP_LAYER_MODE_BURN_LEGACY:
return "gimp:burn-legacy";
case GIMP_LAYER_MODE_BURN:
case GIMP_LAYER_MODE_BURN_LINEAR:
return "gimp:burn";
case GIMP_LAYER_MODE_HARDLIGHT_LEGACY:
return "gimp:hardlight-legacy";
case GIMP_LAYER_MODE_HARDLIGHT:
case GIMP_LAYER_MODE_HARDLIGHT_LINEAR:
return "gimp:hardlight";
case GIMP_LAYER_MODE_SOFTLIGHT_LEGACY:
return "gimp:softlight-legacy";
case GIMP_LAYER_MODE_SOFTLIGHT:
case GIMP_LAYER_MODE_SOFTLIGHT_LINEAR:
return "gimp:softlight";
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY:
return "gimp:grain-extract-legacy";
case GIMP_LAYER_MODE_GRAIN_EXTRACT:
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LINEAR:
return "gimp:grain-extract";
case GIMP_LAYER_MODE_GRAIN_MERGE_LEGACY:
return "gimp:grain-merge-legacy";
case GIMP_LAYER_MODE_GRAIN_MERGE:
case GIMP_LAYER_MODE_GRAIN_MERGE_LINEAR:
return "gimp:grain-merge";
case GIMP_LAYER_MODE_COLOR_ERASE:
return "gimp:color-erase";
case GIMP_LAYER_MODE_LCH_HUE:
return "gimp:lch-hue";
case GIMP_LAYER_MODE_LCH_CHROMA:
return "gimp:lch-chroma";
case GIMP_LAYER_MODE_LCH_COLOR:
return "gimp:lch-color";
case GIMP_LAYER_MODE_LCH_LIGHTNESS:
return "gimp:lch-lightness";
case GIMP_LAYER_MODE_ERASE:
return "gimp:erase";
......@@ -525,7 +472,8 @@ gimp_layer_mode_get_operation (GimpLayerMode mode)
case GIMP_LAYER_MODE_ANTI_ERASE:
return "gimp:anti-erase";
default:
return "gimp:layer-mode";
}
return NULL;
return "gimp:layer-mode";
}
......@@ -84,36 +84,13 @@
#include "layer-modes-legacy/gimpoperationsoftlightlegacy.h"
#include "layer-modes-legacy/gimpoperationsubtractlegacy.h"
#include "layer-modes/gimpoperationaddition.h"
#include "layer-modes/gimpoperationantierase.h"
#include "layer-modes/gimpoperationbehind.h"
#include "layer-modes/gimpoperationburn.h"
#include "layer-modes/gimpoperationerase.h"
#include "layer-modes/gimpoperationcolorerase.h"
#include "layer-modes/gimpoperationdarkenonly.h"
#include "layer-modes/gimpoperationdifference.h"
#include "layer-modes/gimpoperationdissolve.h"
#include "layer-modes/gimpoperationdivide.h"
#include "layer-modes/gimpoperationdodge.h"
#include "layer-modes/gimpoperationerase.h"
#include "layer-modes/gimpoperationgrainextract.h"
#include "layer-modes/gimpoperationgrainmerge.h"
#include "layer-modes/gimpoperationhardlight.h"
#include "layer-modes/gimpoperationhsvcolor.h"
#include "layer-modes/gimpoperationhsvhue.h"
#include "layer-modes/gimpoperationhsvsaturation.h"
#include "layer-modes/gimpoperationhsvvalue.h"
#include "layer-modes/gimpoperationlchchroma.h"
#include "layer-modes/gimpoperationlchcolor.h"
#include "layer-modes/gimpoperationlchhue.h"
#include "layer-modes/gimpoperationlchlightness.h"
#include "layer-modes/gimpoperationlightenonly.h"
#include "layer-modes/gimpoperationmultiply.h"
#include "layer-modes/gimpoperationnormal.h"
#include "layer-modes/gimpoperationoverlay.h"
#include "layer-modes/gimpoperationreplace.h"
#include "layer-modes/gimpoperationscreen.h"
#include "layer-modes/gimpoperationsoftlight.h"
#include "layer-modes/gimpoperationsubtract.h"
void
......@@ -150,48 +127,25 @@ gimp_operations_init (void)
g_type_class_ref (GIMP_TYPE_OPERATION_NORMAL);
g_type_class_ref (GIMP_TYPE_OPERATION_DISSOLVE);
g_type_class_ref (GIMP_TYPE_OPERATION_BEHIND);
g_type_class_ref (GIMP_TYPE_OPERATION_MULTIPLY);
g_type_class_ref (GIMP_TYPE_OPERATION_MULTIPLY_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_SCREEN);
g_type_class_ref (GIMP_TYPE_OPERATION_SCREEN_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_OVERLAY);
g_type_class_ref (GIMP_TYPE_OPERATION_DIFFERENCE);
g_type_class_ref (GIMP_TYPE_OPERATION_DIFFERENCE_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_ADDITION);
g_type_class_ref (GIMP_TYPE_OPERATION_ADDITION_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_SUBTRACT);
g_type_class_ref (GIMP_TYPE_OPERATION_SUBTRACT_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_DARKEN_ONLY);
g_type_class_ref (GIMP_TYPE_OPERATION_DARKEN_ONLY_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_LIGHTEN_ONLY);
g_type_class_ref (GIMP_TYPE_OPERATION_LIGHTEN_ONLY_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_HSV_HUE);
g_type_class_ref (GIMP_TYPE_OPERATION_HSV_SATURATION);
g_type_class_ref (GIMP_TYPE_OPERATION_HSV_COLOR);
g_type_class_ref (GIMP_TYPE_OPERATION_HSV_VALUE);
g_type_class_ref (GIMP_TYPE_OPERATION_HSV_HUE_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_HSV_SATURATION_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_HSV_COLOR_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_HSV_VALUE_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_DIVIDE);
g_type_class_ref (GIMP_TYPE_OPERATION_DIVIDE_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_DODGE);
g_type_class_ref (GIMP_TYPE_OPERATION_DODGE_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_BURN);
g_type_class_ref (GIMP_TYPE_OPERATION_BURN_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_HARDLIGHT);
g_type_class_ref (GIMP_TYPE_OPERATION_HARDLIGHT_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_SOFTLIGHT);
g_type_class_ref (GIMP_TYPE_OPERATION_SOFTLIGHT_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_EXTRACT);
g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_EXTRACT_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_MERGE);
g_type_class_ref (GIMP_TYPE_OPERATION_GRAIN_MERGE_LEGACY);
g_type_class_ref (GIMP_TYPE_OPERATION_COLOR_ERASE);
g_type_class_ref (GIMP_TYPE_OPERATION_LCH_HUE);
g_type_class_ref (GIMP_TYPE_OPERATION_LCH_CHROMA);
g_type_class_ref (GIMP_TYPE_OPERATION_LCH_COLOR);
g_type_class_ref (GIMP_TYPE_OPERATION_LCH_LIGHTNESS);
g_type_class_ref (GIMP_TYPE_OPERATION_ERASE);
g_type_class_ref (GIMP_TYPE_OPERATION_REPLACE);
g_type_class_ref (GIMP_TYPE_OPERATION_ANTI_ERASE);
......
......@@ -24,67 +24,20 @@ libapplayermodes_generic_a_sources = \
gimplayermodefunctions.h \
gimpblendcomposite.h \
\
gimpoperationaddition.c \
gimpoperationaddition.h \
gimpoperationantierase.c \
gimpoperationantierase.h \
gimpoperationbehind.c \
gimpoperationbehind.h \
gimpoperationburn.c \
gimpoperationburn.h \
gimpoperationcolorerase.c \
gimpoperationcolorerase.h \
gimpoperationdarkenonly.c \
gimpoperationdarkenonly.h \
gimpoperationdifference.c \
gimpoperationdifference.h \
gimpoperationdissolve.c \
gimpoperationdissolve.h \
gimpoperationdivide.c \
gimpoperationdivide.h \
gimpoperationdodge.c \
gimpoperationdodge.h \
gimpoperationerase.c \
gimpoperationerase.h \
gimpoperationgrainextract.c \
gimpoperationgrainextract.h \
gimpoperationgrainmerge.c \
gimpoperationgrainmerge.h \
gimpoperationhardlight.c \
gimpoperationhardlight.h \
gimpoperationhsvcolor.c \
gimpoperationhsvcolor.h \
gimpoperationhsvhue.c \
gimpoperationhsvhue.h \
gimpoperationhsvsaturation.c \
gimpoperationhsvsaturation.h \
gimpoperationhsvvalue.c \
gimpoperationhsvvalue.h \
gimpoperationhsvvalue.h \
gimpoperationlchchroma.c \
gimpoperationlchchroma.h \
gimpoperationlchcolor.c \
gimpoperationlchcolor.h \
gimpoperationlchhue.c \
gimpoperationlchhue.h \
gimpoperationlchlightness.c \
gimpoperationlchlightness.h \
gimpoperationlightenonly.c \
gimpoperationlightenonly.h \
gimpoperationmultiply.c \
gimpoperationmultiply.h \
gimpoperationnormal.c \
gimpoperationnormal.h \
gimpoperationoverlay.c \
gimpoperationoverlay.h \
gimpoperationreplace.c \
gimpoperationreplace.h \
gimpoperationscreen.c \
gimpoperationscreen.h \
gimpoperationsoftlight.c \
gimpoperationsoftlight.h \
gimpoperationsubtract.c \
gimpoperationsubtract.h
gimpoperationreplace.h
libapplayermodes_sse2_a_sources = \
gimpoperationnormal-sse2.c
......
This diff is collapsed.
......@@ -45,42 +45,19 @@
#include "operations/layer-modes-legacy/gimpoperationsoftlightlegacy.h"
#include "operations/layer-modes-legacy/gimpoperationsubtractlegacy.h"
#include "gimpoperationaddition.h"
#include "gimpoperationantierase.h"
#include "gimpoperationbehind.h"
#include "gimpoperationburn.h"
#include "gimpoperationcolorerase.h"
#include "gimpoperationdarkenonly.h"
#include "gimpoperationdifference.h"
#include "gimpoperationdissolve.h"
#include "gimpoperationdivide.h"
#include "gimpoperationdodge.h"
#include "gimpoperationerase.h"
#include "gimpoperationgrainextract.h"
#include "gimpoperationgrainmerge.h"
#include "gimpoperationhardlight.h"
#include "gimpoperationhsvcolor.h"
#include "gimpoperationhsvhue.h"
#include "gimpoperationhsvsaturation.h"
#include "gimpoperationhsvvalue.h"
#include "gimpoperationlchchroma.h"
#include "gimpoperationlchcolor.h"
#include "gimpoperationlchhue.h"
#include "gimpoperationlchlightness.h"
#include "gimpoperationlightenonly.h"
#include "gimpoperationmultiply.h"
#include "gimpoperationnormal.h"
#include "gimpoperationoverlay.h"
#include "gimpoperationreplace.h"
#include "gimpoperationscreen.h"
#include "gimpoperationsoftlight.h"
#include "gimpoperationsubtract.h"
GimpLayerModeFunc
gimp_get_layer_mode_function (GimpLayerMode paint_mode)
{
GimpLayerModeFunc func;
GimpLayerModeFunc func = gimp_operation_layer_mode_process_pixels;
switch (paint_mode)
{
......@@ -102,19 +79,10 @@ gimp_get_layer_mode_function (GimpLayerMode paint_mode)
func = gimp_operation_multiply_legacy_process;
break;
case GIMP_LAYER_MODE_MULTIPLY:
case GIMP_LAYER_MODE_MULTIPLY_LINEAR:
func = gimp_operation_multiply_process;
break;
case GIMP_LAYER_MODE_SCREEN_LEGACY:
func = gimp_operation_screen_legacy_process;
break;
case GIMP_LAYER_MODE_SCREEN:
func = gimp_operation_screen_process;
break;
case GIMP_LAYER_MODE_OVERLAY_LEGACY:
func = gimp_operation_softlight_legacy_process;
break;
......@@ -123,75 +91,34 @@ gimp_get_layer_mode_function (GimpLayerMode paint_mode)
func = gimp_operation_difference_legacy_process;
break;
case GIMP_LAYER_MODE_DIFFERENCE:
case GIMP_LAYER_MODE_DIFFERENCE_LINEAR:
func = gimp_operation_difference_process;
break;
case GIMP_LAYER_MODE_ADDITION_LEGACY:
func = gimp_operation_addition_legacy_process;
break;
case GIMP_LAYER_MODE_ADDITION:
case GIMP_LAYER_MODE_ADDITION_LINEAR:
func = gimp_operation_addition_process;
break;
case GIMP_LAYER_MODE_SUBTRACT_LEGACY:
func = gimp_operation_subtract_legacy_process;
break;
case GIMP_LAYER_MODE_SUBTRACT:
case GIMP_LAYER_MODE_SUBTRACT_LINEAR:
func = gimp_operation_subtract_process;
break;
case GIMP_LAYER_MODE_DARKEN_ONLY_LEGACY:
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;
break;
case GIMP_LAYER_MODE_LIGHTEN_ONLY_LEGACY:
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;
break;
case GIMP_LAYER_MODE_HSV_HUE:
func = gimp_operation_hsv_hue_process;
break;
case GIMP_LAYER_MODE_HSV_HUE_LEGACY:
func = gimp_operation_hsv_hue_legacy_process;
break;
case GIMP_LAYER_MODE_HSV_SATURATION:
func = gimp_operation_hsv_saturation_process;
break;
case GIMP_LAYER_MODE_HSV_SATURATION_LEGACY:
func = gimp_operation_hsv_saturation_legacy_process;
break;
case GIMP_LAYER_MODE_HSV_COLOR:
func = gimp_operation_hsv_color_process;
break;
case GIMP_LAYER_MODE_HSV_COLOR_LEGACY:
func = gimp_operation_hsv_color_legacy_process;
break;
case GIMP_LAYER_MODE_HSV_VALUE:
func = gimp_operation_hsv_value_process;
break;
case GIMP_LAYER_MODE_HSV_VALUE_LEGACY:
func = gimp_operation_hsv_value_legacy_process;
break;
......@@ -200,87 +127,34 @@ gimp_get_layer_mode_function (GimpLayerMode paint_mode)
func = gimp_operation_divide_legacy_process;
break;
case GIMP_LAYER_MODE_DIVIDE:
case GIMP_LAYER_MODE_DIVIDE_LINEAR:
func = gimp_operation_divide_process;
break;
case GIMP_LAYER_MODE_DODGE_LEGACY:
func = gimp_operation_dodge_legacy_process;
break;
case GIMP_LAYER_MODE_DODGE:
case GIMP_LAYER_MODE_DODGE_LINEAR:
func = gimp_operation_dodge_process;
break;
case GIMP_LAYER_MODE_BURN_LEGACY:
func = gimp_operation_burn_legacy_process;
break;
case GIMP_LAYER_MODE_BURN:
case GIMP_LAYER_MODE_BURN_LINEAR:
func = gimp_operation_burn_process;
break;
case GIMP_LAYER_MODE_HARDLIGHT_LEGACY:
func = gimp_operation_hardlight_legacy_process;
break;
case GIMP_LAYER_MODE_HARDLIGHT:
func = gimp_operation_hardlight_process;
break;
case GIMP_LAYER_MODE_SOFTLIGHT_LEGACY:
func = gimp_operation_softlight_legacy_process;
break;
case GIMP_LAYER_MODE_SOFTLIGHT:
func = gimp_operation_softlight_process;
break;
case GIMP_LAYER_MODE_GRAIN_EXTRACT_LEGACY:
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;
break;
case GIMP_LAYER_MODE_GRAIN_MERGE_LEGACY:
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;
break;
case GIMP_LAYER_MODE_COLOR_ERASE:
func = gimp_operation_color_erase_process;
break;
case GIMP_LAYER_MODE_OVERLAY:
func = gimp_operation_overlay_process;
break;
case GIMP_LAYER_MODE_LCH_HUE:
func = gimp_operation_lch_hue_process;
break;
case GIMP_LAYER_MODE_LCH_CHROMA:
func = gimp_operation_lch_chroma_process;
break;
case GIMP_LAYER_MODE_LCH_COLOR:
func = gimp_operation_lch_color_process;
break;
case GIMP_LAYER_MODE_LCH_LIGHTNESS:
func = gimp_operation_lch_lightness_process;
break;
case GIMP_LAYER_MODE_ERASE:
func = gimp_operation_erase_process;
break;
......@@ -294,9 +168,6 @@ gimp_get_layer_mode_function (GimpLayerMode paint_mode)
break;
default:
g_warning ("No direct function for layer mode (%d), using gimp:normal",
paint_mode);
func = gimp_operation_normal_process;
break;
}
......
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpoperationadditionmode.c
* Copyright (C) 2008 Michael Natterer <mitch@gimp.org>
* 2012 Ville Sokk <ville.sokk@gmail.com>
* 2017 Øyvind Kolås <pippin@gimp.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/