Commit ddce2d60 authored by Øyvind Kolås's avatar Øyvind Kolås

%s/get_defined_region/get_bounding_box/g

%s/compute_affected_region/get_required_for_output/g
%s/compute_input_request/get_invalidated_by_change/g
* gegl/gegl-old-chant.h:
* gegl/gegl-plugin.h:
* gegl/graph/gegl-node-context.c:
* gegl/graph/gegl-node.c:
* gegl/operation/gegl-operation-area-filter.c:
* gegl/operation/gegl-operation-composer.c:
* gegl/operation/gegl-operation-filter.c:
* gegl/operation/gegl-operation-sink.c:
* gegl/operation/gegl-operation-source.c:
* gegl/operation/gegl-operation.c:
* gegl/operation/gegl-operation.h:
* gegl/operation/gegl-operations.c:
* gegl/process/gegl-have-visitor.c:
* operations/affine/affine.c:
* operations/color/remap.c:
* operations/color/stretch-contrast.c:
* operations/core/clone.c:
* operations/core/crop.c: 
* operations/core/shift.c:
* operations/enhance/bilateral-filter.c:
* operations/enhance/snn-mean.c:
* operations/io/ff-load.c: 
* operations/io/jpg-load.c:
* operations/io/load-buffer.c:
* operations/io/magick-load.c:
* operations/io/pixbuf.c:
* operations/io/png-load.c:
* operations/io/raw-load.c:
* operations/io/save-pixbuf.c:
* operations/io/svg-load.c:
* operations/render/checkerboard.c:
* operations/render/color.c:
* operations/render/fractal-explorer.c:
* operations/render/introspect.c:
* operations/render/noise.c:
* operations/render/text.c: 
* operations/workshop/box-percentile.c:
* operations/workshop/c2g.c:
* operations/workshop/demosaic-simple.c:
* operations/workshop/disc-percentile.c:
* operations/workshop/gluas.c:
* operations/workshop/hstack.c:
* operations/workshop/kuwahara-max.c:
* operations/workshop/kuwahara-min.c:
* operations/workshop/kuwahara.c:
* operations/workshop/lens-correct.c:
* operations/workshop/line-profile.c:
* operations/workshop/mandelbrot.c:
* operations/workshop/max-envelope.c:
* operations/workshop/min-envelope.c:
* operations/workshop/rawbayer-load.c:
* operations/workshop/snn-percentile.c:
* operations/workshop/stress.c:

svn path=/trunk/; revision=1984
parent 00a309ce
2008-02-09 Øyvind Kolås <pippin@gimp.org>
%s/get_defined_region/get_bounding_box/g
%s/compute_affected_region/get_required_for_output/g
%s/compute_input_request/get_invalidated_by_change/g
* gegl/gegl-old-chant.h:
* gegl/gegl-plugin.h:
* gegl/graph/gegl-node-context.c:
* gegl/graph/gegl-node.c:
* gegl/operation/gegl-operation-area-filter.c:
* gegl/operation/gegl-operation-composer.c:
* gegl/operation/gegl-operation-filter.c:
* gegl/operation/gegl-operation-sink.c:
* gegl/operation/gegl-operation-source.c:
* gegl/operation/gegl-operation.c:
* gegl/operation/gegl-operation.h:
* gegl/operation/gegl-operations.c:
* gegl/process/gegl-have-visitor.c:
* operations/affine/affine.c:
* operations/color/remap.c:
* operations/color/stretch-contrast.c:
* operations/core/clone.c:
* operations/core/crop.c:
* operations/core/shift.c:
* operations/enhance/bilateral-filter.c:
* operations/enhance/snn-mean.c:
* operations/io/ff-load.c:
* operations/io/jpg-load.c:
* operations/io/load-buffer.c:
* operations/io/magick-load.c:
* operations/io/pixbuf.c:
* operations/io/png-load.c:
* operations/io/raw-load.c:
* operations/io/save-pixbuf.c:
* operations/io/svg-load.c:
* operations/render/checkerboard.c:
* operations/render/color.c:
* operations/render/fractal-explorer.c:
* operations/render/introspect.c:
* operations/render/noise.c:
* operations/render/text.c:
* operations/workshop/box-percentile.c:
* operations/workshop/c2g.c:
* operations/workshop/demosaic-simple.c:
* operations/workshop/disc-percentile.c:
* operations/workshop/gluas.c:
* operations/workshop/hstack.c:
* operations/workshop/kuwahara-max.c:
* operations/workshop/kuwahara-min.c:
* operations/workshop/kuwahara.c:
* operations/workshop/lens-correct.c:
* operations/workshop/line-profile.c:
* operations/workshop/mandelbrot.c:
* operations/workshop/max-envelope.c:
* operations/workshop/min-envelope.c:
* operations/workshop/rawbayer-load.c:
* operations/workshop/snn-percentile.c:
* operations/workshop/stress.c:
2008-02-09 Øyvind Kolås <pippin@gimp.org>
* operations/io/pixbuf.c: modified to be capable of receiving varying
......
......@@ -579,7 +579,7 @@ static void class_init (GeglOperationClass *operation_class);
#endif
#ifdef GEGL_CHANT_SOURCE
static GeglRectangle get_defined_region (GeglOperation *self);
static GeglRectangle get_bounding_box (GeglOperation *self);
#endif
static void
......@@ -618,7 +618,7 @@ gegl_chant_class_init (ChantClass * klass)
#endif
#ifdef GEGL_CHANT_SOURCE
operation_class->get_defined_region = get_defined_region;
operation_class->get_bounding_box = get_bounding_box;
#endif
#define M_GEGL_CHANT_SET_NAME_EXTENDED(nam) \
......
......@@ -159,23 +159,23 @@ struct _GeglOperationClass
* (is already implemented in GeglOperationPointFilter and
* GeglOperationPointComposer, GeglOperationAreaFilter base classes.
*/
GeglRectangle (*get_defined_region) (GeglOperation *operation);
GeglRectangle (*get_bounding_box) (GeglOperation *operation);
/* Computes the region in output (same affected rect assumed for all outputs)
* when a given region has changed on an input. Used to aggregate dirt in the
* graph. A default implementation of this, if not provided should probably
* be to report that the entire defined region is dirtied.
*/
GeglRectangle (*compute_affected_region) (GeglOperation *operation,
GeglRectangle (*get_required_for_output) (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *input_region);
/* computes the rectangle needed to be correctly computed in a buffer
* on the named input_pad, for a given result rectangle
*/
GeglRectangle (*compute_input_request) (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi);
GeglRectangle (*get_invalidated_by_change) (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi);
/* Adjust result rect, adapts the rectangle used for computing results.
* (useful for global operations like contrast stretching, as well as
......@@ -207,7 +207,7 @@ struct _GeglOperationClass
GType gegl_operation_get_type (void) G_GNUC_CONST;
/* retrieves the bounding box of a connected input */
GeglRectangle * gegl_operation_source_get_defined_region (GeglOperation *operation,
GeglRectangle * gegl_operation_source_get_bounding_box (GeglOperation *operation,
const gchar *pad_name);
......@@ -219,22 +219,22 @@ void gegl_operation_set_source_region (GeglOperation *operat
/* 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,
const GeglRectangle *input_region);
GeglRectangle gegl_operation_get_defined_region (GeglOperation *operation);
GeglRectangle gegl_operation_adjust_result_region (GeglOperation *operation,
const GeglRectangle *roi);
GeglRectangle gegl_operation_compute_input_request(GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi);
GeglNode *gegl_operation_detect (GeglOperation *operation,
gint x,
gint y);
GeglNode * gegl_operation_get_source_node (GeglOperation *operation,
const gchar *pad_name);
GeglRectangle gegl_operation_get_required_for_output (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *input_region);
GeglRectangle gegl_operation_get_bounding_box (GeglOperation *operation);
GeglRectangle gegl_operation_adjust_result_region (GeglOperation *operation,
const GeglRectangle *roi);
GeglRectangle gegl_operation_get_invalidated_by_change (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi);
GeglNode *gegl_operation_detect (GeglOperation *operation,
gint x,
gint y);
/* virtual method invokers that change behavior based on the roi being computed,
......
......@@ -368,9 +368,8 @@ gegl_node_context_get_source (GeglNodeContext *context,
node = context->node;
operation = node->operation;
input_request = gegl_operation_compute_input_request (operation,
padname,
&context->need_rect);
input_request = gegl_operation_get_invalidated_by_change (
operation, padname, &context->need_rect);
real_input = GEGL_BUFFER (gegl_node_context_get_object (context, padname));
if (!real_input)
......
......@@ -534,7 +534,7 @@ source_invalidated (GeglNode *source,
if (destination->operation)
{
dirty_rect =
gegl_operation_compute_affected_region (destination->operation,
gegl_operation_get_required_for_output (destination->operation,
gegl_pad_get_name (destination_pad),
rect);
}
......
......@@ -33,14 +33,14 @@
#include "buffer/gegl-buffer.h"
static void prepare (GeglOperation *operation);
static GeglRectangle get_defined_region (GeglOperation *operation);
static GeglRectangle compute_input_request (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *region);
static GeglRectangle compute_affected_region (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *input_region);
static void prepare (GeglOperation *operation);
static GeglRectangle get_bounding_box (GeglOperation *operation);
static GeglRectangle get_invalidated_by_change (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *region);
static GeglRectangle get_required_for_output (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *input_region);
G_DEFINE_TYPE (GeglOperationAreaFilter, gegl_operation_area_filter,
GEGL_TYPE_OPERATION_FILTER)
......@@ -51,9 +51,9 @@ gegl_operation_area_filter_class_init (GeglOperationAreaFilterClass *klass)
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
operation_class->prepare = prepare;
operation_class->get_defined_region = get_defined_region;
operation_class->compute_affected_region = compute_affected_region;
operation_class->compute_input_request = compute_input_request;
operation_class->get_bounding_box = get_bounding_box;
operation_class->get_required_for_output = get_required_for_output;
operation_class->get_invalidated_by_change = get_invalidated_by_change;
}
static void
......@@ -72,14 +72,13 @@ static void prepare (GeglOperation *operation)
}
static GeglRectangle
get_defined_region (GeglOperation *operation)
get_bounding_box (GeglOperation *operation)
{
GeglOperationAreaFilter *area = GEGL_OPERATION_AREA_FILTER (operation);
GeglRectangle result = { 0, };
GeglRectangle *in_rect;
in_rect = gegl_operation_source_get_defined_region (operation,
"input");
in_rect = gegl_operation_source_get_bounding_box (operation,"input");
if (!in_rect)
return result;
......@@ -98,15 +97,15 @@ get_defined_region (GeglOperation *operation)
}
static GeglRectangle
compute_input_request (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *region)
get_invalidated_by_change (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *region)
{
GeglOperationAreaFilter *area = GEGL_OPERATION_AREA_FILTER (operation);
GeglRectangle rect;
GeglRectangle defined;
defined = get_defined_region (operation);
defined = get_bounding_box (operation);
gegl_rectangle_intersect (&rect, region, &defined);
if (rect.width != 0 &&
......@@ -122,7 +121,7 @@ compute_input_request (GeglOperation *operation,
}
static GeglRectangle
compute_affected_region (GeglOperation *operation,
get_required_for_output (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *input_region)
{
......
......@@ -56,11 +56,10 @@ static GeglNode*detect (GeglOperation *operation,
gint x,
gint y);
static GeglRectangle get_defined_region (GeglOperation *self);
static GeglRectangle compute_input_request (GeglOperation *self,
const gchar *input_pad,
const GeglRectangle *roi);
static GeglRectangle get_bounding_box (GeglOperation *self);
static GeglRectangle get_invalidated_by_change (GeglOperation *self,
const gchar *input_pad,
const GeglRectangle *roi);
G_DEFINE_TYPE (GeglOperationComposer, gegl_operation_composer,
GEGL_TYPE_OPERATION)
......@@ -78,8 +77,8 @@ gegl_operation_composer_class_init (GeglOperationComposerClass * klass)
operation_class->process = process;
operation_class->attach = attach;
operation_class->detect = detect;
operation_class->get_defined_region = get_defined_region;
operation_class->compute_input_request = compute_input_request;
operation_class->get_bounding_box = get_bounding_box;
operation_class->get_invalidated_by_change = get_invalidated_by_change;
g_object_class_install_property (object_class, PROP_OUTPUT,
g_param_spec_object ("output",
......@@ -188,11 +187,11 @@ process (GeglOperation *operation,
}
static GeglRectangle
get_defined_region (GeglOperation *self)
get_bounding_box (GeglOperation *self)
{
GeglRectangle result = { 0, 0, 0, 0 };
GeglRectangle *in_rect = gegl_operation_source_get_defined_region (self, "input");
GeglRectangle *aux_rect = gegl_operation_source_get_defined_region (self, "aux");
GeglRectangle *in_rect = gegl_operation_source_get_bounding_box (self, "input");
GeglRectangle *aux_rect = gegl_operation_source_get_bounding_box (self, "aux");
if (!in_rect)
{
......@@ -212,9 +211,9 @@ get_defined_region (GeglOperation *self)
}
static GeglRectangle
compute_input_request (GeglOperation *self,
const gchar *input_pad,
const GeglRectangle *roi)
get_invalidated_by_change (GeglOperation *self,
const gchar *input_pad,
const GeglRectangle *roi)
{
GeglRectangle rect = *roi;
return rect;
......
......@@ -58,10 +58,10 @@ static GeglNode *detect (GeglOperation *operation,
gint x,
gint y);
static GeglRectangle get_defined_region (GeglOperation *self);
static GeglRectangle compute_input_request (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi);
static GeglRectangle get_bounding_box (GeglOperation *self);
static GeglRectangle get_invalidated_by_change (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi);
G_DEFINE_TYPE (GeglOperationFilter, gegl_operation_filter, GEGL_TYPE_OPERATION)
......@@ -76,11 +76,11 @@ gegl_operation_filter_class_init (GeglOperationFilterClass * klass)
object_class->set_property = set_property;
object_class->get_property = get_property;
operation_class->process = process;
operation_class->attach = attach;
operation_class->detect = detect;
operation_class->get_defined_region = get_defined_region;
operation_class->compute_input_request = compute_input_request;
operation_class->process = process;
operation_class->attach = attach;
operation_class->detect = detect;
operation_class->get_bounding_box = get_bounding_box;
operation_class->get_invalidated_by_change = get_invalidated_by_change;
g_object_class_install_property (object_class, PROP_OUTPUT,
g_param_spec_object ("output",
......@@ -222,12 +222,12 @@ process (GeglOperation *operation,
}
static GeglRectangle
get_defined_region (GeglOperation *self)
get_bounding_box (GeglOperation *self)
{
GeglRectangle result = { 0, 0, 0, 0 };
GeglRectangle *in_rect;
in_rect = gegl_operation_source_get_defined_region (self, "input");
in_rect = gegl_operation_source_get_bounding_box (self, "input");
if (in_rect)
{
result = *in_rect;
......@@ -237,9 +237,9 @@ get_defined_region (GeglOperation *self)
}
static GeglRectangle
compute_input_request (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi)
get_invalidated_by_change (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi)
{
GeglRectangle result = *roi;
return result;
......
......@@ -43,15 +43,15 @@ static void set_property (GObject *gobject,
const GValue *value,
GParamSpec *pspec);
static gboolean process (GeglOperation *operation,
GeglNodeContext *context,
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,
const gchar *input_pad,
const GeglRectangle *roi);
static gboolean process (GeglOperation *operation,
GeglNodeContext *context,
const gchar *output_prop,
const GeglRectangle *result);
static void attach (GeglOperation *operation);
static GeglRectangle get_bounding_box (GeglOperation *self);
static GeglRectangle get_invalidated_by_change (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi);
G_DEFINE_TYPE (GeglOperationSink, gegl_operation_sink, GEGL_TYPE_OPERATION)
......@@ -70,8 +70,8 @@ gegl_operation_sink_class_init (GeglOperationSinkClass * klass)
operation_class->process = process;
operation_class->attach = attach;
operation_class->get_defined_region = get_defined_region;
operation_class->compute_input_request = compute_input_request;
operation_class->get_bounding_box = get_bounding_box;
operation_class->get_invalidated_by_change = get_invalidated_by_change;
g_object_class_install_property (object_class, PROP_INPUT,
g_param_spec_object ("input",
......@@ -141,12 +141,12 @@ process (GeglOperation *operation,
}
static GeglRectangle
get_defined_region (GeglOperation *self)
get_bounding_box (GeglOperation *self)
{
GeglRectangle result = { 0, 0, 0, 0 };
GeglRectangle *in_rect;
in_rect = gegl_operation_source_get_defined_region (self, "input");
in_rect = gegl_operation_source_get_bounding_box (self, "input");
if (in_rect)
{
result = *in_rect;
......@@ -156,9 +156,9 @@ get_defined_region (GeglOperation *self)
}
static GeglRectangle
compute_input_request (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi)
get_invalidated_by_change (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi)
{
GeglRectangle rect=*roi;
return rect;
......
......@@ -51,12 +51,12 @@ static void attach (GeglOperation *operation);
G_DEFINE_TYPE (GeglOperationSource, gegl_operation_source, GEGL_TYPE_OPERATION)
static GeglRectangle get_defined_region (GeglOperation *self);
static GeglRectangle compute_input_request (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi);
static GeglRectangle adjust_result_region (GeglOperation *operation,
const GeglRectangle *roi);
static GeglRectangle get_bounding_box (GeglOperation *self);
static GeglRectangle get_invalidated_by_change (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi);
static GeglRectangle adjust_result_region (GeglOperation *operation,
const GeglRectangle *roi);
static void
......@@ -72,8 +72,8 @@ gegl_operation_source_class_init (GeglOperationSourceClass * klass)
operation_class->attach = attach;
operation_class->adjust_result_region = adjust_result_region;
operation_class->get_defined_region = get_defined_region;
operation_class->compute_input_request = compute_input_request;
operation_class->get_bounding_box = get_bounding_box;
operation_class->get_invalidated_by_change = get_invalidated_by_change;
g_object_class_install_property (gobject_class, PROP_OUTPUT,
g_param_spec_object ("output",
......@@ -140,7 +140,7 @@ process (GeglOperation *operation,
}
static GeglRectangle
get_defined_region (GeglOperation *self)
get_bounding_box (GeglOperation *self)
{
GeglRectangle result = { 0, 0, 0, 0 };
......@@ -150,9 +150,9 @@ get_defined_region (GeglOperation *self)
}
static GeglRectangle
compute_input_request (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi)
get_invalidated_by_change (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi)
{
return *roi;
}
......
......@@ -36,13 +36,13 @@
static void attach (GeglOperation *self);
static GeglRectangle get_defined_region (GeglOperation *self);
static GeglRectangle compute_affected_region (GeglOperation *self,
const gchar *input_pad,
const GeglRectangle *input_region);
static GeglRectangle compute_input_request (GeglOperation *self,
const gchar *input_pad,
const GeglRectangle *region);
static GeglRectangle get_bounding_box (GeglOperation *self);
static GeglRectangle get_required_for_output (GeglOperation *self,
const gchar *input_pad,
const GeglRectangle *input_region);
static GeglRectangle get_invalidated_by_change (GeglOperation *self,
const gchar *input_pad,
const Geg lRectangle *region);
G_DEFINE_TYPE (GeglOperation, gegl_operation, G_TYPE_OBJECT)
......@@ -54,14 +54,14 @@ gegl_operation_class_init (GeglOperationClass *klass)
* included when doing
* operation lookup by
* name */
klass->description = NULL;
klass->categories = NULL;
klass->attach = attach;
klass->prepare = NULL;
klass->no_cache = FALSE;
klass->get_defined_region = get_defined_region;
klass->compute_affected_region = compute_affected_region;
klass->compute_input_request = compute_input_request;
klass->description = NULL;
klass->categories = NULL;
klass->attach = attach;
klass->prepare = NULL;
klass->no_cache = FALSE;
klass->get_bounding_box = get_bounding_box;
klass->get_required_for_output = get_required_for_output;
klass->get_invalidated_by_change = get_invalidated_by_change;
}
static void
......@@ -123,19 +123,19 @@ gegl_operation_process (GeglOperation *operation,
}
GeglRectangle
gegl_operation_get_defined_region (GeglOperation *self)
gegl_operation_get_bounding_box (GeglOperation *self)
{
GeglOperationClass *klass = GEGL_OPERATION_GET_CLASS (self);
GeglRectangle rect = { 0, 0, 0, 0 };
if (klass->get_defined_region)
return klass->get_defined_region (self);
if (klass->get_bounding_box)
return klass->get_bounding_box (self);
return rect;
}
GeglRectangle
gegl_operation_compute_affected_region (GeglOperation *self,
gegl_operation_get_required_for_output (GeglOperation *self,
const gchar *input_pad,
const GeglRectangle *input_region)
{
......@@ -152,29 +152,29 @@ gegl_operation_compute_affected_region (GeglOperation *self,
input_region->height == 0)
return *input_region;
if (klass->compute_affected_region)
return klass->compute_affected_region (self, input_pad, input_region);
if (klass->get_required_for_output)
return klass->get_required_for_output (self, input_pad, input_region);
return *input_region;
}
static GeglRectangle
compute_input_request (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi)
get_invalidated_by_change (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi)
{
GeglRectangle result = *roi;
if (operation->node->is_graph)
{
return gegl_operation_compute_input_request (operation, input_pad, roi);
return gegl_operation_get_invalidated_by_change (operation, input_pad, roi);
}
return result;
}
GeglRectangle
gegl_operation_compute_input_request (GeglOperation *operation,
gegl_operation_get_invalidated_by_change (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi)
{
......@@ -184,9 +184,9 @@ gegl_operation_compute_input_request (GeglOperation *operation,
roi->height == 0)
return *roi;
g_assert (klass->compute_input_request);
g_assert (klass->get_invalidated_by_change);
return klass->compute_input_request (operation, input_pad, roi);
return klass->get_invalidated_by_change (operation, input_pad, roi);
}
......@@ -267,7 +267,7 @@ gegl_operation_get_source_node (GeglOperation *operation,
}
GeglRectangle *
gegl_operation_source_get_defined_region (GeglOperation *operation,
gegl_operation_source_get_bounding_box (GeglOperation *operation,
const gchar *input_pad_name)
{
GeglNode *node = gegl_operation_get_source_node (operation, input_pad_name);
......@@ -333,13 +333,13 @@ gegl_operation_set_source_region (GeglOperation *operation,
}
static GeglRectangle
get_defined_region (GeglOperation *self)
get_bounding_box (GeglOperation *self)
{
GeglRectangle rect = { 0, 0, 0, 0 };
if (self->node->is_graph)
{
return gegl_operation_get_defined_region (
return gegl_operation_get_bounding_box (
gegl_node_get_output_proxy (self->node, "output")->operation);
}
g_warning ("Op '%s' has no defined_region method",
......@@ -348,13 +348,13 @@ get_defined_region (GeglOperation *self)
}
static GeglRectangle
compute_affected_region (GeglOperation *self,
get_required_for_output (GeglOperation *self,
const gchar *input_pad,
const GeglRectangle *input_region)
{
if (self->node->is_graph)
{
return gegl_operation_compute_affected_region (
return gegl_operation_get_required_for_output (
gegl_node_get_output_proxy (self->node, "output")->operation,
input_pad,
input_region);
......
......@@ -74,23 +74,23 @@ struct _GeglOperationClass
* (is already implemented in GeglOperationPointFilter and
* GeglOperationPointComposer, GeglOperationAreaFilter base classes.
*/
GeglRectangle (*get_defined_region) (GeglOperation *operation);
GeglRectangle (*get_bounding_box) (GeglOperation *operation);
/* Computes the region in output (same affected rect assumed for all outputs)
* when a given region has changed on an input. Used to aggregate dirt in the
* graph. A default implementation of this, if not provided should probably
* be to report that the entire defined region is dirtied.
*/
GeglRectangle (*compute_affected_region) (GeglOperation *operation,
GeglRectangle (*get_required_for_output) (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *input_region);
/* computes the rectangle needed to be correctly computed in a buffer
* on the named input_pad, for a given result rectangle
*/
GeglRectangle (*compute_input_request) (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi);
GeglRectangle (*get_invalidated_by_change) (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi);
/* Adjust result rect, adapts the rectangle used for computing results.
* (useful for global operations like contrast stretching, as well as
......@@ -122,7 +122,7 @@ struct _GeglOperationClass
GType gegl_operation_get_type (void) G_GNUC_CONST;
/* retrieves the bounding box of a connected input */
GeglRectangle * gegl_operation_source_get_defined_region (GeglOperation *operation,
GeglRectangle * gegl_operation_source_get_bounding_box (GeglOperation *operation,
const gchar *pad_name);
......@@ -134,22 +134,22 @@ void gegl_operation_set_source_region (GeglOperation *operat
/* 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,
const GeglRectangle *input_region);
GeglRectangle gegl_operation_get_defined_region (GeglOperation *operation);
GeglRectangle gegl_operation_adjust_result_region (GeglOperation *operation,
const GeglRectangle *roi);
GeglRectangle gegl_operation_compute_input_request(GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi);
GeglNode *gegl_operation_detect (GeglOperation *operation,
gint x,
gint y);
GeglNode * gegl_operation_get_source_node (GeglOperation *operation,
const gchar *pad_name);
GeglRectangle gegl_operation_get_required_for_output (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *