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 3b2a8f79f0
)
This commit is contained in:
@ -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))
|
||||
|
Reference in New Issue
Block a user