mirror of https://github.com/GNOME/gimp.git
app: switch to #ifdef GEGL_BUG_645810_SOLVED code.
When checking the Cage Transform operation code, I saw some ifdef meant to be switched to when bug 645810 is fixed. It also says in a comment: > /* When Gegl bug #645810 will be solved, > this should be a good optimisation */ Checking said bug, it appears it has been fixed since 2012! I also fixed a bit the parameters in gegl_buffer_sample() call since it seems the function signature has changed quite a bit.
This commit is contained in:
parent
5b58cc4b7c
commit
2956cde6cf
|
@ -545,20 +545,8 @@ gimp_cage_transform_compute_destination (GimpCageConfig *config,
|
|||
gint i;
|
||||
GimpCagePoint *point;
|
||||
|
||||
/* When Gegl bug #645810 will be solved, this should be a good optimisation */
|
||||
#ifdef GEGL_BUG_645810_SOLVED
|
||||
gegl_buffer_sample (coef_buf, coords.x, coords.y, 1.0, coef, format_coef, GEGL_INTERPOLATION_NEAREST);
|
||||
#else
|
||||
GeglRectangle rect;
|
||||
|
||||
rect.height = 1;
|
||||
rect.width = 1;
|
||||
rect.x = coords.x;
|
||||
rect.y = coords.y;
|
||||
|
||||
gegl_buffer_get (coef_buf, &rect, 1.0, format_coef, coef,
|
||||
GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
|
||||
#endif
|
||||
gegl_buffer_sample (coef_buf, coords.x, coords.y, NULL, coef, format_coef,
|
||||
GEGL_SAMPLER_NEAREST, GEGL_ABYSS_NONE);
|
||||
|
||||
for (i = 0; i < n_cage_vertices; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue