app: use gimp_gegl_buffer_copy() all over the place

Replace all uses of gegl_buffer_copy() in app/ with
gimp_gegl_buffer_copy(), added in the previous commit.

(cherry picked from commit 08ff2ac8c8)
This commit is contained in:
Ell
2018-05-24 10:21:21 -04:00
parent 1878543cf8
commit b67c1e33f1
26 changed files with 284 additions and 250 deletions

View File

@ -33,6 +33,7 @@
#include "paint/gimppaintoptions.h"
#include "gegl/gimp-gegl-apply-operation.h"
#include "gegl/gimp-gegl-loops.h"
#include "gegl/gimp-gegl-mask.h"
#include "gegl/gimp-gegl-nodes.h"
@ -553,9 +554,9 @@ gimp_channel_duplicate (GimpItem *item,
gegl_buffer_set_format (new_buffer,
gimp_drawable_get_format (new_drawable));
gegl_buffer_copy (gimp_drawable_get_buffer (new_drawable), NULL,
GEGL_ABYSS_NONE,
new_buffer, NULL);
gimp_gegl_buffer_copy (gimp_drawable_get_buffer (new_drawable),
NULL, GEGL_ABYSS_NONE,
new_buffer, NULL);
gegl_buffer_set_format (new_buffer, NULL);
gimp_drawable_set_buffer (new_drawable, FALSE, NULL, new_buffer);
@ -665,22 +666,22 @@ gimp_channel_translate (GimpItem *item,
gegl_buffer_new (GEGL_RECTANGLE (0, 0, width, height),
gimp_drawable_get_format (GIMP_DRAWABLE (channel)));
gegl_buffer_copy (gimp_drawable_get_buffer (GIMP_DRAWABLE (channel)),
GEGL_RECTANGLE (x - SIGNED_ROUND (off_x),
y - SIGNED_ROUND (off_y),
width, height),
GEGL_ABYSS_NONE,
tmp_buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
gimp_gegl_buffer_copy (gimp_drawable_get_buffer (GIMP_DRAWABLE (channel)),
GEGL_RECTANGLE (x - SIGNED_ROUND (off_x),
y - SIGNED_ROUND (off_y),
width, height),
GEGL_ABYSS_NONE,
tmp_buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
/* clear the mask */
gegl_buffer_clear (gimp_drawable_get_buffer (GIMP_DRAWABLE (channel)),
NULL);
/* copy the temp mask back to the mask */
gegl_buffer_copy (tmp_buffer, NULL, GEGL_ABYSS_NONE,
gimp_drawable_get_buffer (GIMP_DRAWABLE (channel)),
GEGL_RECTANGLE (x, y, 0, 0));
gimp_gegl_buffer_copy (tmp_buffer, NULL, GEGL_ABYSS_NONE,
gimp_drawable_get_buffer (GIMP_DRAWABLE (channel)),
GEGL_RECTANGLE (x, y, 0, 0));
/* free the temporary mask */
g_object_unref (tmp_buffer);
@ -965,9 +966,9 @@ gimp_channel_convert_type (GimpDrawable *drawable,
if (mask_dither_type == GEGL_DITHER_NONE)
{
gegl_buffer_copy (gimp_drawable_get_buffer (drawable), NULL,
GEGL_ABYSS_NONE,
dest_buffer, NULL);
gimp_gegl_buffer_copy (gimp_drawable_get_buffer (drawable), NULL,
GEGL_ABYSS_NONE,
dest_buffer, NULL);
}
else
{
@ -1600,7 +1601,7 @@ gimp_channel_new_from_buffer (GimpImage *image,
name, color);
dest = gimp_drawable_get_buffer (GIMP_DRAWABLE (channel));
gegl_buffer_copy (buffer, NULL, GEGL_ABYSS_NONE, dest, NULL);
gimp_gegl_buffer_copy (buffer, NULL, GEGL_ABYSS_NONE, dest, NULL);
return channel;
}
@ -1632,9 +1633,9 @@ gimp_channel_new_from_alpha (GimpImage *image,
gegl_buffer_set_format (dest_buffer,
gimp_drawable_get_component_format (drawable,
GIMP_CHANNEL_ALPHA));
gegl_buffer_copy (gimp_drawable_get_buffer (drawable), NULL,
GEGL_ABYSS_NONE,
dest_buffer, NULL);
gimp_gegl_buffer_copy (gimp_drawable_get_buffer (drawable), NULL,
GEGL_ABYSS_NONE,
dest_buffer, NULL);
gegl_buffer_set_format (dest_buffer, NULL);
return channel;
@ -1670,7 +1671,7 @@ gimp_channel_new_from_component (GimpImage *image,
dest_buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (channel));
gegl_buffer_set_format (dest_buffer, format);
gegl_buffer_copy (src_buffer, NULL, GEGL_ABYSS_NONE, dest_buffer, NULL);
gimp_gegl_buffer_copy (src_buffer, NULL, GEGL_ABYSS_NONE, dest_buffer, NULL);
gegl_buffer_set_format (dest_buffer, NULL);
return channel;

View File

@ -115,13 +115,14 @@ gimp_drawable_real_apply_buffer (GimpDrawable *drawable,
gegl_buffer_new (GEGL_RECTANGLE (0, 0, width, height),
gegl_buffer_get_format (buffer));
gegl_buffer_copy (buffer,
GEGL_RECTANGLE (buffer_region->x + (x - base_x),
buffer_region->y + (y - base_y),
width, height),
GEGL_ABYSS_NONE,
undo->applied_buffer,
GEGL_RECTANGLE (0, 0, width, height));
gimp_gegl_buffer_copy (
buffer,
GEGL_RECTANGLE (buffer_region->x + (x - base_x),
buffer_region->y + (y - base_y),
width, height),
GEGL_ABYSS_NONE,
undo->applied_buffer,
GEGL_RECTANGLE (0, 0, width, height));
}
}
@ -233,12 +234,12 @@ gimp_drawable_real_replace_buffer (GimpDrawable *drawable,
dest_buffer = gegl_buffer_new (GEGL_RECTANGLE (0, 0, width, height),
gegl_buffer_get_format (src_buffer));
gegl_buffer_copy (src_buffer,
GEGL_RECTANGLE (x + offset_x, y + offset_y,
width, height),
GEGL_ABYSS_NONE,
dest_buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
gimp_gegl_buffer_copy (src_buffer,
GEGL_RECTANGLE (x + offset_x, y + offset_y,
width, height),
GEGL_ABYSS_NONE,
dest_buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
gimp_gegl_combine_mask (mask_buffer, mask_buffer_region,
dest_buffer, GEGL_RECTANGLE (0, 0, width, height),

View File

@ -27,6 +27,7 @@
#include "gegl/gimpapplicator.h"
#include "gegl/gimp-gegl-apply-operation.h"
#include "gegl/gimp-gegl-loops.h"
#include "gimp-utils.h"
#include "gimpdrawable.h"
@ -134,12 +135,12 @@ gimp_drawable_merge_filter (GimpDrawable *drawable,
rect.width, rect.height),
gimp_drawable_get_format (drawable));
gegl_buffer_copy (gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (rect.x, rect.y,
rect.width, rect.height),
GEGL_ABYSS_NONE,
undo_buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
gimp_gegl_buffer_copy (gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (rect.x, rect.y,
rect.width, rect.height),
GEGL_ABYSS_NONE,
undo_buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
applicator = gimp_filter_get_applicator (filter);
@ -177,13 +178,13 @@ gimp_drawable_merge_filter (GimpDrawable *drawable,
/* we have to copy the cached region to the apply_buffer,
* because this region is not going to be processed.
*/
gegl_buffer_copy (cache,
&rects[i],
GEGL_ABYSS_NONE,
apply_buffer,
GEGL_RECTANGLE (rects[i].x - rect.x,
rects[i].y - rect.y,
0, 0));
gimp_gegl_buffer_copy (cache,
&rects[i],
GEGL_ABYSS_NONE,
apply_buffer,
GEGL_RECTANGLE (rects[i].x - rect.x,
rects[i].y - rect.y,
0, 0));
}
}
@ -225,11 +226,11 @@ gimp_drawable_merge_filter (GimpDrawable *drawable,
{
/* canceled by the user */
gegl_buffer_copy (undo_buffer,
GEGL_RECTANGLE (0, 0, rect.width, rect.height),
GEGL_ABYSS_NONE,
gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (rect.x, rect.y, 0, 0));
gimp_gegl_buffer_copy (undo_buffer,
GEGL_RECTANGLE (0, 0, rect.width, rect.height),
GEGL_ABYSS_NONE,
gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (rect.x, rect.y, 0, 0));
success = FALSE;
}

View File

@ -26,6 +26,7 @@
#include "core-types.h"
#include "gegl/gimp-gegl-apply-operation.h"
#include "gegl/gimp-gegl-loops.h"
#include "gegl/gimp-gegl-utils.h"
#include "operations/layer-modes/gimp-layer-modes.h"
@ -183,9 +184,10 @@ gimp_drawable_gradient_shapeburst_distmap (GimpDrawable *drawable,
gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y);
/* copy the mask to the temp mask */
gegl_buffer_copy (gimp_drawable_get_buffer (GIMP_DRAWABLE (mask)),
GEGL_RECTANGLE (x + off_x, y + off_y, width, height),
GEGL_ABYSS_NONE, temp_buffer, region);
gimp_gegl_buffer_copy (
gimp_drawable_get_buffer (GIMP_DRAWABLE (mask)),
GEGL_RECTANGLE (x + off_x, y + off_y, width, height),
GEGL_ABYSS_NONE, temp_buffer, region);
}
else
{
@ -198,9 +200,9 @@ gimp_drawable_gradient_shapeburst_distmap (GimpDrawable *drawable,
/* extract the aplha into the temp mask */
gegl_buffer_set_format (temp_buffer, component_format);
gegl_buffer_copy (gimp_drawable_get_buffer (drawable), region,
GEGL_ABYSS_NONE,
temp_buffer, region);
gimp_gegl_buffer_copy (gimp_drawable_get_buffer (drawable), region,
GEGL_ABYSS_NONE,
temp_buffer, region);
gegl_buffer_set_format (temp_buffer, NULL);
}
else

View File

@ -28,6 +28,7 @@
#include "core-types.h"
#include "gegl/gimp-gegl-loops.h"
#include "gegl/gimp-gegl-utils.h"
#include "gimp.h"
@ -136,11 +137,11 @@ gimp_drawable_offset (GimpDrawable *drawable,
/* Copy the center region */
if (width && height)
{
gegl_buffer_copy (src_buffer,
GEGL_RECTANGLE (src_x, src_y, width, height),
GEGL_ABYSS_NONE,
new_buffer,
GEGL_RECTANGLE (dest_x,dest_y, width, height));
gimp_gegl_buffer_copy (src_buffer,
GEGL_RECTANGLE (src_x, src_y, width, height),
GEGL_ABYSS_NONE,
new_buffer,
GEGL_RECTANGLE (dest_x,dest_y, width, height));
}
if (wrap_around)
@ -179,12 +180,13 @@ gimp_drawable_offset (GimpDrawable *drawable,
/* intersecting region */
if (offset_x != 0 && offset_y != 0)
{
gegl_buffer_copy (src_buffer,
GEGL_RECTANGLE (src_x, src_y,
ABS (offset_x), ABS (offset_y)),
GEGL_ABYSS_NONE,
new_buffer,
GEGL_RECTANGLE (dest_x, dest_y, 0, 0));
gimp_gegl_buffer_copy (
src_buffer,
GEGL_RECTANGLE (src_x, src_y,
ABS (offset_x), ABS (offset_y)),
GEGL_ABYSS_NONE,
new_buffer,
GEGL_RECTANGLE (dest_x, dest_y, 0, 0));
}
/* X offset */
@ -211,8 +213,8 @@ gimp_drawable_offset (GimpDrawable *drawable,
dest_rect.y = 0;
}
gegl_buffer_copy (src_buffer, &src_rect, GEGL_ABYSS_NONE,
new_buffer, &dest_rect);
gimp_gegl_buffer_copy (src_buffer, &src_rect, GEGL_ABYSS_NONE,
new_buffer, &dest_rect);
}
/* X offset */
@ -239,8 +241,8 @@ gimp_drawable_offset (GimpDrawable *drawable,
dest_rect.y = dest_y;
}
gegl_buffer_copy (src_buffer, &src_rect, GEGL_ABYSS_NONE,
new_buffer, &dest_rect);
gimp_gegl_buffer_copy (src_buffer, &src_rect, GEGL_ABYSS_NONE,
new_buffer, &dest_rect);
}
}

View File

@ -559,14 +559,15 @@ gimp_drawable_resize (GimpItem *item,
if (intersect && copy_width && copy_height)
{
/* Copy the pixels in the intersection */
gegl_buffer_copy (gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (copy_x - gimp_item_get_offset_x (item),
copy_y - gimp_item_get_offset_y (item),
copy_width,
copy_height), GEGL_ABYSS_NONE,
new_buffer,
GEGL_RECTANGLE (copy_x - new_offset_x,
copy_y - new_offset_y, 0, 0));
gimp_gegl_buffer_copy (
gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (copy_x - gimp_item_get_offset_x (item),
copy_y - gimp_item_get_offset_y (item),
copy_width,
copy_height), GEGL_ABYSS_NONE,
new_buffer,
GEGL_RECTANGLE (copy_x - new_offset_x,
copy_y - new_offset_y, 0, 0));
}
gimp_drawable_set_buffer_full (drawable, gimp_item_is_attached (item), NULL,
@ -779,8 +780,9 @@ gimp_drawable_real_convert_type (GimpDrawable *drawable,
gimp_item_get_height (GIMP_ITEM (drawable))),
new_format);
gegl_buffer_copy (gimp_drawable_get_buffer (drawable), NULL, GEGL_ABYSS_NONE,
dest_buffer, NULL);
gimp_gegl_buffer_copy (
gimp_drawable_get_buffer (drawable), NULL, GEGL_ABYSS_NONE,
dest_buffer, NULL);
gimp_drawable_set_buffer (drawable, push_undo, NULL, dest_buffer);
g_object_unref (dest_buffer);
@ -870,10 +872,11 @@ gimp_drawable_real_push_undo (GimpDrawable *drawable,
buffer = gegl_buffer_new (GEGL_RECTANGLE (0, 0, width, height),
gimp_drawable_get_format (drawable));
gegl_buffer_copy (gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (x, y, width, height), GEGL_ABYSS_NONE,
buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
gimp_gegl_buffer_copy (
gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (x, y, width, height), GEGL_ABYSS_NONE,
buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
}
else
{
@ -899,14 +902,14 @@ gimp_drawable_real_swap_pixels (GimpDrawable *drawable,
tmp = gegl_buffer_dup (buffer);
gegl_buffer_copy (gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (x, y, width, height), GEGL_ABYSS_NONE,
buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
gegl_buffer_copy (tmp,
GEGL_RECTANGLE (0, 0, width, height), GEGL_ABYSS_NONE,
gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (x, y, 0, 0));
gimp_gegl_buffer_copy (gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (x, y, width, height), GEGL_ABYSS_NONE,
buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
gimp_gegl_buffer_copy (tmp,
GEGL_RECTANGLE (0, 0, width, height), GEGL_ABYSS_NONE,
gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (x, y, 0, 0));
g_object_unref (tmp);
@ -1691,7 +1694,7 @@ gimp_drawable_flush_paint (GimpDrawable *drawable)
cairo_region_get_rectangle (drawable->private->paint_copy_region,
i, (cairo_rectangle_int_t *) &rect);
gegl_buffer_copy (
gimp_gegl_buffer_copy (
drawable->private->paint_buffer, &rect, GEGL_ABYSS_NONE,
buffer, NULL);
}

View File

@ -31,6 +31,7 @@
#include "core-types.h"
#include "gegl/gimp-babl.h"
#include "gegl/gimp-gegl-loops.h"
#include "gimpgrouplayer.h"
#include "gimpgrouplayerundo.h"
@ -2000,17 +2001,17 @@ gimp_group_layer_update_mask_size (GimpGroupLayer *group)
if (intersect)
{
gegl_buffer_copy (mask_buffer,
GEGL_RECTANGLE (copy_bounds.x - mask_bounds.x,
copy_bounds.y - mask_bounds.y,
copy_bounds.width,
copy_bounds.height),
GEGL_ABYSS_NONE,
buffer,
GEGL_RECTANGLE (copy_bounds.x - bounds.x,
copy_bounds.y - bounds.y,
copy_bounds.width,
copy_bounds.height));
gimp_gegl_buffer_copy (mask_buffer,
GEGL_RECTANGLE (copy_bounds.x - mask_bounds.x,
copy_bounds.y - mask_bounds.y,
copy_bounds.width,
copy_bounds.height),
GEGL_ABYSS_NONE,
buffer,
GEGL_RECTANGLE (copy_bounds.x - bounds.x,
copy_bounds.y - bounds.y,
copy_bounds.width,
copy_bounds.height));
}
gimp_drawable_set_buffer_full (GIMP_DRAWABLE (mask),

View File

@ -30,6 +30,7 @@
#include "core-types.h"
#include "gegl/gimp-babl.h"
#include "gegl/gimp-gegl-loops.h"
#include "gimp-atomic.h"
#include "gimp-parallel.h"
@ -334,8 +335,8 @@ gimp_histogram_calculate_async (GimpHistogram *histogram,
gegl_buffer_get_format (buffer));
context->buffer_rect = *buffer_rect;
gegl_buffer_copy (buffer, buffer_rect, GEGL_ABYSS_NONE,
context->buffer, NULL);
gimp_gegl_buffer_copy (buffer, buffer_rect, GEGL_ABYSS_NONE,
context->buffer, NULL);
if (mask)
{
@ -347,8 +348,8 @@ gimp_histogram_calculate_async (GimpHistogram *histogram,
context->mask = gegl_buffer_new (&context->mask_rect,
gegl_buffer_get_format (mask));
gegl_buffer_copy (mask, &context->mask_rect, GEGL_ABYSS_NONE,
context->mask, NULL);
gimp_gegl_buffer_copy (mask, &context->mask_rect, GEGL_ABYSS_NONE,
context->mask, NULL);
}
histogram->priv->calculate_async = gimp_parallel_run_async (

View File

@ -29,6 +29,7 @@
#include "core-types.h"
#include "gegl/gimp-babl.h"
#include "gegl/gimp-gegl-loops.h"
#include "gimpchannel.h"
#include "gimpdrawable.h"
@ -189,9 +190,9 @@ gimp_image_convert_precision (GimpImage *image,
gimp_image_get_height (image)),
gimp_image_get_mask_format (image));
gegl_buffer_copy (gimp_drawable_get_buffer (drawable), NULL,
GEGL_ABYSS_NONE,
buffer, NULL);
gimp_gegl_buffer_copy (gimp_drawable_get_buffer (drawable), NULL,
GEGL_ABYSS_NONE,
buffer, NULL);
gimp_drawable_set_buffer (drawable, FALSE, NULL, buffer);
g_object_unref (buffer);

View File

@ -20,9 +20,13 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gegl.h>
#include "libgimpbase/gimpbase.h"
#include "core-types.h"
#include "libgimpbase/gimpbase.h"
#include "gegl/gimp-gegl-loops.h"
#include "vectors/gimpvectors.h"
#include "gimp.h"
#include "gimpchannel.h"
@ -44,8 +48,6 @@
#include "gimpparasitelist.h"
#include "gimpsamplepoint.h"
#include "vectors/gimpvectors.h"
static void gimp_image_duplicate_resolution (GimpImage *image,
GimpImage *new_image);
@ -399,8 +401,8 @@ gimp_image_duplicate_mask (GimpImage *image,
mask = GIMP_DRAWABLE (gimp_image_get_mask (image));
new_mask = GIMP_DRAWABLE (gimp_image_get_mask (new_image));
gegl_buffer_copy (gimp_drawable_get_buffer (mask), NULL, GEGL_ABYSS_NONE,
gimp_drawable_get_buffer (new_mask), NULL);
gimp_gegl_buffer_copy (gimp_drawable_get_buffer (mask), NULL, GEGL_ABYSS_NONE,
gimp_drawable_get_buffer (new_mask), NULL);
GIMP_CHANNEL (new_mask)->bounds_known = FALSE;
GIMP_CHANNEL (new_mask)->boundary_known = FALSE;

View File

@ -226,7 +226,8 @@ gimp_layer_new_convert_buffer (GimpLayer *layer,
if (! gimp_image_get_is_color_managed (image))
{
gegl_buffer_copy (src_buffer, NULL, GEGL_ABYSS_NONE, dest_buffer, NULL);
gimp_gegl_buffer_copy (src_buffer, NULL, GEGL_ABYSS_NONE,
dest_buffer, NULL);
return;
}

View File

@ -1720,7 +1720,8 @@ gimp_layer_real_convert_type (GimpLayer *layer,
}
else
{
gegl_buffer_copy (src_buffer, NULL, GEGL_ABYSS_NONE, dest_buffer, NULL);
gimp_gegl_buffer_copy (src_buffer, NULL, GEGL_ABYSS_NONE,
dest_buffer, NULL);
}
gimp_drawable_set_buffer (drawable, push_undo, NULL, dest_buffer);
@ -1947,9 +1948,9 @@ gimp_layer_create_mask (GimpLayer *layer,
gimp_image_get_component_format (image, GIMP_CHANNEL_ALPHA);
gegl_buffer_set_format (dest_buffer, component_format);
gegl_buffer_copy (gimp_drawable_get_buffer (drawable), NULL,
GEGL_ABYSS_NONE,
dest_buffer, NULL);
gimp_gegl_buffer_copy (gimp_drawable_get_buffer (drawable), NULL,
GEGL_ABYSS_NONE,
dest_buffer, NULL);
gegl_buffer_set_format (dest_buffer, NULL);
if (add_mask_type == GIMP_ADD_MASK_ALPHA_TRANSFER)
@ -2006,14 +2007,14 @@ gimp_layer_create_mask (GimpLayer *layer,
src = gimp_drawable_get_buffer (GIMP_DRAWABLE (channel));
dest = gimp_drawable_get_buffer (GIMP_DRAWABLE (mask));
gegl_buffer_copy (src,
GEGL_RECTANGLE (copy_x, copy_y,
copy_width, copy_height),
GEGL_ABYSS_NONE,
dest,
GEGL_RECTANGLE (copy_x - offset_x,
copy_y - offset_y,
0, 0));
gimp_gegl_buffer_copy (src,
GEGL_RECTANGLE (copy_x, copy_y,
copy_width, copy_height),
GEGL_ABYSS_NONE,
dest,
GEGL_RECTANGLE (copy_x - offset_x,
copy_y - offset_y,
0, 0));
GIMP_CHANNEL (mask)->bounds_known = FALSE;
}
@ -2038,9 +2039,9 @@ gimp_layer_create_mask (GimpLayer *layer,
gimp_item_get_height (item)),
copy_format);
gegl_buffer_copy (gimp_drawable_get_buffer (drawable), NULL,
GEGL_ABYSS_NONE,
src_buffer, NULL);
gimp_gegl_buffer_copy (gimp_drawable_get_buffer (drawable), NULL,
GEGL_ABYSS_NONE,
src_buffer, NULL);
}
else
{
@ -2062,8 +2063,8 @@ gimp_layer_create_mask (GimpLayer *layer,
}
else
{
gegl_buffer_copy (src_buffer, NULL, GEGL_ABYSS_NONE,
dest_buffer, NULL);
gimp_gegl_buffer_copy (src_buffer, NULL, GEGL_ABYSS_NONE,
dest_buffer, NULL);
}
g_object_unref (src_buffer);
@ -2359,8 +2360,9 @@ gimp_layer_add_alpha (GimpLayer *layer)
gimp_item_get_height (item)),
gimp_drawable_get_format_with_alpha (drawable));
gegl_buffer_copy (gimp_drawable_get_buffer (drawable), NULL, GEGL_ABYSS_NONE,
new_buffer, NULL);
gimp_gegl_buffer_copy (
gimp_drawable_get_buffer (drawable), NULL, GEGL_ABYSS_NONE,
new_buffer, NULL);
gimp_drawable_set_buffer (GIMP_DRAWABLE (layer),
gimp_item_is_attached (GIMP_ITEM (layer)),

View File

@ -28,6 +28,7 @@
#include "core-types.h"
#include "gegl/gimp-babl.h"
#include "gegl/gimp-gegl-loops.h"
#include "gimperror.h"
#include "gimpimage.h"
@ -231,7 +232,7 @@ gimp_layer_mask_new_from_buffer (GeglBuffer *buffer,
name, color);
dest = gimp_drawable_get_buffer (GIMP_DRAWABLE (layer_mask));
gegl_buffer_copy (buffer, NULL, GEGL_ABYSS_NONE, dest, NULL);
gimp_gegl_buffer_copy (buffer, NULL, GEGL_ABYSS_NONE, dest, NULL);
return layer_mask;
}

View File

@ -22,6 +22,7 @@
#include "core-types.h"
#include "gegl/gimp-gegl-loops.h"
#include "gegl/gimp-gegl-utils.h"
#include "gimp-memsize.h"
@ -110,11 +111,11 @@ gimp_mask_undo_constructed (GObject *object)
mask_undo->buffer = gegl_buffer_new (GEGL_RECTANGLE (0, 0, w, h),
gimp_drawable_get_format (drawable));
gegl_buffer_copy (gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (x, y, w, h),
GEGL_ABYSS_NONE,
mask_undo->buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
gimp_gegl_buffer_copy (gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (x, y, w, h),
GEGL_ABYSS_NONE,
mask_undo->buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
mask_undo->x = x;
mask_undo->y = y;
@ -198,11 +199,11 @@ gimp_mask_undo_pop (GimpUndo *undo,
new_buffer = gegl_buffer_new (GEGL_RECTANGLE (0, 0, w, h),
gimp_drawable_get_format (drawable));
gegl_buffer_copy (gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (x, y, w, h),
GEGL_ABYSS_NONE,
new_buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
gimp_gegl_buffer_copy (gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (x, y, w, h),
GEGL_ABYSS_NONE,
new_buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
gegl_buffer_clear (gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (x, y, w, h));
@ -233,11 +234,11 @@ gimp_mask_undo_pop (GimpUndo *undo,
width = gegl_buffer_get_width (mask_undo->buffer);
height = gegl_buffer_get_height (mask_undo->buffer);
gegl_buffer_copy (mask_undo->buffer,
NULL,
GEGL_ABYSS_NONE,
gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (mask_undo->x, mask_undo->y, 0, 0));
gimp_gegl_buffer_copy (mask_undo->buffer,
NULL,
GEGL_ABYSS_NONE,
gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (mask_undo->x, mask_undo->y, 0, 0));
g_object_unref (mask_undo->buffer);
}

View File

@ -26,6 +26,8 @@
#include "core-types.h"
#include "gegl/gimp-gegl-loops.h"
#include "gimppattern.h"
#include "gimppattern-load.h"
#include "gimptagged.h"
@ -155,9 +157,10 @@ gimp_pattern_get_new_preview (GimpViewable *viewable,
src_buffer = gimp_temp_buf_create_buffer (pattern->mask);
dest_buffer = gimp_temp_buf_create_buffer (temp_buf);
gegl_buffer_copy (src_buffer, GEGL_RECTANGLE (0, 0, copy_width, copy_height),
GEGL_ABYSS_NONE,
dest_buffer, GEGL_RECTANGLE (0, 0, 0, 0));
gimp_gegl_buffer_copy (src_buffer,
GEGL_RECTANGLE (0, 0, copy_width, copy_height),
GEGL_ABYSS_NONE,
dest_buffer, GEGL_RECTANGLE (0, 0, 0, 0));
g_object_unref (src_buffer);
g_object_unref (dest_buffer);

View File

@ -27,6 +27,7 @@
#include "gegl/gimp-babl.h"
#include "gegl/gimp-gegl-apply-operation.h"
#include "gegl/gimp-gegl-loops.h"
#include "gimp.h"
#include "gimpcontext.h"
@ -731,9 +732,9 @@ gimp_selection_extract (GimpSelection *selection,
dest_format);
/* First, copy the pixels, possibly doing INDEXED->RGB and adding alpha */
gegl_buffer_copy (src_buffer, GEGL_RECTANGLE (x1, y1, x2 - x1, y2 - y1),
GEGL_ABYSS_NONE,
dest_buffer, GEGL_RECTANGLE (0, 0, 0, 0));
gimp_gegl_buffer_copy (src_buffer, GEGL_RECTANGLE (x1, y1, x2 - x1, y2 - y1),
GEGL_ABYSS_NONE,
dest_buffer, GEGL_RECTANGLE (0, 0, 0, 0));
if (non_empty)
{

View File

@ -33,8 +33,9 @@
#include "core/gimpprogress.h"
#include "gimp-gegl-apply-operation.h"
#include "gimp-gegl-loops.h"
#include "gimp-gegl-nodes.h"
#include "gegl/gimp-gegl-utils.h"
#include "gimp-gegl-utils.h"
void
@ -211,8 +212,8 @@ gimp_gegl_apply_cached_operation (GeglBuffer *src_buffer,
for (i = 0; i < n_valid_rects; i++)
{
gegl_buffer_copy (cache, valid_rects + i, GEGL_ABYSS_NONE,
dest_buffer, valid_rects + i);
gimp_gegl_buffer_copy (cache, valid_rects + i, GEGL_ABYSS_NONE,
dest_buffer, valid_rects + i);
cairo_region_subtract_rectangle (region,
(cairo_rectangle_int_t *)

View File

@ -944,8 +944,8 @@ gimp_gegl_convert_color_profile (GeglBuffer *src_buffer,
}
else
{
gegl_buffer_copy (src_buffer, src_rect, GEGL_ABYSS_NONE,
dest_buffer, dest_rect);
gimp_gegl_buffer_copy (src_buffer, src_rect, GEGL_ABYSS_NONE,
dest_buffer, dest_rect);
if (progress)
gimp_progress_set_value (progress, 1.0);

View File

@ -27,6 +27,8 @@
#include "paint-types.h"
#include "gegl/gimp-gegl-loops.h"
#include "core/gimp.h"
#include "core/gimpdrawable.h"
#include "core/gimpdynamics.h"
@ -166,16 +168,16 @@ gimp_clone_motion (GimpSourceCore *source_core,
if (gimp_source_core_use_source (source_core, source_options))
{
gegl_buffer_copy (src_buffer,
GEGL_RECTANGLE (src_rect->x,
src_rect->y,
paint_area_width,
paint_area_height),
GEGL_ABYSS_NONE,
paint_buffer,
GEGL_RECTANGLE (paint_area_offset_x,
paint_area_offset_y,
0, 0));
gimp_gegl_buffer_copy (src_buffer,
GEGL_RECTANGLE (src_rect->x,
src_rect->y,
paint_area_width,
paint_area_height),
GEGL_ABYSS_NONE,
paint_buffer,
GEGL_RECTANGLE (paint_area_offset_x,
paint_area_offset_y,
0, 0));
if (op)
{
GeglNode *graph, *source, *target;

View File

@ -199,14 +199,15 @@ gimp_convolve_motion (GimpPaintCore *paint_core,
convolve_buffer = gimp_temp_buf_create_buffer (temp_buf);
gimp_temp_buf_unref (temp_buf);
gegl_buffer_copy (gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (paint_buffer_x,
paint_buffer_y,
gegl_buffer_get_width (paint_buffer),
gegl_buffer_get_height (paint_buffer)),
GEGL_ABYSS_NONE,
convolve_buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
gimp_gegl_buffer_copy (
gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (paint_buffer_x,
paint_buffer_y,
gegl_buffer_get_width (paint_buffer),
gegl_buffer_get_height (paint_buffer)),
GEGL_ABYSS_NONE,
convolve_buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
gimp_gegl_convolve (convolve_buffer,
GEGL_RECTANGLE (0, 0,

View File

@ -32,6 +32,8 @@
#include "paint-types.h"
#include "gegl/gimp-gegl-loops.h"
#include "core/gimpbrush.h"
#include "core/gimpdrawable.h"
#include "core/gimpdynamics.h"
@ -558,22 +560,22 @@ gimp_heal_motion (GimpSourceCore *source_core,
src_rect->height),
babl_format ("R'G'B'A float"));
gegl_buffer_copy (src_buffer, src_rect, GEGL_ABYSS_NONE,
src_copy,
GEGL_RECTANGLE (0, 0,
src_rect->width,
src_rect->height));
gimp_gegl_buffer_copy (src_buffer, src_rect, GEGL_ABYSS_NONE,
src_copy,
GEGL_RECTANGLE (0, 0,
src_rect->width,
src_rect->height));
gegl_buffer_copy (gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (paint_buffer_x, paint_buffer_y,
gegl_buffer_get_width (paint_buffer),
gegl_buffer_get_height (paint_buffer)),
GEGL_ABYSS_NONE,
paint_buffer,
GEGL_RECTANGLE (paint_area_offset_x,
paint_area_offset_y,
paint_area_width,
paint_area_height));
gimp_gegl_buffer_copy (gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (paint_buffer_x, paint_buffer_y,
gegl_buffer_get_width (paint_buffer),
gegl_buffer_get_height (paint_buffer)),
GEGL_ABYSS_NONE,
paint_buffer,
GEGL_RECTANGLE (paint_area_offset_x,
paint_area_offset_y,
paint_area_width,
paint_area_height));
mask_buffer = gimp_temp_buf_create_buffer ((GimpTempBuf *) mask_buf);

View File

@ -541,11 +541,11 @@ gimp_paint_core_finish (GimpPaintCore *core,
buffer = gegl_buffer_new (GEGL_RECTANGLE (0, 0, width, height),
gimp_drawable_get_format (drawable));
gegl_buffer_copy (core->undo_buffer,
GEGL_RECTANGLE (x, y, width, height),
GEGL_ABYSS_NONE,
buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
gimp_gegl_buffer_copy (core->undo_buffer,
GEGL_RECTANGLE (x, y, width, height),
GEGL_ABYSS_NONE,
buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
gimp_drawable_push_undo (drawable, NULL,
buffer, x, y, width, height);
@ -586,11 +586,11 @@ gimp_paint_core_cancel (GimpPaintCore *core,
gimp_item_get_height (GIMP_ITEM (drawable)),
&x, &y, &width, &height))
{
gegl_buffer_copy (core->undo_buffer,
GEGL_RECTANGLE (x, y, width, height),
GEGL_ABYSS_NONE,
gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (x, y, width, height));
gimp_gegl_buffer_copy (core->undo_buffer,
GEGL_RECTANGLE (x, y, width, height),
GEGL_ABYSS_NONE,
gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (x, y, width, height));
}
g_clear_object (&core->undo_buffer);

View File

@ -278,16 +278,17 @@ gimp_smudge_start (GimpPaintCore *paint_core,
}
/* copy the region under the original painthit. */
gegl_buffer_copy (gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (paint_buffer_x,
paint_buffer_y,
gegl_buffer_get_width (paint_buffer),
gegl_buffer_get_height (paint_buffer)),
GEGL_ABYSS_NONE,
accum_buffer,
GEGL_RECTANGLE (paint_buffer_x - x,
paint_buffer_y - y,
0, 0));
gimp_gegl_buffer_copy (
gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (paint_buffer_x,
paint_buffer_y,
gegl_buffer_get_width (paint_buffer),
gegl_buffer_get_height (paint_buffer)),
GEGL_ABYSS_NONE,
accum_buffer,
GEGL_RECTANGLE (paint_buffer_x - x,
paint_buffer_y - y,
0, 0));
}
smudge->accum_buffers = g_list_reverse (smudge->accum_buffers);

View File

@ -34,6 +34,7 @@
#include "text-types.h"
#include "gegl/gimp-babl.h"
#include "gegl/gimp-gegl-loops.h"
#include "gegl/gimp-gegl-utils.h"
#include "core/gimp.h"
@ -772,8 +773,8 @@ gimp_text_layer_render_layout (GimpTextLayer *layer,
}
else
{
gegl_buffer_copy (buffer, NULL, GEGL_ABYSS_NONE,
gimp_drawable_get_buffer (drawable), NULL);
gimp_gegl_buffer_copy (buffer, NULL, GEGL_ABYSS_NONE,
gimp_drawable_get_buffer (drawable), NULL);
}
g_object_unref (buffer);

View File

@ -33,6 +33,7 @@
#include "tools-types.h"
#include "gegl/gimp-gegl-loops.h"
#include "gegl/gimp-gegl-mask.h"
#include "core/gimp.h"
@ -1285,9 +1286,10 @@ gimp_foreground_select_undo_new (GeglBuffer *trimap,
undo->saved_trimap = gegl_buffer_new (GEGL_RECTANGLE (0, 0, width, height),
gegl_buffer_get_format (trimap));
gegl_buffer_copy (trimap, GEGL_RECTANGLE (x1, y1, width, height),
GEGL_ABYSS_NONE,
undo->saved_trimap, GEGL_RECTANGLE (0, 0, width, height));
gimp_gegl_buffer_copy (
trimap, GEGL_RECTANGLE (x1, y1, width, height),
GEGL_ABYSS_NONE,
undo->saved_trimap, GEGL_RECTANGLE (0, 0, width, height));
undo->trimap_x = x1;
undo->trimap_y = y1;
@ -1310,19 +1312,19 @@ gimp_foreground_select_undo_pop (StrokeUndo *undo,
width = gegl_buffer_get_width (buffer);
height = gegl_buffer_get_height (buffer);
gegl_buffer_copy (trimap,
GEGL_RECTANGLE (undo->trimap_x, undo->trimap_y,
width, height),
GEGL_ABYSS_NONE,
undo->saved_trimap,
GEGL_RECTANGLE (0, 0, width, height));
gimp_gegl_buffer_copy (trimap,
GEGL_RECTANGLE (undo->trimap_x, undo->trimap_y,
width, height),
GEGL_ABYSS_NONE,
undo->saved_trimap,
GEGL_RECTANGLE (0, 0, width, height));
gegl_buffer_copy (buffer,
GEGL_RECTANGLE (0, 0, width, height),
GEGL_ABYSS_NONE,
trimap,
GEGL_RECTANGLE (undo->trimap_x, undo->trimap_y,
width, height));
gimp_gegl_buffer_copy (buffer,
GEGL_RECTANGLE (0, 0, width, height),
GEGL_ABYSS_NONE,
trimap,
GEGL_RECTANGLE (undo->trimap_x, undo->trimap_y,
width, height));
g_object_unref (buffer);
}

View File

@ -1211,13 +1211,13 @@ gimp_view_render_temp_buf_to_surface (GimpViewRenderer *renderer,
}
else
{
gegl_buffer_copy (src_buffer,
GEGL_RECTANGLE (x - temp_buf_x,
y - temp_buf_y,
width, height),
GEGL_ABYSS_NONE,
dest_buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
gimp_gegl_buffer_copy (src_buffer,
GEGL_RECTANGLE (x - temp_buf_x,
y - temp_buf_y,
width, height),
GEGL_ABYSS_NONE,
dest_buffer,
GEGL_RECTANGLE (0, 0, 0, 0));
}
g_object_unref (src_buffer);
@ -1260,13 +1260,13 @@ gimp_view_render_temp_buf_to_surface (GimpViewRenderer *renderer,
}
else
{
gegl_buffer_copy (src_buffer,
GEGL_RECTANGLE (x - temp_buf_x,
y - temp_buf_y,
width, height),
GEGL_ABYSS_NONE,
dest_buffer,
GEGL_RECTANGLE (x, y, 0, 0));
gimp_gegl_buffer_copy (src_buffer,
GEGL_RECTANGLE (x - temp_buf_x,
y - temp_buf_y,
width, height),
GEGL_ABYSS_NONE,
dest_buffer,
GEGL_RECTANGLE (x, y, 0, 0));
}
g_object_unref (src_buffer);