[gimp] app: turn gimp_drawable_apply_buffer()'s src1_tiles argument into base_buffer
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: turn gimp_drawable_apply_buffer()'s src1_tiles argument into base_buffer
- Date: Wed, 2 May 2012 16:15:33 +0000 (UTC)
commit 4bcddb04a212be4630b457fb2a0b5ae70e20675b
Author: Michael Natterer <mitch gimp org>
Date: Fri Mar 23 00:12:13 2012 +0100
app: turn gimp_drawable_apply_buffer()'s src1_tiles argument into base_buffer
app/core/gimpchannel.c | 7 ++++---
app/core/gimpdrawable-combine.c | 8 +++++++-
app/core/gimpdrawable-combine.h | 2 +-
app/core/gimpdrawable.c | 6 ++++--
app/core/gimpdrawable.h | 4 ++--
app/paint/gimppaintcore.c | 9 +++++----
6 files changed, 23 insertions(+), 13 deletions(-)
---
diff --git a/app/core/gimpchannel.c b/app/core/gimpchannel.c
index a7ef7a0..3a7641e 100644
--- a/app/core/gimpchannel.c
+++ b/app/core/gimpchannel.c
@@ -145,7 +145,7 @@ static void gimp_channel_apply_buffer (GimpDrawable *drawable,
const gchar *undo_desc,
gdouble opacity,
GimpLayerModeEffects mode,
- TileManager *src1_tiles,
+ GeglBuffer *base_buffer,
PixelRegion *destPR,
gint x,
gint y);
@@ -812,7 +812,7 @@ gimp_channel_apply_buffer (GimpDrawable *drawable,
const gchar *undo_desc,
gdouble opacity,
GimpLayerModeEffects mode,
- TileManager *src1_tiles,
+ GeglBuffer *base_buffer,
PixelRegion *destPR,
gint x,
gint y)
@@ -823,7 +823,8 @@ gimp_channel_apply_buffer (GimpDrawable *drawable,
buffer_region,
push_undo, undo_desc,
opacity, mode,
- src1_tiles, destPR,
+ base_buffer,
+ destPR,
x, y);
GIMP_CHANNEL (drawable)->bounds_known = FALSE;
diff --git a/app/core/gimpdrawable-combine.c b/app/core/gimpdrawable-combine.c
index af53343..a573289 100644
--- a/app/core/gimpdrawable-combine.c
+++ b/app/core/gimpdrawable-combine.c
@@ -43,7 +43,7 @@ gimp_drawable_real_apply_buffer (GimpDrawable *drawable,
const gchar *undo_desc,
gdouble opacity,
GimpLayerModeEffects mode,
- TileManager *src1_tiles,
+ GeglBuffer *base_buffer,
PixelRegion *destPR,
gint x,
gint y)
@@ -53,6 +53,7 @@ gimp_drawable_real_apply_buffer (GimpDrawable *drawable,
GimpChannel *mask = gimp_image_get_mask (image);
TempBuf *temp_buf;
PixelRegion src2PR;
+ TileManager *src1_tiles;
gint x1, y1, x2, y2;
gint offset_x, offset_y;
PixelRegion src1PR, my_destPR;
@@ -75,6 +76,11 @@ gimp_drawable_real_apply_buffer (GimpDrawable *drawable,
FALSE);
}
+ if (base_buffer)
+ src1_tiles = gimp_gegl_buffer_get_tiles (base_buffer);
+ else
+ src1_tiles = NULL;
+
/* don't apply the mask to itself and don't apply an empty mask */
if (GIMP_DRAWABLE (mask) == drawable || gimp_channel_is_empty (mask))
mask = NULL;
diff --git a/app/core/gimpdrawable-combine.h b/app/core/gimpdrawable-combine.h
index 5ff02bd..27a40e8 100644
--- a/app/core/gimpdrawable-combine.h
+++ b/app/core/gimpdrawable-combine.h
@@ -28,7 +28,7 @@ void gimp_drawable_real_apply_buffer (GimpDrawable *drawable,
const gchar *undo_desc,
gdouble opacity,
GimpLayerModeEffects mode,
- TileManager *src1_tiles,
+ GeglBuffer *base_buffer,
PixelRegion *destPR,
gint x,
gint y);
diff --git a/app/core/gimpdrawable.c b/app/core/gimpdrawable.c
index 2ff55ce..3cd2fe9 100644
--- a/app/core/gimpdrawable.c
+++ b/app/core/gimpdrawable.c
@@ -1242,7 +1242,7 @@ gimp_drawable_apply_buffer (GimpDrawable *drawable,
const gchar *undo_desc,
gdouble opacity,
GimpLayerModeEffects mode,
- TileManager *src1_tiles,
+ GeglBuffer *base_buffer,
PixelRegion *destPR,
gint x,
gint y)
@@ -1251,12 +1251,14 @@ gimp_drawable_apply_buffer (GimpDrawable *drawable,
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
g_return_if_fail (GEGL_IS_BUFFER (buffer));
g_return_if_fail (buffer_region != NULL);
+ g_return_if_fail (base_buffer == NULL || GEGL_IS_BUFFER (base_buffer));
GIMP_DRAWABLE_GET_CLASS (drawable)->apply_buffer (drawable, buffer,
buffer_region,
push_undo, undo_desc,
opacity, mode,
- src1_tiles, destPR,
+ base_buffer,
+ destPR,
x, y);
}
diff --git a/app/core/gimpdrawable.h b/app/core/gimpdrawable.h
index 9a8482c..4745459 100644
--- a/app/core/gimpdrawable.h
+++ b/app/core/gimpdrawable.h
@@ -70,7 +70,7 @@ struct _GimpDrawableClass
const gchar *undo_desc,
gdouble opacity,
GimpLayerModeEffects mode,
- TileManager *src1_tiles,
+ GeglBuffer *base_buffer,
PixelRegion *destPR,
gint x,
gint y);
@@ -148,7 +148,7 @@ void gimp_drawable_apply_buffer (GimpDrawable *drawable,
const gchar *undo_desc,
gdouble opacity,
GimpLayerModeEffects mode,
- TileManager *src1_tiles,
+ GeglBuffer *base_buffer,
PixelRegion *destPR,
gint x,
gint y);
diff --git a/app/paint/gimppaintcore.c b/app/paint/gimppaintcore.c
index e5ef499..e35c583 100644
--- a/app/paint/gimppaintcore.c
+++ b/app/paint/gimppaintcore.c
@@ -857,8 +857,8 @@ gimp_paint_core_paste (GimpPaintCore *core,
GimpLayerModeEffects paint_mode,
GimpPaintApplicationMode mode)
{
- TileManager *alt = NULL;
- GeglBuffer *canvas_buffer;
+ GeglBuffer *base_buffer = NULL;
+ GeglBuffer *canvas_buffer;
if (core->use_saved_proj)
{
@@ -907,7 +907,8 @@ gimp_paint_core_paste (GimpPaintCore *core,
}
canvas_tiles_to_canvas_buf (core);
- alt = gimp_gegl_buffer_get_tiles (core->undo_buffer);
+
+ base_buffer = core->undo_buffer;
}
/* Otherwise:
* combine the canvas buf and the paint mask to the canvas buf
@@ -929,7 +930,7 @@ gimp_paint_core_paste (GimpPaintCore *core,
core->canvas_buf->height),
FALSE, NULL,
image_opacity, paint_mode,
- alt, /* specify an alternative src1 */
+ base_buffer, /* specify an alternative src1 */
NULL,
core->canvas_buf->x,
core->canvas_buf->y);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]