From 8b87e633b37f6e577366ec9bbd5407fe0ff852fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Thu, 24 Mar 2011 19:57:47 +0100 Subject: [PATCH] gimp:cage-transform : iterate over y then x, to follow memory organisation --- app/gegl/gimpoperationcagetransform.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/gegl/gimpoperationcagetransform.c b/app/gegl/gimpoperationcagetransform.c index cf9fbd246e..67640894b9 100644 --- a/app/gegl/gimpoperationcagetransform.c +++ b/app/gegl/gimpoperationcagetransform.c @@ -280,27 +280,27 @@ gimp_operation_cage_transform_process (GeglOperation *operation, format_coef = babl_format_n (babl_type ("float"), 2 * config->n_cage_vertices); /* compute, reverse and interpolate the transformation */ - for (x = cage_bb.x; x < cage_bb.x + cage_bb.width - 1; x++) + for (y = cage_bb.y; y < cage_bb.y + cage_bb.height - 1; y++) { GimpVector2 p1_d, p2_d, p3_d, p4_d; GimpVector2 p1_s, p2_s, p3_s, p4_s; - p1_s.x = x; - p2_s.x = x+1; - p3_s.x = x+1; - p3_s.y = cage_bb.y; - p4_s.x = x; - p4_s.y = cage_bb.y; + p1_s.y = y; + p2_s.y = y+1; + p3_s.y = y+1; + p3_s.x = cage_bb.x; + p4_s.y = y; + p4_s.x = cage_bb.x; p3_d = gimp_cage_transform_compute_destination (config, coef, format_coef, aux_buf, p3_s); p4_d = gimp_cage_transform_compute_destination (config, coef, format_coef, aux_buf, p4_s); - for (y = cage_bb.y; y < cage_bb.y + cage_bb.height - 1; y++) + for (x = cage_bb.x; x < cage_bb.x + cage_bb.width - 1; x++) { p1_s = p4_s; p2_s = p3_s; - p3_s.y = y+1; - p4_s.y = y+1; + p3_s.x = x+1; + p4_s.x = x+1; p1_d = p4_d; p2_d = p3_d;