From 6a7173074d990ddacd999d9bc0faa6fb02eb5d9c Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Wed, 23 May 2012 22:41:14 +0200 Subject: [PATCH] app: gimp_gegl_convolve() needs a linear buffer or it will horribly fail --- app/paint/gimpconvolve.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/paint/gimpconvolve.c b/app/paint/gimpconvolve.c index 742889cb0e..4cb64bec09 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,