[gegl] tile-seamless: use new iterator api
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] tile-seamless: use new iterator api
- Date: Wed, 12 Sep 2018 11:54:56 +0000 (UTC)
commit c24189004206dd3431b21af845aa4b9e9f7f5d56
Author: Øyvind Kolås <pippin gimp org>
Date: Mon Sep 10 22:36:23 2018 +0200
tile-seamless: use new iterator api
operations/common/tile-seamless.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/operations/common/tile-seamless.c b/operations/common/tile-seamless.c
index 9ea407697..ac05213ad 100644
--- a/operations/common/tile-seamless.c
+++ b/operations/common/tile-seamless.c
@@ -17,6 +17,7 @@
* Tim Rowley <tor cs brown edu>
*/
+#define GEGL_ITERATOR2_API
#include "config.h"
#include <glib/gi18n-lib.h>
@@ -70,7 +71,7 @@ process (GeglOperation *operation,
gi = gegl_buffer_iterator_new (output, whole_region,
0, format,
- GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
+ GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE, 3);
index_iter = gegl_buffer_iterator_add (gi, input, whole_region,
0, format,
@@ -86,10 +87,11 @@ process (GeglOperation *operation,
gfloat *data_out;
gfloat *data_in1;
gfloat *data_in2;
+ GeglRectangle *roi = &gi->items[0].roi;
- data_out = (gfloat*) gi->data[0];
- data_in1 = (gfloat*) gi->data[index_iter];
- data_in2 = (gfloat*) gi->data[index_iter2];
+ data_out = (gfloat*) gi->items[0].data;
+ data_in1 = (gfloat*) gi->items[index_iter].data;
+ data_in2 = (gfloat*) gi->items[index_iter2].data;
for (k = 0; k < gi->length; k++)
{
@@ -99,8 +101,8 @@ process (GeglOperation *operation,
gfloat w, w1, w2;
const gfloat eps = 1e-4;
- x = gi->roi[0].x + k % gi->roi[0].width;
- y = gi->roi[0].y + k / gi->roi[0].width;
+ x = roi->x + k % roi->width;
+ y = roi->y + k / roi->width;
val_x = (half_width - x) / (gfloat) half_width;
val_y = (half_height - y) / (gfloat) half_height;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]