app: disregard composite space in non-union alpha-only layer modes

In gimp_layer_mode_get_format(), disregard the requested composite
space when selecting the format, if the input layer mode is alpha-
only, and the requested composite mode is not UNION, since, in this
case, the layer mode doesn't combine the layer/backdrop colors, and
rather only modifies the alpha of one of them.  This allows us to
use the preferred format, avoiding gamma conversion.

This particularly improves the performance of the Eraser tool in
perceptual images.
This commit is contained in:
Ell
2019-05-24 01:33:53 -04:00
parent 2a48a5f868
commit a5962e4049
8 changed files with 49 additions and 12 deletions

View File

@ -330,8 +330,9 @@ gimp_operation_layer_mode_prepare (GeglOperation *operation)
}
format = gimp_layer_mode_get_format (self->layer_mode,
self->composite_space,
self->blend_space,
self->composite_space,
self->composite_mode,
preferred_format);
if (self->cached_fish_format != format)
{