[gimp/gimp-2-10] app: histogram migrated to new buffer iterator



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

    app: histogram migrated to new buffer iterator
    
    (cherry picked from commit 2c2d8d86fd17902d02d5183c280acd434ccc0ac7)

 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 c08ca371af..1ce1c8add0 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>
@@ -1018,7 +1020,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)
     {
@@ -1054,7 +1056,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;
@@ -1063,7 +1065,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]