Commit 4dcd1f3a authored by Michael Natterer's avatar Michael Natterer 😴

app: use plain gegl_buffer_new() and _dup(), not the gimp_gegl_ variants

unless the buffers end up being drawable->buffer.
parent 10715024
......@@ -485,8 +485,8 @@ gimp_edit_fill_full (GimpImage *image,
format = gimp_drawable_get_format (drawable);
}
dest_buffer = gimp_gegl_buffer_new (GEGL_RECTANGLE (0, 0, width, height),
format);
dest_buffer = gegl_buffer_new (GEGL_RECTANGLE (0, 0, width, height),
format);
if (pattern)
{
......
......@@ -192,8 +192,8 @@ gimp_drawable_blend (GimpDrawable *drawable,
gimp_set_busy (image->gimp);
/* Always create an alpha temp buf (for generality) */
buffer = gimp_gegl_buffer_new (GEGL_RECTANGLE (0, 0, width, height),
gimp_drawable_get_format_with_alpha (drawable));
buffer = gegl_buffer_new (GEGL_RECTANGLE (0, 0, width, height),
gimp_drawable_get_format_with_alpha (drawable));
gradient_fill_region (image, drawable, context,
buffer, GEGL_RECTANGLE (0, 0, width, height),
......@@ -543,9 +543,9 @@ gradient_precalc_shapeburst (GimpImage *image,
babl_format ("Y float"));
/* allocate the selection mask copy */
temp_buffer = gimp_gegl_buffer_new (GEGL_RECTANGLE (0, 0,
region->width, region->height),
gimp_image_get_mask_format (image));
temp_buffer = gegl_buffer_new (GEGL_RECTANGLE (0, 0,
region->width, region->height),
gimp_image_get_mask_format (image));
mask = gimp_image_get_mask (image);
......
......@@ -221,8 +221,8 @@ gimp_drawable_bucket_fill_internal (GimpDrawable *drawable,
mask_offset_y = y1;
}
buffer = gimp_gegl_buffer_new (GEGL_RECTANGLE (0, 0, x2 - x1, y2 - y1),
gimp_drawable_get_format_with_alpha (drawable));
buffer = gegl_buffer_new (GEGL_RECTANGLE (0, 0, x2 - x1, y2 - y1),
gimp_drawable_get_format_with_alpha (drawable));
switch (fill_mode)
{
......
......@@ -107,8 +107,8 @@ gimp_drawable_real_apply_buffer (GimpDrawable *drawable,
undo->opacity = opacity;
undo->applied_buffer =
gimp_gegl_buffer_new (GEGL_RECTANGLE (0, 0, width, height),
gegl_buffer_get_format (buffer));
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),
......
......@@ -54,15 +54,13 @@ gimp_drawable_get_shadow_buffer (GimpDrawable *drawable)
}
else
{
gegl_buffer_flush (drawable->private->shadow);
gimp_gegl_buffer_refetch_tiles (drawable->private->shadow);
return drawable->private->shadow;
}
}
drawable->private->shadow =
gimp_gegl_buffer_new (GEGL_RECTANGLE (0, 0, width, height), format);
drawable->private->shadow = gegl_buffer_new (GEGL_RECTANGLE (0, 0,
width, height),
format);
return drawable->private->shadow;
}
......
......@@ -349,8 +349,8 @@ gimp_drawable_stroke_scan_convert (GimpDrawable *drawable,
x + off_x, y + off_y,
gimp_fill_options_get_antialias (options));
base_buffer = gimp_gegl_buffer_new (GEGL_RECTANGLE (0, 0, w, h),
gimp_drawable_get_format_with_alpha (drawable));
base_buffer = gegl_buffer_new (GEGL_RECTANGLE (0, 0, w, h),
gimp_drawable_get_format_with_alpha (drawable));
switch (gimp_fill_options_get_style (options))
{
......
......@@ -816,8 +816,8 @@ gimp_drawable_real_push_undo (GimpDrawable *drawable,
{
if (! buffer)
{
buffer = gimp_gegl_buffer_new (GEGL_RECTANGLE (0, 0, width, height),
gimp_drawable_get_format (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),
......@@ -846,7 +846,7 @@ gimp_drawable_real_swap_pixels (GimpDrawable *drawable,
gint width = gegl_buffer_get_width (buffer);
gint height = gegl_buffer_get_height (buffer);
tmp = gimp_gegl_buffer_dup (buffer);
tmp = gegl_buffer_dup (buffer);
gegl_buffer_copy (gimp_drawable_get_buffer (drawable),
GEGL_RECTANGLE (x, y, width, height),
......
......@@ -587,9 +587,9 @@ gimp_image_map_update_undo_buffer (GimpImageMap *image_map,
g_object_unref (image_map->undo_buffer);
image_map->undo_buffer =
gimp_gegl_buffer_new (GEGL_RECTANGLE (0, 0,
rect->width, rect->height),
gimp_drawable_get_format (image_map->drawable));
gegl_buffer_new (GEGL_RECTANGLE (0, 0,
rect->width, rect->height),
gimp_drawable_get_format (image_map->drawable));
}
/* Copy from the image to the new tiles */
......
......@@ -1461,10 +1461,10 @@ gimp_layer_create_mask (const GimpLayer *layer,
gimp_drawable_has_alpha (drawable));
src_buffer =
gimp_gegl_buffer_new (GEGL_RECTANGLE (0, 0,
gimp_item_get_width (item),
gimp_item_get_height (item)),
copy_format);
gegl_buffer_new (GEGL_RECTANGLE (0, 0,
gimp_item_get_width (item),
gimp_item_get_height (item)),
copy_format);
gegl_buffer_copy (gimp_drawable_get_buffer (drawable), NULL,
src_buffer, NULL);
......
......@@ -360,7 +360,7 @@ gimp_paint_core_start (GimpPaintCore *core,
if (core->undo_buffer)
g_object_unref (core->undo_buffer);
core->undo_buffer = gimp_gegl_buffer_dup (gimp_drawable_get_buffer (drawable));
core->undo_buffer = gegl_buffer_dup (gimp_drawable_get_buffer (drawable));
/* Allocate the saved proj structure */
if (core->saved_proj_buffer)
......@@ -375,7 +375,7 @@ gimp_paint_core_start (GimpPaintCore *core,
GimpPickable *pickable = GIMP_PICKABLE (gimp_image_get_projection (image));
GeglBuffer *buffer = gimp_pickable_get_buffer (pickable);
core->saved_proj_buffer = gimp_gegl_buffer_dup (buffer);
core->saved_proj_buffer = gegl_buffer_dup (buffer);
}
/* Allocate the canvas blocks structure */
......@@ -383,10 +383,10 @@ gimp_paint_core_start (GimpPaintCore *core,
g_object_unref (core->canvas_buffer);
core->canvas_buffer =
gimp_gegl_buffer_new (GEGL_RECTANGLE (0, 0,
gimp_item_get_width (item),
gimp_item_get_height (item)),
babl_format ("Y u8"));
gegl_buffer_new (GEGL_RECTANGLE (0, 0,
gimp_item_get_width (item),
gimp_item_get_height (item)),
babl_format ("Y u8"));
/* Get the initial undo extents */
......@@ -447,8 +447,8 @@ gimp_paint_core_finish (GimpPaintCore *core,
GIMP_PAINT_CORE_GET_CLASS (core)->push_undo (core, image, NULL);
buffer = gimp_gegl_buffer_new (GEGL_RECTANGLE (0, 0, width, height),
gimp_drawable_get_format (drawable));
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),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment