gegl r2837 - in trunk: . operations/external



Author: ok
Date: Wed Dec 31 01:38:51 2008
New Revision: 2837
URL: http://svn.gnome.org/viewvc/gegl?rev=2837&view=rev

Log:
* operations/external/ff-load.c: (get_cached_region),
* operations/external/jpg-load.c: (get_cached_region),
* operations/external/png-load.c: (get_cached_region),
* operations/external/v4l.c: (get_cached_region): make these ops
request a cache the size of the bounding box of the file (only load
data once).


Modified:
   trunk/ChangeLog
   trunk/operations/external/ff-load.c
   trunk/operations/external/jpg-load.c
   trunk/operations/external/png-load.c
   trunk/operations/external/v4l.c

Modified: trunk/operations/external/ff-load.c
==============================================================================
--- trunk/operations/external/ff-load.c	(original)
+++ trunk/operations/external/ff-load.c	Wed Dec 31 01:38:51 2008
@@ -429,6 +429,12 @@
   G_OBJECT_CLASS (gegl_chant_parent_class)->finalize (object);
 }
 
+static GeglRectangle
+get_cached_region (GeglOperation       *operation,
+                   const GeglRectangle *roi)
+{
+  return get_bounding_box (operation);
+}
 
 static void
 gegl_chant_class_init (GeglChantClass *klass)
@@ -443,6 +449,7 @@
 
   source_class->process = process;
   operation_class->get_bounding_box = get_bounding_box;
+  operation_class->get_cached_region = get_cached_region;
   operation_class->prepare = prepare;
 
   operation_class->name        = "gegl:ff-load";

Modified: trunk/operations/external/jpg-load.c
==============================================================================
--- trunk/operations/external/jpg-load.c	(original)
+++ trunk/operations/external/jpg-load.c	Wed Dec 31 01:38:51 2008
@@ -185,6 +185,12 @@
   return  TRUE;
 }
 
+static GeglRectangle
+get_cached_region (GeglOperation       *operation,
+                   const GeglRectangle *roi)
+{
+  return get_bounding_box (operation);
+}
 
 static void
 gegl_chant_class_init (GeglChantClass *klass)
@@ -197,6 +203,7 @@
 
   source_class->process = process;
   operation_class->get_bounding_box = get_bounding_box;
+  operation_class->get_cached_region = get_cached_region;
 
   operation_class->name        = "gegl:jpg-load";
   operation_class->categories  = "hidden";

Modified: trunk/operations/external/png-load.c
==============================================================================
--- trunk/operations/external/png-load.c	(original)
+++ trunk/operations/external/png-load.c	Wed Dec 31 01:38:51 2008
@@ -407,6 +407,12 @@
   return  TRUE;
 }
 
+static GeglRectangle
+get_cached_region (GeglOperation       *operation,
+                   const GeglRectangle *roi)
+{
+  return get_bounding_box (operation);
+}
 
 static void
 gegl_chant_class_init (GeglChantClass *klass)
@@ -419,6 +425,7 @@
 
   source_class->process = process;
   operation_class->get_bounding_box = get_bounding_box;
+  operation_class->get_cached_region = get_cached_region;
 
   operation_class->name        = "gegl:png-load";
   operation_class->categories  = "hidden";

Modified: trunk/operations/external/v4l.c
==============================================================================
--- trunk/operations/external/v4l.c	(original)
+++ trunk/operations/external/v4l.c	Wed Dec 31 01:38:51 2008
@@ -193,7 +193,7 @@
   G_OBJECT_CLASS (gegl_chant_parent_class)->finalize (object);
 }
 
-static gboolean update (GeglOperation *operation)
+static gboolean update (gpointer operation)
 {
   GeglRectangle bounds = gegl_operation_get_bounding_box (operation);
   gegl_operation_invalidate (operation, &bounds, FALSE);
@@ -292,6 +292,13 @@
   return  TRUE;
 }
 
+static GeglRectangle
+get_cached_region (GeglOperation       *operation,
+                   const GeglRectangle *roi)
+{
+  return get_bounding_box (operation);
+}
+
 static void
 gegl_chant_class_init (GeglChantClass *klass)
 {
@@ -305,6 +312,7 @@
 
   source_class->process             = process;
   operation_class->get_bounding_box = get_bounding_box;
+  operation_class->get_cached_region = get_cached_region;
   operation_class->prepare          = prepare;
 
   operation_class->name        = "gegl:v4l";



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