Commit 6d9def27 authored by Øyvind Kolås's avatar Øyvind Kolås

Removed context_id argument from prepare method, added const

GeglRectangle *result to base process and many of the process
protoypes in other base classes to simplify logic in operations.
* gegl/gegl-chant.h:
* gegl/operation/gegl-operation-filter.c:
* gegl/operation/gegl-operation-composer.c:
* gegl/operation/gegl-operation-filter.h:
* gegl/operation/gegl-operation-area-filter.c:
* gegl/operation/gegl-operation-composer.h:
* gegl/operation/gegl-operation-source.c:
* gegl/operation/gegl-operation.c:
* gegl/operation/gegl-operation-sink.c:
* gegl/operation/gegl-operation-source.h:
* gegl/operation/gegl-operation.h:
* gegl/operation/gegl-operation-sink.h:
* gegl/operation/gegl-operation-point-filter.c:
* gegl/operation/gegl-operation-point-composer.c:
* gegl/process/gegl-eval-visitor.c:
* gegl/process/gegl-prepare-visitor.c:
* gegl/process/gegl-eval-mgr.c:
* gegl/process/gegl-processor.c:
* operations/render/color.c:
* operations/render/text.c:
* operations/render/introspect.c:
* operations/render/checkerboard.c:
* operations/render/FractalExplorer.c:
* operations/render/noise.c:
* operations/svg/svg_huerotate.c:
* operations/svg/svg_luminancetoalpha.c:
* operations/svg/svg_matrix.c:
* operations/svg/svg_saturate.c:
* operations/enhance/bilateral-filter.c:
* operations/enhance/snn-mean.c:
* operations/blur/box-blur.c:
* operations/blur/gaussian-blur.c:
* operations/meta/layer.c:
* operations/io/png-load.c:
* operations/io/save-buffer.c:
* operations/io/raw-load.c:
* operations/io/magick-load.c:
* operations/io/exr-load.cpp:
* operations/io/svg-load.c:
* operations/io/load.c:
* operations/io/png-save.c:
* operations/io/load-buffer.c:
* operations/io/save-pixbuf.c:
* operations/io/pixbuf.c:
* operations/io/jpg-load.c:
* operations/core/clone.c:
* operations/core/crop.c:
* operations/core/convert-format.c:
* operations/core/nop.c:
* operations/core/shift.c:
* operations/affine/affine.c:
* operations/transparency/opacity.c:
* operations/workshop/min-envelope.c:
* operations/workshop/max-envelope.c:
* operations/workshop/kuwahara.c:
* operations/workshop/grey.c:
* operations/workshop/box-min.c:
* operations/workshop/disc-percentile.c:
* operations/workshop/box-max.c:
* operations/workshop/c2g.c:
* operations/workshop/gluas.c:
* operations/workshop/demosaic-simple.c:
* operations/workshop/hstack.c:
* operations/workshop/generated/blend.rb:
* operations/workshop/box-percentile.c:
* operations/workshop/mblur.c:
* operations/workshop/stress.c:
* operations/workshop/kuwahara-min.c:
* operations/workshop/line-profile.c:
* operations/workshop/kuwahara-max.c:
* operations/workshop/snn-percentile.c:
* operations/workshop/mandelbrot.c:
* operations/workshop/ff-save.c:
* operations/workshop/gtk-display.c:
* operations/workshop/rawbayer-load.c:
* operations/generated/svg-12-blend.rb:
* operations/generated/other-blend.rb:
* operations/generated/math.rb:
* operations/generated/svg-12-porter-duff.rb:
* operations/color/contrast-curve.c:
* operations/color/brightness-contrast.c:
* operations/color/remap.c:
* operations/color/whitebalance.c:
* operations/color/stretch-contrast.c:
* operations/color/mono-mixer.c:
* operations/color/threshold.c:

svn path=/trunk/; revision=1798
parent 1df1de72
2008-01-03 Øyvind Kolås <pippin@gimp.org>
Removed context_id argument from prepare method, added const
GeglRectangle *result to base process and many of the process
protoypes in other base classes to simplify logic in operations.
* gegl/gegl-chant.h:
* gegl/operation/gegl-operation-filter.c:
* gegl/operation/gegl-operation-composer.c:
* gegl/operation/gegl-operation-filter.h:
* gegl/operation/gegl-operation-area-filter.c:
* gegl/operation/gegl-operation-composer.h:
* gegl/operation/gegl-operation-source.c:
* gegl/operation/gegl-operation.c:
* gegl/operation/gegl-operation-sink.c:
* gegl/operation/gegl-operation-source.h:
* gegl/operation/gegl-operation.h:
* gegl/operation/gegl-operation-sink.h:
* gegl/operation/gegl-operation-point-filter.c:
* gegl/operation/gegl-operation-point-composer.c:
* gegl/process/gegl-eval-visitor.c:
* gegl/process/gegl-prepare-visitor.c:
* gegl/process/gegl-eval-mgr.c:
* gegl/process/gegl-processor.c:
* operations/render/color.c:
* operations/render/text.c:
* operations/render/introspect.c:
* operations/render/checkerboard.c:
* operations/render/FractalExplorer.c:
* operations/render/noise.c:
* operations/svg/svg_huerotate.c:
* operations/svg/svg_luminancetoalpha.c:
* operations/svg/svg_matrix.c:
* operations/svg/svg_saturate.c:
* operations/enhance/bilateral-filter.c:
* operations/enhance/snn-mean.c:
* operations/blur/box-blur.c:
* operations/blur/gaussian-blur.c:
* operations/meta/layer.c:
* operations/io/png-load.c:
* operations/io/save-buffer.c:
* operations/io/raw-load.c:
* operations/io/magick-load.c:
* operations/io/exr-load.cpp:
* operations/io/svg-load.c:
* operations/io/load.c:
* operations/io/png-save.c:
* operations/io/load-buffer.c:
* operations/io/save-pixbuf.c:
* operations/io/pixbuf.c:
* operations/io/jpg-load.c:
* operations/core/clone.c:
* operations/core/crop.c:
* operations/core/convert-format.c:
* operations/core/nop.c:
* operations/core/shift.c:
* operations/affine/affine.c:
* operations/transparency/opacity.c:
* operations/workshop/min-envelope.c:
* operations/workshop/max-envelope.c:
* operations/workshop/kuwahara.c:
* operations/workshop/grey.c:
* operations/workshop/box-min.c:
* operations/workshop/disc-percentile.c:
* operations/workshop/box-max.c:
* operations/workshop/c2g.c:
* operations/workshop/gluas.c:
* operations/workshop/demosaic-simple.c:
* operations/workshop/hstack.c:
* operations/workshop/generated/blend.rb:
* operations/workshop/box-percentile.c:
* operations/workshop/mblur.c:
* operations/workshop/stress.c:
* operations/workshop/kuwahara-min.c:
* operations/workshop/line-profile.c:
* operations/workshop/kuwahara-max.c:
* operations/workshop/snn-percentile.c:
* operations/workshop/mandelbrot.c:
* operations/workshop/ff-save.c:
* operations/workshop/gtk-display.c:
* operations/workshop/rawbayer-load.c:
* operations/generated/svg-12-blend.rb:
* operations/generated/other-blend.rb:
* operations/generated/math.rb:
* operations/generated/svg-12-porter-duff.rb:
* operations/color/contrast-curve.c:
* operations/color/brightness-contrast.c:
* operations/color/remap.c:
* operations/color/whitebalance.c:
* operations/color/stretch-contrast.c:
* operations/color/mono-mixer.c:
* operations/color/threshold.c:
2008-01-03 Michael Natterer <mitch@gimp.org>
* gegl/buffer/gegl-sampler-cubic.h
......
......@@ -422,7 +422,8 @@ static gboolean process (GeglOperation *operation,
#else
#ifndef GEGL_CHANT_META
static gboolean process (GeglOperation *operation,
gpointer context_id);
gpointer context_id,
const GeglRectangle *result);
#endif
#endif
#endif
......@@ -438,8 +439,7 @@ static void init (GeglChantOperation *self);
#endif
#ifdef GEGL_CHANT_PREPARE
static void prepare (GeglOperation *self,
gpointer context_id);
static void prepare (GeglOperation *self);
#endif
#ifdef GEGL_CHANT_AREA_FILTER
......
......@@ -20,8 +20,7 @@
G_DEFINE_TYPE (GeglOperationAreaFilter, gegl_operation_area_filter, GEGL_TYPE_OPERATION_FILTER)
static void prepare (GeglOperation *operation,
gpointer context_id)
static void prepare (GeglOperation *operation)
{
gegl_operation_set_format (operation, "input", babl_format ("RGBA float"));
gegl_operation_set_format (operation, "output", babl_format ("RGBA float"));
......
......@@ -41,7 +41,8 @@ static void set_property (GObject *gobject,
GParamSpec *pspec);
static gboolean process (GeglOperation *operation,
gpointer context_id,
const gchar *output_prop);
const gchar *output_prop,
const GeglRectangle *result);
static void attach (GeglOperation *operation);
static GeglNode*detect (GeglOperation *operation,
gint x,
......@@ -135,9 +136,10 @@ set_property (GObject *object,
}
static gboolean
process (GeglOperation *operation,
gpointer context_id,
const gchar *output_prop)
process (GeglOperation *operation,
gpointer context_id,
const gchar *output_prop,
const GeglRectangle *result)
{
GeglBuffer *input;
GeglBuffer *aux;
......@@ -160,7 +162,7 @@ process (GeglOperation *operation,
if (input != NULL ||
aux != NULL)
{
success = klass->process (operation, context_id);
success = klass->process (operation, context_id, result);
}
else
{
......
......@@ -41,7 +41,8 @@ struct _GeglOperationComposerClass
GeglOperationClass parent_class;
gboolean (* process) (GeglOperation *self,
gpointer context_id);
gpointer context_id,
const GeglRectangle *result);
};
GType gegl_operation_composer_get_type (void) G_GNUC_CONST;
......
......@@ -41,7 +41,8 @@ static void set_property (GObject *gobject,
static gboolean process (GeglOperation *operation,
gpointer context_id,
const gchar *output_prop);
const gchar *output_prop,
const GeglRectangle *result);
static void attach (GeglOperation *operation);
static GeglNode *detect (GeglOperation *operation,
......@@ -171,7 +172,8 @@ set_property (GObject *object,
static gboolean
process (GeglOperation *operation,
gpointer context_id,
const gchar *output_prop)
const gchar *output_prop,
const GeglRectangle *result)
{
GeglOperationFilter *gegl_operation_filter;
GeglOperationFilterClass *klass;
......@@ -192,7 +194,7 @@ process (GeglOperation *operation,
input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
if (input != NULL)
{
success = klass->process (operation, context_id);
success = klass->process (operation, context_id, result);
}
else
{
......
......@@ -40,8 +40,9 @@ struct _GeglOperationFilterClass
{
GeglOperationClass parent_class;
gboolean (* process) (GeglOperation *self,
gpointer context_id);
gboolean (* process) (GeglOperation *self,
gpointer context_id,
const GeglRectangle *result);
};
GType gegl_operation_filter_get_type (void) G_GNUC_CONST;
......
......@@ -22,12 +22,12 @@
#include <string.h>
static gboolean process_inner (GeglOperation *operation,
gpointer context_id);
gpointer context_id,
const GeglRectangle *result);
G_DEFINE_TYPE (GeglOperationPointComposer, gegl_operation_point_composer, GEGL_TYPE_OPERATION_COMPOSER)
static void prepare (GeglOperation *operation,
gpointer context_id)
static void prepare (GeglOperation *operation)
{
Babl *format = babl_format ("RGBA float");
gegl_operation_set_format (operation, "input", format);
......@@ -58,15 +58,16 @@ fast_paths (GeglOperation *operation,
gpointer context_id,
Babl *in_format,
Babl *aux_format,
Babl *out_format);
Babl *out_format,
const GeglRectangle *result);
static gboolean
process_inner (GeglOperation *operation,
gpointer context_id)
process_inner (GeglOperation *operation,
gpointer context_id,
const GeglRectangle *result)
{
GeglBuffer *input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
GeglBuffer *aux = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "aux"));
const GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
GeglBuffer *output;
GeglPad *pad;
Babl *in_format;
......@@ -103,7 +104,7 @@ process_inner (GeglOperation *operation,
* good idea. NB! some of the OpenRaster meta ops, depends on the
* short-circuiting happening in fast_paths.
* */
if (fast_paths (operation, context_id, in_format, aux_format, out_format))
if (fast_paths (operation, context_id, in_format, aux_format, out_format, result))
return TRUE;
/* retrieve the buffer we're writing to from GEGL */
......@@ -159,11 +160,11 @@ fast_paths (GeglOperation *operation,
gpointer context_id,
Babl *in_format,
Babl *aux_format,
Babl *out_format)
Babl *out_format,
const GeglRectangle *result)
{
GeglBuffer *input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
GeglBuffer *aux = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "aux"));
const GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
if (!input && aux)
{
......
......@@ -21,12 +21,12 @@
#include <string.h>
static gboolean process_inner (GeglOperation *operation,
gpointer context_id);
gpointer context_id,
const GeglRectangle *result);
G_DEFINE_TYPE (GeglOperationPointFilter, gegl_operation_point_filter, GEGL_TYPE_OPERATION_FILTER)
static void prepare (GeglOperation *operation,
gpointer context_id)
static void prepare (GeglOperation *operation)
{
gegl_operation_set_format (operation, "input", babl_format ("RGBA float"));
gegl_operation_set_format (operation, "output", babl_format ("RGBA float"));
......@@ -49,9 +49,9 @@ gegl_operation_point_filter_init (GeglOperationPointFilter *self)
static gboolean
process_inner (GeglOperation *operation,
gpointer context_id)
gpointer context_id,
const GeglRectangle *result)
{
const GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
GeglBuffer *input;
/* = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));*/
GeglBuffer *output;
......
......@@ -39,7 +39,8 @@ static void set_property (GObject *gobject,
static gboolean process (GeglOperation *operation,
gpointer context_id,
const gchar *output_prop);
const gchar *output_prop,
const GeglRectangle *result);
static void attach (GeglOperation *operation);
static GeglRectangle get_defined_region (GeglOperation *self);
static GeglRectangle compute_input_request (GeglOperation *operation,
......@@ -110,7 +111,8 @@ set_property (GObject *object,
static gboolean
process (GeglOperation *operation,
gpointer context_id,
const gchar *output_prop)
const gchar *output_prop,
const GeglRectangle *result)
{
GeglOperationSink *gegl_operation_sink;
GeglOperationSinkClass *klass;
......@@ -125,7 +127,7 @@ process (GeglOperation *operation,
input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
if (input)
{
success = klass->process (operation, context_id);
success = klass->process (operation, context_id, result);
}
return success;
......
......@@ -44,8 +44,9 @@ struct _GeglOperationSinkClass
gboolean needs_full;
gboolean (* process) (GeglOperation *self,
gpointer context_id);
gboolean (* process) (GeglOperation *self,
gpointer context_id,
const GeglRectangle *result);
};
GType gegl_operation_sink_get_type (void) G_GNUC_CONST;
......
......@@ -37,7 +37,8 @@ static void set_property (GObject *gobject,
GParamSpec *pspec);
static gboolean process (GeglOperation *operation,
gpointer context_id,
const gchar *output_prop);
const gchar *output_prop,
const GeglRectangle *result);
static void attach (GeglOperation *operation);
......@@ -112,7 +113,8 @@ set_property (GObject *object,
static gboolean
process (GeglOperation *operation,
gpointer context_id,
const gchar *output_prop)
const gchar *output_prop,
const GeglRectangle *result)
{
GeglOperationSourceClass *klass = GEGL_OPERATION_SOURCE_GET_CLASS (operation);
gboolean success;
......@@ -124,7 +126,7 @@ process (GeglOperation *operation,
}
g_assert (klass->process);
success = klass->process (operation, context_id);
success = klass->process (operation, context_id, result);
return success;
}
......
......@@ -38,10 +38,10 @@ struct _GeglOperationSource
typedef struct _GeglOperationSourceClass GeglOperationSourceClass;
struct _GeglOperationSourceClass
{
GeglOperationClass parent_class;
gboolean (*process) (GeglOperation *self,
gpointer context_id);
GeglOperationClass parent_class;
gboolean (*process) (GeglOperation *self,
gpointer context_id,
const GeglRectangle *result);
};
GType gegl_operation_source_get_type (void) G_GNUC_CONST;
......
......@@ -98,12 +98,12 @@ gegl_operation_create_pad (GeglOperation *self,
}
gboolean
gegl_operation_process (GeglOperation *operation,
gpointer context_id,
const gchar *output_pad)
gegl_operation_process (GeglOperation *operation,
gpointer context_id,
const gchar *output_pad,
const GeglRectangle *result)
{
GeglOperationClass *klass;
const GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
g_return_val_if_fail (GEGL_IS_OPERATION (operation), FALSE);
......@@ -117,7 +117,7 @@ gegl_operation_process (GeglOperation *operation,
return TRUE;
}
return klass->process (operation, context_id, output_pad);
return klass->process (operation, context_id, output_pad, result);
}
GeglRectangle
......@@ -190,14 +190,14 @@ gegl_operation_calc_source_regions (GeglOperation *operation,
GeglRectangle request;
dynamic = gegl_node_get_dynamic (operation->node, context_id);
request = *gegl_operation_need_rect (operation, context_id);
request = dynamic->need_rect;/**gegl_operation_need_rect (operation, context_id);*/
/* for each input, compute_input_request use gegl_operation_set_source_region() */
for (input_pads = operation->node->input_pads;input_pads;input_pads=input_pads->next)
{
const gchar *pad_name = gegl_pad_get_name (input_pads->data);
GeglRectangle rect;
rect = gegl_operation_compute_input_request (operation, context_id, &request);
rect = gegl_operation_compute_input_request (operation, pad_name, &request);
gegl_operation_set_source_region (operation, context_id, pad_name, &rect);
}
......@@ -243,8 +243,7 @@ gegl_operation_attach (GeglOperation *self,
}
void
gegl_operation_prepare (GeglOperation *self,
gpointer context_id)
gegl_operation_prepare (GeglOperation *self)
{
GeglOperationClass *klass;
......@@ -253,7 +252,7 @@ gegl_operation_prepare (GeglOperation *self,
klass = GEGL_OPERATION_GET_CLASS (self);
if (klass->prepare)
klass->prepare (self, context_id);
klass->prepare (self);
if (klass->tickle)
klass->tickle (self);
}
......@@ -378,62 +377,6 @@ compute_affected_region (GeglOperation *self,
return region;
}
#if 0
static gboolean
calc_source_regions (GeglOperation *self,
gpointer context_id)
{
if (self->node->is_graph)
{
return gegl_operation_calc_source_regions (
gegl_node_get_output_proxy (self->node, "output")->operation,
context_id);
}
g_warning ("Op '%s' has no calc_source_regions method",
G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (self)));
return FALSE;
}
#endif
const GeglRectangle *
gegl_operation_get_requested_region (GeglOperation *operation,
gpointer context_id)
{
GeglNodeDynamic *dynamic = gegl_node_get_dynamic (operation->node, context_id);
g_assert (operation);
g_assert (operation->node);
return &dynamic->need_rect;
}
const GeglRectangle *
gegl_operation_result_rect (GeglOperation *operation,
gpointer context_id)
{
GeglNodeDynamic *dynamic = gegl_node_get_dynamic (operation->node, context_id);
g_assert (operation);
g_assert (operation->node);
return &dynamic->result_rect;
}
/* returns the bounding box of the buffer needed for computation */
const GeglRectangle *
gegl_operation_need_rect (GeglOperation *operation,
gpointer context_id)
{
GeglNodeDynamic *dynamic = gegl_node_get_dynamic (operation->node, context_id);
g_assert (operation);
g_assert (operation->node);
return &dynamic->need_rect;
}
void
gegl_operation_class_set_name (GeglOperationClass *klass,
const gchar *new_name)
......@@ -637,14 +580,17 @@ gegl_operation_get_target (GeglOperation *operation,
GeglPad *pad;
const GeglRectangle *result;
Babl *format;
GeglNodeDynamic *dynamic;
pad = gegl_node_get_pad (operation->node, property_name);
dynamic = gegl_node_get_dynamic (operation->node, context_id);
format = pad->format;
g_assert (format != NULL);
g_assert (format != NULL);
g_assert (!strcmp (property_name, "output"));
g_assert (dynamic);
result = gegl_operation_result_rect (operation, context_id);
result = &dynamic->result_rect;
/* uncomment the following to enable the experimental per node
caching
......@@ -665,6 +611,7 @@ gegl_operation_get_target (GeglOperation *operation,
#else
output = gegl_buffer_new (result, format);
#endif
gegl_operation_set_data (operation, context_id, property_name, G_OBJECT (output));
return output;
}
......@@ -685,21 +632,21 @@ gegl_operation_get_source (GeglOperation *operation,
gpointer context_id,
const gchar *pad_name)
{
GeglBuffer *real_input;
GeglBuffer *input;
GeglRectangle input_request;
GeglBuffer *real_input;
GeglBuffer *input;
GeglRectangle input_request;
GeglNodeDynamic *dynamic;
dynamic = gegl_node_get_dynamic (operation->node, context_id);
input_request = gegl_operation_compute_input_request (operation,
"input",
gegl_operation_need_rect (operation, context_id));
&dynamic->need_rect);
real_input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
input = gegl_buffer_create_sub_buffer (real_input, &input_request);
/* fix up reference counting in such a way that the life (refcount) of
* the buffer object isn't the responsiblity of the calling plug-in?
*/
return input;
}
......
......@@ -74,8 +74,7 @@ struct _GeglOperationClass
/* prepare the node for processing (all properties will be set) override this
* if you are creating a meta operation (using the node as a GeglGraph).
*/
void (*prepare) (GeglOperation *operation,
gpointer context_id);
void (*prepare) (GeglOperation *operation);
/* Returns a bounding rectangle for the data that is defined by this op. (is
* already implemented in GeglOperationPointFilter and
......@@ -112,28 +111,41 @@ struct _GeglOperationClass
gint x,
gint y);
/* do the actual processing needed to put GeglBuffers on the output pad */
gboolean (*process) (GeglOperation *operation,
gpointer context_id,
const gchar *output_pad);
/* XXX: get array of in Gvalues and out Gvalues, filled with buffers? */
/* do the actual processing needed to put GeglBuffers on the output pad
* Replace context_id with an actual object?
*
* GeglOperationData <- per evaluation unique data for operation?
* (or node?)
*
* .. compute_input request?
*
*/
gboolean (*process) (GeglOperation *operation,
/*
GValue **pads,
const gchar **pad_names,
gint n_pads,
const GeglRectangle *result_rect,
const GeglRectangle *requested_rect,
*/
gpointer context_id,
const gchar *output_pad,
const GeglRectangle *result_rect
);
};
/* returns|registers the gtype for GeglOperation */
GType gegl_operation_get_type (void) G_GNUC_CONST;
/* returns the ROI passed to _this_ operation */
const GeglRectangle *
gegl_operation_get_requested_region (GeglOperation *operation,
gpointer context_id);
/* retrieves the bounding box of a connected input */
GeglRectangle * gegl_operation_source_get_defined_region (GeglOperation *operation,
const gchar *pad_name);
/* retrieves the node providing data to a named input pad */
GeglNode * gegl_operation_get_source_node (GeglOperation *operation,
const gchar *pad_name);
/* sets the ROI needed to be computed on one of the sources */
void gegl_operation_set_source_region (GeglOperation *operation,
......@@ -141,6 +153,7 @@ void gegl_operation_set_source_region (GeglOperation *operation,
const gchar *pad_name,
GeglRectangle *region);
#if 0
/* returns the bounding box of the buffer that needs to be computed */
const GeglRectangle * gegl_operation_result_rect (GeglOperation *operation,
gpointer context_id);
......@@ -148,10 +161,15 @@ const GeglRectangle * gegl_operation_result_rect (GeglOperation *operation,
/* returns the bounding box of the buffer needed for computation */
const GeglRectangle * gegl_operation_need_rect (GeglOperation *operation,
gpointer context_id);
#endif
/* virtual method invokers that depends only on the set properties of a
* operation|node
*/
/* retrieves the node providing data to a named input pad */
GeglNode * gegl_operation_get_source_node (GeglOperation *operation,
const gchar *pad_name);
GeglRectangle gegl_operation_compute_affected_region (GeglOperation *operation,
const gchar *input_pad,
GeglRectangle region);
......@@ -174,11 +192,11 @@ GeglNode *gegl_operation_detect (GeglOperation *operation,
void gegl_operation_attach (GeglOperation *operation,
GeglNode *node);
void gegl_operation_prepare (GeglOperation *operation,
gpointer context_id);
void gegl_operation_prepare (GeglOperation *operation);
gboolean gegl_operation_process (GeglOperation *operation,
gpointer context_id,
const gchar *output_pad);
const gchar *output_pad,
const GeglRectangle *result_rect);
/* retrieve the buffer that we are going to write into, it will be of the
......@@ -204,7 +222,8 @@ void gegl_operation_class_set_name (GeglOperationClass *operati
/* create a pad for a specified property for this operation, this method is
* to be called from the attach method of operations, most operations do not
* have to care about this since a super class will do it for them.
* have to care about this since a super class like filter, sink, source or
* composer already does so.
*/
void gegl_operation_create_pad (GeglOperation *operation,
GParamSpec *param_spec);
......@@ -224,9 +243,9 @@ GType gegl_operation_gtype_from_name (const gchar *name);
/* set a dynamic named instance for this node, this function takes over ownership
* of the reference (mostly used to set the "output" GeglBuffer) for operations
/* set a dynamic named instance for this node, this function takes over
* ownership of the reference (should only be used for internal GeglOperation
* implementations that override caching behaviour, use with care)
*/
void gegl_operation_set_data (GeglOperation *operation,
gpointer context_id,
......@@ -246,23 +265,15 @@ GObject * gegl_operation_get_data (GeglOperation *operation,
const gchar *property_name);
GeglBuffer * gegl_operation_get_source (GeglOperation *operation,
gpointer context_id,
const gchar *pad_name);
gboolean
gegl_operation_calc_source_regions (GeglOperation *operation,
gpointer context_id);
gboolean gegl_operation_calc_source_regions (GeglOperation *operation,
gpointer context_id);
void
gegl_operation_vector_prop_changed (GeglVector *vector,
GeglOperation *operation);
void gegl_operation_vector_prop_changed (GeglVector *vector,