app: avoid dropping cached data when committing filters
In gimp_gegl_apply_cached_operation(), add a boolean connect_src_buffer parameter, which determines whether to connect the source buffer to the operation-node's input, or to use its existing input. In gimp_drawable_merge_filter(), pass FALSE for connect_src_buffer, so that the existing filter-node input is used. This produces an equivalent result, however, it avoids invalidating the filter node, and dropping cached data as a result. In operations that cache larger areas than the ROI, this avoids reprocessing already-cached data when processing the rest of the operation. Additionally, in gimp_gegl_apply_cached_operation(), use an empty input for the operation if src_buffer is NULL and connect_src_buffer is TRUE; previously, we'd use the operation- node's existing input when src_buffer was NULL. Furthermore, crop the operation-node's input to the destination rect when crop_input is TRUE, even if connect_src_buffer is FALSE.
Showing with 16 additions and 8 deletions