Skip to content
  • Ell's avatar
    app: improve gimpchannel-{combine,select} · 8e77347c
    Ell authored
    In gimpchannel-select, move some of the common functionality of the
    various gimp_channel_select_foo() functions to gimpchannel-combine.
    Furthermore, don't special-case CHANNEL_OP_INTERSECT, but rather
    pass it over to gimpchannel-combine, which is now prepared to
    handle it in all functions, as per the previous commits.
    
    In gimpchannel-combine, factor out the common functionality of the
    various gimp_channel_combine_foo() functions into a pair of
    gimp_channel_combine_{start,end}() functions, which are called
    before/after the actual gimp_gegl_mask_combine_foo() function,
    respectively.  In particular, these functions deal with calculating
    the new channel bounds.  Previously, the various
    gimp_gegl_mask_combine_foo() functions would implicitly invalidate
    the channel bounds (since commit
    d0ae244f), rendering the bounds-
    recalculation code ineffective.  This avoids manually recalculating
    the bounds in many cases, speeding up selection operations.
    8e77347c