Skip to content
  • Ell's avatar
    app: strength-reduce pass-through groups to normal groups · fa9a023c
    Ell authored
    Override GimpLayer::get_effective_mode() in GimpGroupLayer, to
    perform strength-reduction of pass-through groups to normal groups
    under certain conditions (see gimp_group_layer_get_effective_mode()
    for the logic.)
    
    The main motivation for this is the fact that Photoshop uses pass-
    through mode as the default mode for groups, resulting in many PSDs
    using pass-through groups generously and unnecessarily.  Since
    pass-through groups are more expensive that normal groups, reducing
    them to normal groups when possible can make a big difference.
    
    Note that, while the results of the strength-reduced composition
    are theoretically equivalent, there may be small differences in
    practice due to numerical errors, especially when using low
    precision.  This is unlikely to be an issue, but, just in case,
    allow disabling this optimization using the
    GIMP_NO_PASS_THROUGH_STRENGTH_REDUCTION environment variable.
    fa9a023c