app: remove GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA and friends

Instead, add a gimp_layer_mode_get_format() function, which takes
the layer mode, composite space, and blend space, and returns the
I/O format.

Currently, we always use the composite space format as the I/O
format.  This simplifies gimp_composite_blend(), and gives us
composite-space support for the "special" layer mode ops for free.
This commit is contained in:
Ell
2017-02-17 10:20:04 -05:00
parent 50d8455890
commit 7402127505
9 changed files with 151 additions and 271 deletions

View File

@ -189,10 +189,9 @@ typedef enum /*< pdb-skip, skip >*/
typedef enum /*< pdb-skip, skip >*/
{
GIMP_LAYER_MODE_FLAG_LEGACY = 1 << 0,
GIMP_LAYER_MODE_FLAG_WANTS_LINEAR_DATA = 1 << 1,
GIMP_LAYER_MODE_FLAG_BLEND_SPACE_IMMUTABLE = 1 << 2,
GIMP_LAYER_MODE_FLAG_COMPOSITE_SPACE_IMMUTABLE = 1 << 3,
GIMP_LAYER_MODE_FLAG_COMPOSITE_MODE_IMMUTABLE = 1 << 4,
GIMP_LAYER_MODE_FLAG_BLEND_SPACE_IMMUTABLE = 1 << 1,
GIMP_LAYER_MODE_FLAG_COMPOSITE_SPACE_IMMUTABLE = 1 << 2,
GIMP_LAYER_MODE_FLAG_COMPOSITE_MODE_IMMUTABLE = 1 << 3,
} GimpLayerModeFlags;