app: make layer modes more configurable

Implement a common utility function gimp_blend_composite that uses utility
functions for implementing layer modes, with separate (possibly SIMD) optimized
loops for blending and compositing, with configured linear TRC, perceptual
gamma TRC or even using CIE Lab as the space.
This commit is contained in:
Øyvind Kolås
2017-01-15 21:11:00 +01:00
parent d1fea4d6c6
commit 41fff6990e
105 changed files with 2383 additions and 1992 deletions

View File

@ -98,11 +98,13 @@ gimp_layer_mode_is_linear (GimpLayerMode mode)
case GIMP_LAYER_MODE_COLOR_ERASE:
case GIMP_LAYER_MODE_OVERLAY:
return FALSE;
case GIMP_LAYER_MODE_LCH_HUE:
case GIMP_LAYER_MODE_LCH_CHROMA:
case GIMP_LAYER_MODE_LCH_COLOR:
case GIMP_LAYER_MODE_LCH_LIGHTNESS:
return FALSE;
return TRUE;
case GIMP_LAYER_MODE_NORMAL:
return TRUE;
@ -125,7 +127,7 @@ gimp_layer_mode_is_linear (GimpLayerMode mode)
case GIMP_LAYER_MODE_SOFTLIGHT:
case GIMP_LAYER_MODE_GRAIN_EXTRACT:
case GIMP_LAYER_MODE_GRAIN_MERGE:
return FALSE;
return TRUE;
case GIMP_LAYER_MODE_BEHIND_LINEAR:
case GIMP_LAYER_MODE_MULTIPLY_LINEAR: