[gegl] transform-ops: use new iterator api
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] transform-ops: use new iterator api
- Date: Wed, 12 Sep 2018 11:56:18 +0000 (UTC)
commit 00dc89096c0a28665df7cc2bdb9cb29d11314847
Author: Øyvind Kolås <pippin gimp org>
Date: Mon Sep 10 22:35:09 2018 +0200
transform-ops: use new iterator api
operations/transform/transform-core.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/operations/transform/transform-core.c b/operations/transform/transform-core.c
index aa67d46e4..9be1d9b4a 100644
--- a/operations/transform/transform-core.c
+++ b/operations/transform/transform-core.c
@@ -24,6 +24,8 @@
* 2012 Nicolas Robidoux
*/
+#define GEGL_ITERATOR2_API
+
#include "config.h"
#include <glib/gi18n-lib.h>
@@ -1173,7 +1175,7 @@ transform_affine (GeglOperation *operation,
level,
format,
GEGL_ACCESS_WRITE,
- GEGL_ABYSS_NONE);
+ GEGL_ABYSS_NONE, 1);
/*
* Hoist most of what can out of the while loop:
@@ -1196,8 +1198,8 @@ transform_affine (GeglOperation *operation,
while (gegl_buffer_iterator_next (i))
{
- GeglRectangle *roi = &i->roi[0];
- gfloat * restrict dest_ptr = (gfloat *)i->data[0];
+ GeglRectangle *roi = &i->items[0].roi;
+ gfloat * restrict dest_ptr = (gfloat *)i->items[0].data;
gdouble u_start =
base_u +
@@ -1304,7 +1306,7 @@ transform_generic (GeglOperation *operation,
level,
format,
GEGL_ACCESS_WRITE,
- GEGL_ABYSS_NONE);
+ GEGL_ABYSS_NONE, 1);
gegl_matrix3_copy_into (&inverse, matrix);
@@ -1325,7 +1327,7 @@ transform_generic (GeglOperation *operation,
*/
while (gegl_buffer_iterator_next (i))
{
- GeglRectangle *roi = &i->roi[0];
+ GeglRectangle *roi = &i->items[0].roi;
gdouble u_start =
inverse.coeff [0][0] * (roi->x + (gdouble) 0.5) +
@@ -1340,7 +1342,7 @@ transform_generic (GeglOperation *operation,
inverse.coeff [2][1] * (roi->y + (gdouble) 0.5) +
inverse.coeff [2][2];
- gfloat * restrict dest_ptr = (gfloat *) i->data[0];
+ gfloat * restrict dest_ptr = (gfloat *)i->items[0].data;
/*
* Assumes that height and width are > 0.
@@ -1451,7 +1453,7 @@ transform_nearest (GeglOperation *operation,
level,
format,
GEGL_ACCESS_WRITE,
- GEGL_ABYSS_NONE);
+ GEGL_ABYSS_NONE, 1);
gegl_matrix3_copy_into (&inverse, matrix);
@@ -1472,7 +1474,7 @@ transform_nearest (GeglOperation *operation,
*/
while (gegl_buffer_iterator_next (i))
{
- GeglRectangle *roi = &i->roi[0];
+ GeglRectangle *roi = &i->items[0].roi;
gdouble u_start =
inverse.coeff [0][0] * (roi->x + (gdouble) 0.5) +
@@ -1487,7 +1489,7 @@ transform_nearest (GeglOperation *operation,
inverse.coeff [2][1] * (roi->y + (gdouble) 0.5) +
inverse.coeff [2][2];
- guchar * restrict dest_ptr = (guchar *) i->data[0];
+ guchar * restrict dest_ptr = (guchar *) i->items[0].data;
/*
* Assumes that height and width are > 0.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]