[gimp] app: histogram migrated to new buffer iterator



commit 2c2d8d86fd17902d02d5183c280acd434ccc0ac7
Author: Øyvind Kolås <pippin gimp org>
Date:   Tue Sep 11 00:17:24 2018 +0200

    app: histogram migrated to new buffer iterator

 app/core/gimphistogram.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/app/core/gimphistogram.c b/app/core/gimphistogram.c
index 109dffa201..4188e5ce05 100644
--- a/app/core/gimphistogram.c
+++ b/app/core/gimphistogram.c
@@ -17,6 +17,8 @@
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
+#define GEGL_ITERATOR2_API
+
 #include "config.h"
 
 #include <string.h>
@@ -984,7 +986,7 @@ gimp_histogram_calculate_area (const GeglRectangle *area,
 
   iter = gegl_buffer_iterator_new (context->buffer, area, 0,
                                    data->format,
-                                   GEGL_ACCESS_READ, GEGL_ABYSS_NONE);
+                                   GEGL_ACCESS_READ, GEGL_ABYSS_NONE, 2);
 
   if (context->mask)
     {
@@ -1020,7 +1022,7 @@ gimp_histogram_calculate_area (const GeglRectangle *area,
 
   while (gegl_buffer_iterator_next (iter))
     {
-      const gfloat *data   = iter->data[0];
+      const gfloat *data   = iter->items[0].data;
       gint          length = iter->length;
       gfloat        max;
       gfloat        luminance;
@@ -1029,7 +1031,7 @@ gimp_histogram_calculate_area (const GeglRectangle *area,
 
       if (context->mask)
         {
-          const gfloat *mask_data = iter->data[1];
+          const gfloat *mask_data = iter->items[1].data;
 
           switch (n_components)
             {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]