[gimp] app: palette-import migrated to new buffer iterator
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: palette-import migrated to new buffer iterator
- Date: Wed, 12 Sep 2018 11:55:45 +0000 (UTC)
commit 43c107aeab41c68fd8757dc3f551bbbe931e2b82
Author: Øyvind Kolås <pippin gimp org>
Date: Tue Sep 11 00:18:57 2018 +0200
app: palette-import migrated to new buffer iterator
app/core/gimppalette-import.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/app/core/gimppalette-import.c b/app/core/gimppalette-import.c
index 6cee2ccc33..23c107f3f8 100644
--- a/app/core/gimppalette-import.c
+++ b/app/core/gimppalette-import.c
@@ -18,6 +18,7 @@
#include "config.h"
#include <cairo.h>
+#define GEGL_ITERATOR2_API
#include <gegl.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
@@ -291,7 +292,7 @@ gimp_palette_import_extract (GimpImage *image,
format = babl_format ("R'G'B'A u8");
iter = gegl_buffer_iterator_new (buffer, &rect, 0, format,
- GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
+ GEGL_ACCESS_READ, GEGL_ABYSS_NONE, 2);
bpp = babl_format_get_bytes_per_pixel (format);
if (selection_only &&
@@ -307,18 +308,18 @@ gimp_palette_import_extract (GimpImage *image,
gegl_buffer_iterator_add (iter, buffer, &rect, 0, format,
GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
- mask_roi = &iter->roi[1];
+ mask_roi = &iter->items[1].roi;
mask_bpp = babl_format_get_bytes_per_pixel (format);
}
while (gegl_buffer_iterator_next (iter))
{
- const guchar *data = iter->data[0];
+ const guchar *data = iter->items[0].data;
const guchar *mask_data = NULL;
gint length = iter->length;
if (mask_roi)
- mask_data = iter->data[1];
+ mask_data = iter->items[1].data;
while (length--)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]