[gimp] app: switch to #ifdef GEGL_BUG_645810_SOLVED code.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: switch to #ifdef GEGL_BUG_645810_SOLVED code.
- Date: Mon, 12 Feb 2018 18:30:43 +0000 (UTC)
commit 2956cde6cfb8024bc0a313e652a7a49f493e1294
Author: Jehan <jehan girinstud io>
Date: Mon Feb 12 19:23:08 2018 +0100
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.
app/operations/gimpoperationcagetransform.c | 16 ++--------------
1 files changed, 2 insertions(+), 14 deletions(-)
---
diff --git a/app/operations/gimpoperationcagetransform.c b/app/operations/gimpoperationcagetransform.c
index fa17e13..98a371f 100644
--- a/app/operations/gimpoperationcagetransform.c
+++ b/app/operations/gimpoperationcagetransform.c
@@ -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++)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]