[gimp/metadata-browser] app: use plain gegl_buffer_new() and _dup(), not the gimp_gegl_ variants
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] app: use plain gegl_buffer_new() and _dup(), not the gimp_gegl_ variants
- Date: Thu, 13 Sep 2012 00:19:29 +0000 (UTC)
commit 2fca34622ee459be0522a762e3767eb093fbf844
Author: Michael Natterer <mitch gimp org>
Date: Sun May 20 22:00:27 2012 +0200
app: use plain gegl_buffer_new() and _dup(), not the gimp_gegl_ variants
unless the buffers end up being drawable->buffer.
app/core/gimp-edit.c | 4 ++--
app/core/gimpdrawable-blend.c | 10 +++++-----
app/core/gimpdrawable-bucket-fill.c | 4 ++--
app/core/gimpdrawable-combine.c | 4 ++--
app/core/gimpdrawable-shadow.c | 8 +++-----
app/core/gimpdrawable-stroke.c | 4 ++--
app/core/gimpdrawable.c | 6 +++---
app/core/gimpimagemap.c | 6 +++---
app/core/gimplayer.c | 8 ++++----
app/paint/gimppaintcore.c | 16 ++++++++--------
10 files changed, 34 insertions(+), 36 deletions(-)
---
diff --git a/app/core/gimp-edit.c b/app/core/gimp-edit.c
index b6b027b..8bca73d 100644
--- a/app/core/gimp-edit.c
+++ b/app/core/gimp-edit.c
@@ -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)
{
diff --git a/app/core/gimpdrawable-blend.c b/app/core/gimpdrawable-blend.c
index 6c16b67..bbb21e6 100644
--- a/app/core/gimpdrawable-blend.c
+++ b/app/core/gimpdrawable-blend.c
@@ -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);
diff --git a/app/core/gimpdrawable-bucket-fill.c b/app/core/gimpdrawable-bucket-fill.c
index 0fcb61e..0c4090d 100644
--- a/app/core/gimpdrawable-bucket-fill.c
+++ b/app/core/gimpdrawable-bucket-fill.c
@@ -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)
{
diff --git a/app/core/gimpdrawable-combine.c b/app/core/gimpdrawable-combine.c
index c8d9d9f..a6d21f1 100644
--- a/app/core/gimpdrawable-combine.c
+++ b/app/core/gimpdrawable-combine.c
@@ -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),
diff --git a/app/core/gimpdrawable-shadow.c b/app/core/gimpdrawable-shadow.c
index 54c6f67..1528cb7 100644
--- a/app/core/gimpdrawable-shadow.c
+++ b/app/core/gimpdrawable-shadow.c
@@ -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;
}
diff --git a/app/core/gimpdrawable-stroke.c b/app/core/gimpdrawable-stroke.c
index 8151050..dae6ac6 100644
--- a/app/core/gimpdrawable-stroke.c
+++ b/app/core/gimpdrawable-stroke.c
@@ -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))
{
diff --git a/app/core/gimpdrawable.c b/app/core/gimpdrawable.c
index bfac48d..3c9b287 100644
--- a/app/core/gimpdrawable.c
+++ b/app/core/gimpdrawable.c
@@ -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),
diff --git a/app/core/gimpimagemap.c b/app/core/gimpimagemap.c
index 6d04948..e7b6c6f 100644
--- a/app/core/gimpimagemap.c
+++ b/app/core/gimpimagemap.c
@@ -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 */
diff --git a/app/core/gimplayer.c b/app/core/gimplayer.c
index cc0c444..61b74f3 100644
--- a/app/core/gimplayer.c
+++ b/app/core/gimplayer.c
@@ -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);
diff --git a/app/paint/gimppaintcore.c b/app/paint/gimppaintcore.c
index 1ac0662..05fcbaa 100644
--- a/app/paint/gimppaintcore.c
+++ b/app/paint/gimppaintcore.c
@@ -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),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]