Commit 50554f5e authored by Øyvind Kolås's avatar Øyvind Kolås

make these ops request a cache the size of the bounding box of the file

* 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).

svn path=/trunk/; revision=2837
parent d4da3f27
2008-12-31 Øyvind Kolås <pippin@gimp.org>
* 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).
2008-12-31 Øyvind Kolås <pippin@gimp.org>
* operations/affine/affine.c: (process) removed unused variable.
......
......@@ -429,6 +429,12 @@ finalize (GObject *object)
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 @@ gegl_chant_class_init (GeglChantClass *klass)
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";
......
......@@ -185,6 +185,12 @@ process (GeglOperation *operation,
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 @@ gegl_chant_class_init (GeglChantClass *klass)
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";
......
......@@ -407,6 +407,12 @@ process (GeglOperation *operation,
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 @@ gegl_chant_class_init (GeglChantClass *klass)
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";
......
......@@ -193,7 +193,7 @@ finalize (GObject *object)
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 @@ process (GeglOperation *operation,
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 @@ gegl_chant_class_init (GeglChantClass *klass)
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";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment