gimp r24555 - in trunk: . app/gegl app/gegl/gegl



Author: ok
Date: Mon Jan  7 01:44:58 2008
New Revision: 24555
URL: http://svn.gnome.org/viewvc/gimp?rev=24555&view=rev

Log:
* app/gegl/gimpoperationtilesink.c:
* app/gegl/gimpoperationtilesource.c: modified to match newer API in
GEGL.
* app/gegl/gegl/gegl-operation-sink.h:
* app/gegl/gegl/gegl-operation-source.h: updated from GEGL.


Modified:
   trunk/ChangeLog
   trunk/app/gegl/gegl/gegl-operation-sink.h
   trunk/app/gegl/gegl/gegl-operation-source.h
   trunk/app/gegl/gimpoperationtilesink.c
   trunk/app/gegl/gimpoperationtilesource.c

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	(original)
+++ trunk/ChangeLog	Mon Jan  7 01:44:58 2008
@@ -1,3 +1,12 @@
+2008-01-07  Ãyvind KolÃs  <pippin gimp org>
+
+	* app/gegl/gimpoperationtilesink.c:
+	* app/gegl/gimpoperationtilesource.c: modified to match newer API in
+	GEGL.
+
+	* app/gegl/gegl/gegl-operation-sink.h:
+	* app/gegl/gegl/gegl-operation-source.h: updated from GEGL.
+
 2008-01-06  Michael Natterer  <mitch gimp org>
 
 	* app/gegl/gegl/buffer/gegl-buffer-types.h

Modified: trunk/app/gegl/gegl/gegl-operation-sink.h
==============================================================================
--- trunk/app/gegl/gegl/gegl-operation-sink.h	(original)
+++ trunk/app/gegl/gegl/gegl-operation-sink.h	Mon Jan  7 01:44:58 2008
@@ -45,6 +45,7 @@
 
   gboolean (* process) (GeglOperation       *self,
                         GeglNodeContext     *context,
+                        GeglBuffer          *input,
                         const GeglRectangle *result);
 };
 

Modified: trunk/app/gegl/gegl/gegl-operation-source.h
==============================================================================
--- trunk/app/gegl/gegl/gegl-operation-source.h	(original)
+++ trunk/app/gegl/gegl/gegl-operation-source.h	Mon Jan  7 01:44:58 2008
@@ -43,6 +43,7 @@
 
   gboolean (* process) (GeglOperation       *self,
                         GeglNodeContext     *context,
+                        GeglBuffer          *output,
                         const GeglRectangle *result);
 };
 

Modified: trunk/app/gegl/gimpoperationtilesink.c
==============================================================================
--- trunk/app/gegl/gimpoperationtilesink.c	(original)
+++ trunk/app/gegl/gimpoperationtilesink.c	Mon Jan  7 01:44:58 2008
@@ -67,6 +67,7 @@
 
 static gboolean gimp_operation_tile_sink_process      (GeglOperation *operation,
                                                        GeglNodeContext *context,
+                                                       GeglBuffer          *input,
                                                        const GeglRectangle *result);
 
 
@@ -194,13 +195,13 @@
 static gboolean
 gimp_operation_tile_sink_process (GeglOperation       *operation,
                                   GeglNodeContext     *context,
+                                  GeglBuffer          *input,
                                   const GeglRectangle *result)
 {
   GimpOperationTileSink *self = GIMP_OPERATION_TILE_SINK (operation);
 
   if (self->tile_manager)
     {
-      GeglBuffer  *input;
       const Babl  *format;
       PixelRegion  destPR;
       guint        bpp = tile_manager_bpp (self->tile_manager);
@@ -211,8 +212,6 @@
       else
         format = gimp_bpp_to_babl_format (bpp);
 
-      input = gegl_node_context_get_source (context, "input");
-
       pixel_region_init (&destPR, self->tile_manager,
                          result->x,     result->y,
                          result->width, result->height,

Modified: trunk/app/gegl/gimpoperationtilesource.c
==============================================================================
--- trunk/app/gegl/gimpoperationtilesource.c	(original)
+++ trunk/app/gegl/gimpoperationtilesource.c	Mon Jan  7 01:44:58 2008
@@ -61,6 +61,7 @@
 
 static gboolean gimp_operation_tile_source_process      (GeglOperation *operation,
                                                          GeglNodeContext *context,
+                                                         GeglBuffer          *output,
                                                          const GeglRectangle *result);
 
 
@@ -199,6 +200,7 @@
 static gboolean
 gimp_operation_tile_source_process (GeglOperation       *operation,
                                     GeglNodeContext     *context,
+                                    GeglBuffer          *output,
                                     const GeglRectangle *result)
 {
   GimpOperationTileSource *self = GIMP_OPERATION_TILE_SOURCE (operation);
@@ -211,12 +213,12 @@
       guint        bpp = tile_manager_bpp (self->tile_manager);
       gpointer     pr;
 
-      if (self->linear)
+      if (self->linear) /* FIXME: this should be set in prepare and not process */
         format = gimp_bpp_to_babl_format_linear (bpp);
       else
         format = gimp_bpp_to_babl_format (bpp);
 
-      output = gegl_buffer_new (result, format);
+      output = gegl_buffer_new (result, format); /* FIXME: use the passed in buffer */
 
       pixel_region_init (&srcPR, self->tile_manager,
                          result->x,     result->y,
@@ -232,7 +234,9 @@
           gegl_buffer_set (output, &rect, format, srcPR.data, srcPR.rowstride);
         }
 
-      gegl_node_context_set_object (context, "output", G_OBJECT (output));
+      gegl_node_context_set_object (context, "output", G_OBJECT (output)); /* FIXME: should not be needed
+                                                                              if using the passed in 
+                                                                              buffer */
     }
 
   return TRUE;



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