[gimp/gimp-2-10] Issue #5267: Cage transform tool causes artifacts.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] Issue #5267: Cage transform tool causes artifacts.
- Date: Thu, 5 Aug 2021 15:12:32 +0000 (UTC)
commit fcefb409e5d02f56295fddc0f2afec3dac66ac6e
Author: Massimo Valentini <mvalentini335 gmail com>
Date: Thu Aug 5 16:58:55 2021 +0200
Issue #5267: Cage transform tool causes artifacts.
I somewhat bisected GEGL commits between 0.4.20 and 0.4.24 and found
that the one that introduced the env var GEGL_OPERATION_INIT_OUTPUT is
the first showing the problem.
Reviewer (Jehan) note: so it would be commit 6e9610e65c on GEGL repo.
This fix makes sense as it means that since this commit, the output
buffer could have random values. It's not a problem for any operation
where we fill every value, but I guess it's not the case for
"gimp:cage-coef-calc" which was likely relying on the old behavior of
being 0-initialized.
(cherry picked from commit 3b2a8f79f0a474eb93f6334777b23514f944b03a)
app/operations/gimpoperationcagecoefcalc.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/app/operations/gimpoperationcagecoefcalc.c b/app/operations/gimpoperationcagecoefcalc.c
index ba8cd3f5e4..9c78054bbe 100644
--- a/app/operations/gimpoperationcagecoefcalc.c
+++ b/app/operations/gimpoperationcagecoefcalc.c
@@ -212,18 +212,18 @@ gimp_operation_cage_coef_calc_process (GeglOperation *operation,
n_cage_vertices = gimp_cage_config_get_n_points (config);
it = gegl_buffer_iterator_new (output, roi, 0, format,
- GEGL_ACCESS_READWRITE, GEGL_ABYSS_NONE, 1);
+ GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE, 1);
while (gegl_buffer_iterator_next (it))
{
/* iterate inside the roi */
- gint n_pixels = it->length;
- gint x = it->items[0].roi.x; /* initial x */
- gint y = it->items[0].roi.y; /* and y coordinates */
- gint j;
-
- gfloat *coef = it->items[0].data;
+ gfloat *coef = it->items[0].data;
+ gint n_pixels = it->length;
+ gint x = it->items[0].roi.x; /* initial x */
+ gint y = it->items[0].roi.y; /* and y coordinates */
+ gint j;
+ memset (coef, 0, sizeof * coef * n_pixels * 2 * n_cage_vertices);
while(n_pixels--)
{
if (gimp_cage_config_point_inside(config, x, y))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]