[gegl] ripple: propagate space



commit 3550943e43ffac209fc1cf728b3fe31512a8bf74
Author: Øyvind Kolås <pippin gimp org>
Date:   Fri Jul 6 12:32:49 2018 +0200

    ripple: propagate space

 operations/common-gpl3+/ripple.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/operations/common-gpl3+/ripple.c b/operations/common-gpl3+/ripple.c
index 72c9ed1dd..de5a0ffc9 100644
--- a/operations/common-gpl3+/ripple.c
+++ b/operations/common-gpl3+/ripple.c
@@ -76,6 +76,7 @@ prepare (GeglOperation *operation)
 {
   GeglProperties              *o;
   GeglOperationAreaFilter *op_area;
+  const Babl              *space = gegl_operation_get_source_space (operation, "input");
 
   op_area = GEGL_OPERATION_AREA_FILTER (operation);
   o       = GEGL_PROPERTIES (operation);
@@ -86,9 +87,9 @@ prepare (GeglOperation *operation)
   op_area->bottom = o->amplitude;
 
   gegl_operation_set_format (operation, "input",
-                             babl_format ("RGBA float"));
+                             babl_format_with_space ("RGBA float", space));
   gegl_operation_set_format (operation, "output",
-                             babl_format ("RGBA float"));
+                             babl_format_with_space ("RGBA float", space));
 }
 
 static GeglAbyssPolicy
@@ -108,8 +109,9 @@ process (GeglOperation       *operation,
          gint                 level)
 {
   GeglProperties     *o       = GEGL_PROPERTIES (operation);
+  const Babl         *format  = gegl_operation_get_format (operation, "output");
   GeglSampler        *sampler = gegl_buffer_sampler_new_at_level (input,
-                                                         babl_format ("RGBA float"),
+                                                         format,
                                                          o->sampler_type,
                                                          level);
   GeglBufferIterator *iter;
@@ -176,7 +178,7 @@ process (GeglOperation       *operation,
        */
     }
 
-  iter = gegl_buffer_iterator_new (output, result, 0, babl_format ("RGBA float"),
+  iter = gegl_buffer_iterator_new (output, result, 0, format,
                                    GEGL_ACCESS_WRITE, GEGL_ABYSS_NONE);
 
   while (gegl_buffer_iterator_next (iter))


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