[gimp/metadata-browser] app: gimp_gegl_convolve() needs a linear buffer or it will horribly fail
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] app: gimp_gegl_convolve() needs a linear buffer or it will horribly fail
- Date: Thu, 13 Sep 2012 00:20:44 +0000 (UTC)
commit af0f8dca4a9151631c4066d61599d258cf327141
Author: Michael Natterer <mitch gimp org>
Date: Wed May 23 22:41:14 2012 +0200
app: gimp_gegl_convolve() needs a linear buffer or it will horribly fail
app/paint/gimpconvolve.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/app/paint/gimpconvolve.c b/app/paint/gimpconvolve.c
index 742889c..4cb64be 100644
--- a/app/paint/gimpconvolve.c
+++ b/app/paint/gimpconvolve.c
@@ -131,6 +131,7 @@ gimp_convolve_motion (GimpPaintCore *paint_core,
GeglBuffer *paint_buffer;
gint paint_buffer_x;
gint paint_buffer_y;
+ GimpTempBuf *temp_buf;
GeglBuffer *convolve_buffer;
gdouble fade_point;
gdouble opacity;
@@ -166,11 +167,12 @@ gimp_convolve_motion (GimpPaintCore *paint_core,
gimp_temp_buf_get_height (brush_core->brush->mask) / 2,
rate);
- convolve_buffer =
- gegl_buffer_new (GEGL_RECTANGLE (0, 0,
- gegl_buffer_get_width (paint_buffer),
- gegl_buffer_get_height (paint_buffer)),
- gegl_buffer_get_format (paint_buffer));
+ /* need a linear buffer for gimp_gegl_convolve() */
+ temp_buf = gimp_temp_buf_new (gegl_buffer_get_width (paint_buffer),
+ gegl_buffer_get_height (paint_buffer),
+ gegl_buffer_get_format (paint_buffer));
+ 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]