[gegl] add more arguments to gegl_node_blit_buffer



commit 6a37b9ade2b37aeb111069a245dfe05cea926a82
Author: Oyvind Kolas <pippin gimp org>
Date:   Wed Jul 29 22:01:09 2015 +0200

    add more arguments to gegl_node_blit_buffer

 gegl/graph/gegl-node.c             |   25 ++++++++++---------------
 gegl/graph/gegl-node.h             |    5 ++++-
 tests/simple/test-convert-format.c |    2 +-
 tests/simple/test-format-sensing.c |    4 ++--
 tests/simple/test-scaled-blit.c    |    6 ++++--
 5 files changed, 21 insertions(+), 21 deletions(-)
---
diff --git a/gegl/graph/gegl-node.c b/gegl/graph/gegl-node.c
index 0740aa9..a7c2c94 100644
--- a/gegl/graph/gegl-node.c
+++ b/gegl/graph/gegl-node.c
@@ -963,12 +963,15 @@ gegl_node_apply_roi (GeglNode            *self,
     }
 }
 
-static void
-gegl_node_blit_buffer2 (GeglNode            *self,
-                        GeglBuffer          *buffer,
-                        const GeglRectangle *roi,
-                        gint                 level) // XXX: add abyss policy
+void
+gegl_node_blit_buffer (GeglNode            *self,
+                       GeglBuffer          *buffer,
+                       const GeglRectangle *roi,
+                       gint                 level,
+                       GeglAbyssPolicy      abyss_policy) 
 {
+  // XXX: make use of abyss_policy
+
   GeglEvalManager *eval_manager;
   GeglBuffer      *result;
   GeglRectangle    request;
@@ -992,14 +995,6 @@ gegl_node_blit_buffer2 (GeglNode            *self,
     }
 }
 
-void
-gegl_node_blit_buffer (GeglNode            *self,
-                       GeglBuffer          *buffer,
-                       const GeglRectangle *roi)
-{
-  gegl_node_blit_buffer2 (self, buffer, roi, 0);
-}
-
 static inline gboolean gegl_mipmap_rendering_enabled (void)
 {
   static int enabled = -1;
@@ -1056,12 +1051,12 @@ gegl_node_blit (GeglNode            *self,
               const GeglRectangle unscaled_roi = _gegl_get_required_for_scale (format, roi, scale);
               gint  level = gegl_mipmap_rendering_enabled()?gegl_level_from_scale (scale):0;
 
-              gegl_node_blit_buffer2 (self, buffer, &unscaled_roi, level);
+              gegl_node_blit_buffer (self, buffer, &unscaled_roi, level, GEGL_ABYSS_NONE);
               gegl_cache_computed (cache, &unscaled_roi, level);
             }
           else
             {
-              gegl_node_blit_buffer (self, buffer, roi);
+              gegl_node_blit_buffer (self, buffer, roi, 0, GEGL_ABYSS_NONE);
               gegl_cache_computed (cache, roi, 0);
             }
         }
diff --git a/gegl/graph/gegl-node.h b/gegl/graph/gegl-node.h
index ccea88e..e0660f6 100644
--- a/gegl/graph/gegl-node.h
+++ b/gegl/graph/gegl-node.h
@@ -293,12 +293,15 @@ void          gegl_node_blit             (GeglNode            *node,
  * @node: a #GeglNode
  * @buffer: (transfer none) (allow-none): the #GeglBuffer to render to.
  * @roi: (allow-none): the rectangle to render.
+ * @level: mipmap level to render (0 for all)
  *
  * Render a rectangular region from a node to the given buffer.
  */
 void          gegl_node_blit_buffer      (GeglNode            *node,
                                           GeglBuffer          *buffer,
-                                          const GeglRectangle *roi);
+                                          const GeglRectangle *roi,
+                                          int                  level,
+                                          GeglAbyssPolicy      abyss_policy);
 
 /**
  * gegl_node_process:
diff --git a/tests/simple/test-convert-format.c b/tests/simple/test-convert-format.c
index 152851b..b04590f 100644
--- a/tests/simple/test-convert-format.c
+++ b/tests/simple/test-convert-format.c
@@ -56,7 +56,7 @@ test_convert_common (const Babl *in_format,
 
   gegl_node_link_many (src, convert, sink, NULL);
 
-  gegl_node_blit_buffer (sink, NULL, NULL);
+  gegl_node_blit_buffer (sink, NULL, NULL, 0, GEGL_ABYSS_NONE);
 
   if (out_format != gegl_buffer_get_format (sink_buffer))
     {
diff --git a/tests/simple/test-format-sensing.c b/tests/simple/test-format-sensing.c
index 1aaac0c..a9a50ff 100644
--- a/tests/simple/test-format-sensing.c
+++ b/tests/simple/test-format-sensing.c
@@ -50,7 +50,7 @@ test_buffer_sink_001 (void)
 
   gegl_node_link_many (src, sink, NULL);
 
-  gegl_node_blit_buffer (sink, NULL, NULL);
+  gegl_node_blit_buffer (sink, NULL, NULL, 0, GEGL_ABYSS_NONE);
 
   if (gegl_buffer_get_format (src_buffer) != gegl_buffer_get_format (sink_buffer))
     result = FALSE;
@@ -99,7 +99,7 @@ test_opacity_common (const Babl *in_format,
 
   gegl_node_link_many (src, opacity, sink, NULL);
 
-  gegl_node_blit_buffer (sink, NULL, NULL);
+  gegl_node_blit_buffer (sink, NULL, NULL, 0, GEGL_ABYSS_NONE);
 
   if (out_format != gegl_buffer_get_format (sink_buffer))
     {
diff --git a/tests/simple/test-scaled-blit.c b/tests/simple/test-scaled-blit.c
index fac7ac9..e3d0ef5 100644
--- a/tests/simple/test-scaled-blit.c
+++ b/tests/simple/test-scaled-blit.c
@@ -52,7 +52,9 @@ test_scale (const gdouble scale, const gint x, const gint y, const Babl *format)
 
   gegl_node_blit_buffer (checkerboard,
                          tmp_buffer,
-                         NULL);
+                         NULL,
+                         0,
+                         GEGL_ABYSS_NONE);
 
   gegl_buffer_get (tmp_buffer,
                    GEGL_RECTANGLE (x, y, scaled_width, scaled_height),
@@ -144,4 +146,4 @@ int main(int argc, char **argv)
   return -1;
 
   return 0;
-}
\ No newline at end of file
+}


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