app: remove "Edit -> Fade..."

This commit completely removes the "Edit -> Fade..." feature,
because...

- The main reason is that "fade" requires us to keep two buffers,
  instead of one, for each fadeable undo step, doubling (or worse,
  since the extra buffer might have higher precision than the
  drawable) the space consumed by these steps.  This has notable
  impact when editing large images.  This overhead is incurred even
  when not actually using "fade", and since it seems to be very
  rarely used, this is too wasteful.

- "Fade" is broken in 2.10: when comitting a filter, we copy the
  cached parts of the result into the apply buffer.  However, the
  result cache sits after the mode node, while the apply buffer
  should contain the result of the filter *before* the mode node,
  which can lead to wrong results in the general case.

- The same behavior can be trivially achieved "manually", by
  duplicating the layer, editing the duplicate, and changing its
  opacity/mode.

- If we really want this feature, now that most filters are GEGL
  ops, it makes more sense to just add opacity/mode options to the
  filter tool, instead of having this be a separate step.

(cherry picked from commit ed7ea51fb7)
This commit is contained in:
Ell
2018-12-27 11:16:04 -05:00
parent f60fe04842
commit 23ae869f21
26 changed files with 15 additions and 606 deletions

View File

@ -86,8 +86,7 @@ static const GimpLayerModeInfo layer_mode_infos[] =
GIMP_LAYER_MODE_FLAG_BLEND_SPACE_IMMUTABLE |
GIMP_LAYER_MODE_FLAG_COMPOSITE_SPACE_IMMUTABLE |
GIMP_LAYER_MODE_FLAG_COMPOSITE_MODE_IMMUTABLE,
.context = GIMP_LAYER_MODE_CONTEXT_PAINT |
GIMP_LAYER_MODE_CONTEXT_FADE,
.context = GIMP_LAYER_MODE_CONTEXT_PAINT,
.paint_composite_mode = GIMP_LAYER_COMPOSITE_UNION,
.composite_mode = GIMP_LAYER_COMPOSITE_UNION,
.composite_space = GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL
@ -368,8 +367,7 @@ static const GimpLayerModeInfo layer_mode_infos[] =
GIMP_LAYER_MODE_FLAG_COMPOSITE_SPACE_IMMUTABLE |
GIMP_LAYER_MODE_FLAG_COMPOSITE_MODE_IMMUTABLE |
GIMP_LAYER_MODE_FLAG_SUBTRACTIVE,
.context = GIMP_LAYER_MODE_CONTEXT_PAINT |
GIMP_LAYER_MODE_CONTEXT_FADE,
.context = GIMP_LAYER_MODE_CONTEXT_PAINT,
.paint_composite_mode = GIMP_LAYER_COMPOSITE_CLIP_TO_BACKDROP,
.composite_mode = GIMP_LAYER_COMPOSITE_CLIP_TO_BACKDROP,
.composite_space = GIMP_LAYER_COLOR_SPACE_RGB_PERCEPTUAL,
@ -450,8 +448,7 @@ static const GimpLayerModeInfo layer_mode_infos[] =
.op_name = "gimp:behind",
.flags = GIMP_LAYER_MODE_FLAG_BLEND_SPACE_IMMUTABLE,
.context = GIMP_LAYER_MODE_CONTEXT_PAINT |
GIMP_LAYER_MODE_CONTEXT_FADE,
.context = GIMP_LAYER_MODE_CONTEXT_PAINT,
.paint_composite_mode = GIMP_LAYER_COMPOSITE_UNION,
.composite_mode = GIMP_LAYER_COMPOSITE_UNION,
.composite_space = GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
@ -826,7 +823,6 @@ static const GimpLayerModeInfo layer_mode_infos[] =
.op_name = "gimp:replace",
.flags = GIMP_LAYER_MODE_FLAG_BLEND_SPACE_IMMUTABLE |
GIMP_LAYER_MODE_FLAG_TRIVIAL,
.context = GIMP_LAYER_MODE_CONTEXT_FADE,
.paint_composite_mode = GIMP_LAYER_COMPOSITE_UNION,
.composite_mode = GIMP_LAYER_COMPOSITE_UNION,
.composite_space = GIMP_LAYER_COLOR_SPACE_RGB_LINEAR
@ -838,7 +834,6 @@ static const GimpLayerModeInfo layer_mode_infos[] =
.flags = GIMP_LAYER_MODE_FLAG_BLEND_SPACE_IMMUTABLE |
GIMP_LAYER_MODE_FLAG_COMPOSITE_SPACE_IMMUTABLE |
GIMP_LAYER_MODE_FLAG_ALPHA_ONLY,
.context = GIMP_LAYER_MODE_CONTEXT_FADE,
.paint_composite_mode = GIMP_LAYER_COMPOSITE_UNION,
.composite_mode = GIMP_LAYER_COMPOSITE_UNION
}