[gegl] buffer: gegl-buffer-iterator doesn't ignore the abyss policy anymore



commit 0f58ab11dcc36d74feb180ae0e14162385075452
Author: Téo Mazars <teo mazars ensimag fr>
Date:   Sat Jul 27 21:15:47 2013 +0200

    buffer: gegl-buffer-iterator doesn't ignore the abyss policy anymore

 gegl/buffer/gegl-buffer-iterator.c |   25 ++++++++++++++-----------
 gegl/buffer/gegl-buffer-iterator.h |    3 ---
 2 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-iterator.c b/gegl/buffer/gegl-buffer-iterator.c
index 7540293..4874934 100644
--- a/gegl/buffer/gegl-buffer-iterator.c
+++ b/gegl/buffer/gegl-buffer-iterator.c
@@ -72,16 +72,17 @@ typedef struct GeglBufferIterators
   GeglRectangle roi[GEGL_BUFFER_MAX_ITERATORS]; /* roi of the current data */
 
   /* the following is private: */
-  gint           iterators;
-  gint           iteration_no;
-  gboolean       is_finished;
-  GeglRectangle  rect       [GEGL_BUFFER_MAX_ITERATORS]; /* the region we iterate on. They can be different 
from
+  gint            iterators;
+  gint            iteration_no;
+  gboolean        is_finished;
+  GeglRectangle   rect         [GEGL_BUFFER_MAX_ITERATORS]; /* the region we iterate on. They can be 
different from
                                                             each other, but width and height are the same */
-  const Babl    *format     [GEGL_BUFFER_MAX_ITERATORS]; /* The format required for the data */
-  GeglBuffer    *buffer     [GEGL_BUFFER_MAX_ITERATORS]; /* currently a subbuffer of the original, need to 
go away */
-  guint          flags      [GEGL_BUFFER_MAX_ITERATORS];
-  gpointer       buf        [GEGL_BUFFER_MAX_ITERATORS]; /* no idea */
-  GeglBufferTileIterator   i[GEGL_BUFFER_MAX_ITERATORS];
+  const Babl     *format       [GEGL_BUFFER_MAX_ITERATORS]; /* The format required for the data */
+  GeglBuffer     *buffer       [GEGL_BUFFER_MAX_ITERATORS]; /* currently a subbuffer of the original, need 
to go away */
+  guint           flags        [GEGL_BUFFER_MAX_ITERATORS];
+  gpointer        buf          [GEGL_BUFFER_MAX_ITERATORS]; /* no idea */
+  GeglAbyssPolicy abyss_policy [GEGL_BUFFER_MAX_ITERATORS];
+  GeglBufferTileIterator   i   [GEGL_BUFFER_MAX_ITERATORS];
 } GeglBufferIterators;
 
 
@@ -295,6 +296,8 @@ gegl_buffer_iterator_add (GeglBufferIterator  *iterator,
     i->format[self]=buffer->soft_format;
   i->flags[self]=flags;
 
+  i->abyss_policy[self] = abyss_policy;
+
   if (self==0) /* The first buffer which is always scan aligned */
     {
       i->flags[self] |= GEGL_BUFFER_SCAN_COMPATIBLE;
@@ -543,7 +546,7 @@ gegl_buffer_iterator_next (GeglBufferIterator *iterator)
               if (i->flags[no] & GEGL_BUFFER_READ)
                 {
                   gegl_buffer_get_unlocked (i->buffer[no], 1.0, &(i->roi[no]), i->format[no], i->buf[no],
-                                            GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
+                                            GEGL_AUTO_ROWSTRIDE, i->abyss_policy[no]);
                 }
 
               i->data[no]=i->buf[no];
@@ -564,7 +567,7 @@ gegl_buffer_iterator_next (GeglBufferIterator *iterator)
           if (i->flags[no] & GEGL_BUFFER_READ)
             {
               gegl_buffer_get_unlocked (i->buffer[no], 1.0, &(i->roi[no]), i->format[no], i->buf[no],
-                                        GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
+                                        GEGL_AUTO_ROWSTRIDE, i->abyss_policy[no]);
             }
           i->data[no]=i->buf[no];
 
diff --git a/gegl/buffer/gegl-buffer-iterator.h b/gegl/buffer/gegl-buffer-iterator.h
index 1631634..7a671f8 100644
--- a/gegl/buffer/gegl-buffer-iterator.h
+++ b/gegl/buffer/gegl-buffer-iterator.h
@@ -52,8 +52,6 @@ typedef struct GeglBufferIterator
  * @format: the format we want to process this buffers data in, pass 0 to use the buffers format.
  * @flags: whether we need reading or writing to this buffer one of GEGL_BUFFER_READ, GEGL_BUFFER_WRITE and 
GEGL_BUFFER_READWRITE.
  * @repeat_mode: how request outside the buffer extent are handled.
- * Valid values: GEGL_ABYSS_NONE
-
  *
  * Create a new buffer iterator, this buffer will be iterated through
  * in linear chunks, some chunks might be full tiles the coordinates, see
@@ -81,7 +79,6 @@ GeglBufferIterator * gegl_buffer_iterator_new  (GeglBuffer          *buffer,
  * @format: the format we want to process this buffers data in, pass 0 to use the buffers format.
  * @flags: whether we need reading or writing to this buffer.
  * @repeat_mode: how request outside the buffer extent are handled.
- * Valid values: GEGL_ABYSS_NONE
  *
  * Adds an additional buffer iterator that will be processed in sync with
  * the original one, if the buffer doesn't align with the other for tile access


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