Files
gimp/app/dialogs/image-merge-layers-dialog.h
Ell 5d37a244dd app: merge layers in chunks, and show progress
In gimp_image_merge_layers() -- the internal function used by the
various layer-merging/flattenning functions -- process the merged-
layer graph in chunks, using gimp_gegl_apply_operation(), instead
of in one go, using gegl_node_blit_buffer().  Processing in chunks
better utilizes the cache, since it reduces the size of
intermediate buffers, reducing the chances of hitting the swap when
merging large images (see, for example, issue #3012.)

Additionally, this allows us to show progress indication.  Have the
relevant gimpimage-merge functions take a GimpProgress, and pass it
down to gimp_image_merge_layers().  Adapt all callers.

(cherry picked from commit e83d8ac4f2)
2019-02-25 05:10:59 -05:00

43 lines
1.9 KiB
C

/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __IMAGE_MERGE_LAYERS_DIALOG_H__
#define __IMAGE_MERGE_LAYERS_DIALOG_H__
typedef void (* GimpMergeLayersCallback) (GtkWidget *dialog,
GimpImage *image,
GimpContext *context,
GimpMergeType merge_type,
gboolean merge_active_group,
gboolean discard_invisible,
gpointer user_data);
GtkWidget *
image_merge_layers_dialog_new (GimpImage *image,
GimpContext *context,
GtkWidget *parent,
GimpMergeType merge_type,
gboolean merge_active_group,
gboolean discard_invisible,
GimpMergeLayersCallback callback,
gpointer user_data);
#endif /* __IMAGE_MERGE_LAYERS_DIALOG_H__ */