[gimp] app: fix smudge tool artifacts
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix smudge tool artifacts
- Date: Thu, 5 Apr 2018 23:17:57 +0000 (UTC)
commit f7c2ce9b1359e414ca53273bcea9787bdb51dc3d
Author: Ell <ell_se yahoo com>
Date: Thu Apr 5 19:14:59 2018 -0400
app: fix smudge tool artifacts
Commit cb239e60f6ef91ba66373a285ab2f5cbeb700eb8 introduced
artifacts when using the smudge tool with multithreads. Fix this
(caused by a wrong offset passed to an iterator) plus indentation
fixes.
app/gegl/gimp-gegl-loops.cc | 28 ++++++++++++++++------------
1 files changed, 16 insertions(+), 12 deletions(-)
---
diff --git a/app/gegl/gimp-gegl-loops.cc b/app/gegl/gimp-gegl-loops.cc
index c686e12..b92bc40 100644
--- a/app/gegl/gimp-gegl-loops.cc
+++ b/app/gegl/gimp-gegl-loops.cc
@@ -473,13 +473,13 @@ gimp_gegl_smudge_with_paint (GeglBuffer *accum_buffer,
gdouble flow,
gdouble rate)
{
- gfloat brush_color_float[4];
- gfloat brush_a = flow;
- GeglAccessMode paint_buffer_access_mode = (brush_color ?
- GEGL_ACCESS_WRITE :
- GEGL_ACCESS_READWRITE);
- gboolean sse2 = (gimp_cpu_accel_get_support () &
- GIMP_CPU_ACCEL_X86_SSE2);
+ gfloat brush_color_float[4];
+ gfloat brush_a = flow;
+ GeglAccessMode paint_buffer_access_mode = (brush_color ?
+ GEGL_ACCESS_WRITE :
+ GEGL_ACCESS_READWRITE);
+ gboolean sse2 = (gimp_cpu_accel_get_support () &
+ GIMP_CPU_ACCEL_X86_SSE2);
/* convert brush color from double to float */
if (brush_color)
@@ -508,16 +508,20 @@ gimp_gegl_smudge_with_paint (GeglBuffer *accum_buffer,
babl_format ("RGBA float"),
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
- gegl_buffer_iterator_add (iter, paint_buffer, GEGL_RECTANGLE (0, 0, 0, 0), 0,
+ gegl_buffer_iterator_add (iter, paint_buffer,
+ GEGL_RECTANGLE (accum_area->x - accum_rect->x,
+ accum_area->y - accum_rect->y,
+ 0, 0),
+ 0,
babl_format ("RGBA float"),
paint_buffer_access_mode, GEGL_ABYSS_NONE);
while (gegl_buffer_iterator_next (iter))
{
- gfloat *accum = (gfloat *) iter->data[0];
- const gfloat *canvas = (const gfloat *) iter->data[1];
- gfloat *paint = (gfloat *) iter->data[2];
- gint count = iter->length;
+ gfloat *accum = (gfloat *) iter->data[0];
+ const gfloat *canvas = (const gfloat *) iter->data[1];
+ gfloat *paint = (gfloat *) iter->data[2];
+ gint count = iter->length;
#if COMPILE_SSE2_INTRINISICS
if (sse2 && ((guintptr) accum |
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]