Commit 1b090389 authored by Øyvind Kolås's avatar Øyvind Kolås

replaced calc_source_regions with compute_input_request, renamed

* gegl/gegl-operation.[ch]: replaced calc_source_regions with
compute_input_request, renamed get_affected compute_affected. As well
as the needed refactoring to make processing work with this new, less
coupled version of the roi geometry computation.
* gegl/gegl-node.c: (source_invalidated): get_affected->compute_affected.
* gegl/gegl-operation-area-filter.c: Adapted to new API.
* gegl/gegl-operation-composer.c: ...
* gegl/gegl-operation-filter.c:
* gegl/gegl-operation-sink.c:
* gegl/gegl-operation-source.c:
* operations/affine/affine.c: Adapted to new API.
* operations/blur/box-blur.c: ...
* operations/blur/gaussian-blur.c:
* operations/color/remap.c:
* operations/color/stretch-contrast.c:
* operations/core/crop.c:
* operations/core/shift.c:
* operations/workshop/*.c:

svn path=/trunk/; revision=1508
parent 4547c7f6
2007-05-24 Øyvind Kolås <pippin@gimp.org>
* gegl/gegl-operation.[ch]: replaced calc_source_regions with
compute_input_request, renamed get_affected compute_affected. As well
as the needed refactoring to make processing work with this new, less
coupled version of the roi geometry computation.
* gegl/gegl-node.c: (source_invalidated): get_affected->compute_affected.
* gegl/gegl-operation-area-filter.c: Adapted to new API.
* gegl/gegl-operation-composer.c: ...
* gegl/gegl-operation-filter.c:
* gegl/gegl-operation-sink.c:
* gegl/gegl-operation-source.c:
* operations/affine/affine.c: Adapted to new API.
* operations/blur/box-blur.c: ...
* operations/blur/gaussian-blur.c:
* operations/color/remap.c:
* operations/color/stretch-contrast.c:
* operations/core/crop.c:
* operations/core/shift.c:
* operations/workshop/*.c:
2007-05-24 Étienne Bersac <bersace03@laposte.net>
* operations/workshop/save-pixbuf.c: Added save-pixbuf sink op.
......
......@@ -454,7 +454,7 @@ source_invalidated (GeglNode *source,
if (destination->operation)
{
dirty_rect = gegl_operation_get_affected_region (destination->operation,
dirty_rect = gegl_operation_compute_affected_region (destination->operation,
gegl_pad_get_name (destination_pad), *rect);
}
else
......
......@@ -30,9 +30,10 @@ static void prepare (GeglOperation *operation,
}
static GeglRectangle get_defined_region (GeglOperation *operation);
static gboolean calc_source_regions (GeglOperation *operation,
gpointer context_id);
static GeglRectangle get_affected_region (GeglOperation *operation,
static GeglRectangle compute_input_request(GeglOperation *operation,
const gchar *input_pad,
GeglRectangle *region);
static GeglRectangle compute_affected_region (GeglOperation *operation,
const gchar *input_pad,
GeglRectangle region);
static void
......@@ -42,8 +43,8 @@ gegl_operation_area_filter_class_init (GeglOperationAreaFilterClass *klass)
operation_class->prepare = prepare;
operation_class->get_defined_region = get_defined_region;
operation_class->get_affected_region = get_affected_region;
operation_class->calc_source_regions = calc_source_regions;
operation_class->compute_affected_region = compute_affected_region;
operation_class->compute_input_request = compute_input_request;
}
static void
......@@ -80,31 +81,32 @@ get_defined_region (GeglOperation *operation)
return result;
}
#include "gegl-utils.h"
static gboolean
calc_source_regions (GeglOperation *operation,
gpointer context_id)
static GeglRectangle compute_input_request(GeglOperation *operation,
const gchar *input_pad,
GeglRectangle *region)
{
GeglRectangle rect;
GeglOperationAreaFilter *area = GEGL_OPERATION_AREA_FILTER (operation);
rect = *gegl_operation_get_requested_region (operation, context_id);
GeglRectangle rect;
GeglRectangle defined;
defined = get_defined_region (operation);
gegl_rectangle_intersect (&rect, region, &defined);
if (rect.width != 0 &&
rect.height != 0)
{
rect.x-= area->left;
rect.y-= area->top;
rect.width += area->left + area->right;
rect.height += area->top + area->bottom;
rect.x -= area->left;
rect.y -= area->top;
rect.width += area->left + area->right;
rect.height += area->top + area->bottom;
}
gegl_operation_set_source_region (operation, context_id, "input", &rect);
return TRUE;
return rect;
}
static GeglRectangle
get_affected_region (GeglOperation *operation,
compute_affected_region (GeglOperation *operation,
const gchar *input_pad,
GeglRectangle region)
{
......
......@@ -51,8 +51,9 @@ static GeglNode*detect (GeglOperation *operation,
gint y);
static GeglRectangle get_defined_region (GeglOperation *self);
static gboolean calc_source_regions (GeglOperation *self,
gpointer context_id);
static GeglRectangle compute_input_request (GeglOperation *self,
const gchar *input_pad,
GeglRectangle *roi);
G_DEFINE_TYPE (GeglOperationComposer, gegl_operation_composer, GEGL_TYPE_OPERATION)
......@@ -71,7 +72,7 @@ gegl_operation_composer_class_init (GeglOperationComposerClass * klass)
operation_class->attach = attach;
operation_class->detect = detect;
operation_class->get_defined_region = get_defined_region;
operation_class->calc_source_regions = calc_source_regions;
operation_class->compute_input_request = compute_input_request;
g_object_class_install_property (object_class, PROP_OUTPUT,
g_param_spec_object ("output",
......@@ -197,15 +198,12 @@ get_defined_region (GeglOperation *self)
return result;
}
static gboolean
calc_source_regions (GeglOperation *self,
gpointer context_id)
static GeglRectangle compute_input_request (GeglOperation *self,
const gchar *input_pad,
GeglRectangle *roi)
{
GeglRectangle *need_rect = gegl_operation_get_requested_region (self, context_id);
gegl_operation_set_source_region (self, context_id, "input", need_rect);
gegl_operation_set_source_region (self, context_id, "aux", need_rect);
return TRUE;
GeglRectangle rect = *roi;
return rect;
}
static GeglNode *
......
......@@ -48,8 +48,10 @@ static GeglNode *detect (GeglOperation *operation,
gint y);
static GeglRectangle get_defined_region (GeglOperation *self);
static gboolean calc_source_regions (GeglOperation *self,
gpointer context_id);
static GeglRectangle compute_input_request (GeglOperation *operation,
const gchar *input_pad,
GeglRectangle *roi);
G_DEFINE_TYPE (GeglOperationFilter, gegl_operation_filter, GEGL_TYPE_OPERATION)
......@@ -63,11 +65,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->calc_source_regions = calc_source_regions;
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;
g_object_class_install_property (object_class, PROP_OUTPUT,
g_param_spec_object ("output",
......@@ -218,12 +220,11 @@ get_defined_region (GeglOperation *self)
return result;
}
static gboolean
calc_source_regions (GeglOperation *self,
gpointer context_id)
static GeglRectangle
compute_input_request (GeglOperation *operation,
const gchar *input_pad,
GeglRectangle *roi)
{
GeglRectangle *need_rect = gegl_operation_get_requested_region (self, context_id);
gegl_operation_set_source_region (self, context_id, "input", need_rect);
return TRUE;
GeglRectangle result = *roi;
return result;
}
......@@ -44,9 +44,10 @@ static gboolean process (GeglOperation *operation,
static void attach (GeglOperation *operation);
static GeglRectangle get_defined_region (GeglOperation *self);
static gboolean calc_source_regions (GeglOperation *self,
gpointer context_id);
static GeglRectangle compute_input_request (GeglOperation *operation,
const gchar *input_pad,
GeglRectangle *roi);
G_DEFINE_TYPE (GeglOperationSink, gegl_operation_sink, GEGL_TYPE_OPERATION)
......@@ -62,7 +63,7 @@ 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->calc_source_regions = calc_source_regions;
operation_class->compute_input_request = compute_input_request;
g_object_class_install_property (object_class, PROP_INPUT,
g_param_spec_object ("input",
......@@ -143,12 +144,11 @@ get_defined_region (GeglOperation *self)
return result;
}
static gboolean
calc_source_regions (GeglOperation *self,
gpointer context_id)
static GeglRectangle compute_input_request (GeglOperation *operation,
const gchar *input_pad,
GeglRectangle *roi)
{
GeglRectangle *need_rect = gegl_operation_get_requested_region (self, context_id);
gegl_operation_set_source_region (self, context_id, "input", need_rect);
return TRUE;
GeglRectangle rect=*roi;
g_warning ("I'm a sink, why do you call me?, I have no input and that includes the '%s' you asked for.", input_pad);
return rect;
}
......@@ -47,6 +47,10 @@ G_DEFINE_TYPE (GeglOperationSource, gegl_operation_source, GEGL_TYPE_OPERATION)
static GeglRectangle get_defined_region (GeglOperation *self);
static gboolean calc_source_regions (GeglOperation *self,
gpointer context_id);
static GeglRectangle compute_input_request (GeglOperation *operation,
const gchar *input_pad,
GeglRectangle *roi);
static void
gegl_operation_source_class_init (GeglOperationSourceClass * klass)
......@@ -61,7 +65,7 @@ gegl_operation_source_class_init (GeglOperationSourceClass * klass)
operation_class->attach = attach;
operation_class->get_defined_region = get_defined_region;
operation_class->calc_source_regions = calc_source_regions;
operation_class->compute_input_request = compute_input_request;
g_object_class_install_property (gobject_class, PROP_OUTPUT,
g_param_spec_object ("output",
......@@ -134,9 +138,9 @@ get_defined_region (GeglOperation *self)
return result;
}
static gboolean
calc_source_regions (GeglOperation *self,
gpointer context_id)
static GeglRectangle compute_input_request (GeglOperation *operation,
const gchar *input_pad,
GeglRectangle *roi)
{
return TRUE;
return *roi;
}
......@@ -36,13 +36,14 @@ static void gegl_operation_class_init (GeglOperationClass *klass);
static void gegl_operation_init (GeglOperation *self);
static void attach (GeglOperation *self);
static GeglRectangle get_defined_region (GeglOperation *self);
static GeglRectangle get_affected_region (GeglOperation *self,
const gchar *input_pad,
GeglRectangle region);
static gboolean calc_source_regions (GeglOperation *self,
gpointer context_id);
static void gegl_operation_tickle (GeglOperation *self);
static GeglRectangle get_defined_region (GeglOperation *self);
static GeglRectangle compute_affected_region (GeglOperation *self,
const gchar *input_pad,
GeglRectangle region);
static GeglRectangle compute_input_request (GeglOperation *self,
const gchar *input_pad,
GeglRectangle *region);
static void gegl_operation_tickle (GeglOperation *self);
G_DEFINE_TYPE (GeglOperation, gegl_operation, G_TYPE_OBJECT)
......@@ -57,8 +58,8 @@ gegl_operation_class_init (GeglOperationClass *klass)
klass->prepare = NULL;
klass->tickle = NULL;
klass->get_defined_region = get_defined_region;
klass->get_affected_region = get_affected_region;
klass->calc_source_regions = calc_source_regions;
klass->compute_affected_region = compute_affected_region;
klass->compute_input_request = compute_input_request;
}
static void
......@@ -141,7 +142,7 @@ gegl_operation_get_defined_region (GeglOperation *self)
}
GeglRectangle
gegl_operation_get_affected_region (GeglOperation *self,
gegl_operation_compute_affected_region (GeglOperation *self,
const gchar *input_pad,
GeglRectangle region)
{
......@@ -155,25 +156,71 @@ gegl_operation_get_affected_region (GeglOperation *self,
gegl_operation_tickle (self);
if (klass->get_affected_region)
return klass->get_affected_region (self, input_pad, region);
if (klass->compute_affected_region)
return klass->compute_affected_region (self, input_pad, region);
return region;
}
static GeglRectangle compute_input_request (GeglOperation *operation,
const gchar *input_pad,
GeglRectangle *roi)
{
GeglRectangle result = *roi;
if (operation->node->is_graph)
{
return gegl_operation_compute_input_request (operation, input_pad, roi);
}
return result;
}
GeglRectangle
gegl_operation_compute_input_request (GeglOperation *operation,
const gchar *input_pad,
GeglRectangle *roi)
{
GeglOperationClass *klass;
klass = GEGL_OPERATION_GET_CLASS (operation);
if (roi->width == 0 ||
roi->height == 0)
return *roi;
gegl_operation_tickle (operation);
g_assert (klass->compute_input_request);
return klass->compute_input_request (operation, input_pad, roi);
}
gboolean
gegl_operation_calc_source_regions (GeglOperation *self,
gegl_operation_calc_source_regions (GeglOperation *operation,
gpointer context_id)
{
GeglOperationClass *klass;
GSList *input_pads;
GeglNodeDynamic *dynamic;
GeglRectangle request;
klass = GEGL_OPERATION_GET_CLASS (self);
klass = GEGL_OPERATION_GET_CLASS (operation);
dynamic = gegl_node_get_dynamic (operation->node, context_id);
request = *gegl_operation_need_rect (operation, context_id);
gegl_operation_tickle (self);
gegl_operation_tickle (operation);
if (klass->calc_source_regions)
return klass->calc_source_regions (self, context_id);
return FALSE;
/* 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);
gegl_operation_set_source_region (operation, context_id, pad_name, &rect);
}
return TRUE;
}
static void
......@@ -266,8 +313,8 @@ gegl_operation_set_source_region (GeglOperation *operation,
const gchar *input_pad_name,
GeglRectangle *region)
{
GeglNode *child;
GeglRectangle child_need;
GeglNode *child; /* the node which need rect we are affecting */
GeglRectangle child_need; /* the need rect of the child */
g_assert (operation);
g_assert (operation->node);
......@@ -286,16 +333,13 @@ gegl_operation_set_source_region (GeglOperation *operation,
}
{
GeglNodeDynamic *dynamic = gegl_node_get_dynamic (child, context_id);
gegl_rectangle_bounding_box (&child_need, &dynamic->need_rect, region);
}
GeglNodeDynamic *child_dynamic = gegl_node_get_dynamic (child, context_id);
gegl_rectangle_bounding_box (&child_need, &child_dynamic->need_rect, region);
/* expand the need rect of the node, to include what the calling
* operation needs as well
*/
gegl_node_set_need_rect (child, context_id,
child_need.x, child_need.y,
child_need.width, child_need.height);
gegl_node_set_need_rect (child, context_id,
child_need.x, child_need.y,
child_need.width, child_need.height);
}
}
static GeglRectangle
......@@ -314,13 +358,13 @@ get_defined_region (GeglOperation *self)
}
static GeglRectangle
get_affected_region (GeglOperation *self,
compute_affected_region (GeglOperation *self,
const gchar *input_pad,
GeglRectangle region)
{
if (self->node->is_graph)
{
return gegl_operation_get_affected_region (
return gegl_operation_compute_affected_region (
gegl_node_get_output_proxy (self->node, "output")->operation,
input_pad,
region);
......@@ -328,6 +372,7 @@ get_affected_region (GeglOperation *self,
return region;
}
#if 0
static gboolean
calc_source_regions (GeglOperation *self,
gpointer context_id)
......@@ -343,6 +388,8 @@ calc_source_regions (GeglOperation *self,
G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (self)));
return FALSE;
}
#endif
GeglRectangle *
gegl_operation_get_requested_region (GeglOperation *operation,
......
......@@ -62,47 +62,49 @@ struct _GeglOperationClass
/* attach this operation with a GeglNode, override this if you are creating a
* GeglGraph, it is already defined for Filters/Sources/Composers.
*/
void (*attach) (GeglOperation *self);
void (*attach) (GeglOperation *operation);
/* called as a refresh before any of the region needs getters, used in
* the area base class for instance.
*/
void (*tickle) (GeglOperation *self);
void (*tickle) (GeglOperation *operation);
/* 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 *self,
void (*prepare) (GeglOperation *operation,
gpointer context_id);
/* Returns a bounding rectangle for the data that is defined by this op. (is
* already implemented for GeglOperationPointFilter and
* GeglOperationPointComposer.
* already implemented in GeglOperationPointFilter and
* GeglOperationPointComposer, GeglOperationAreaFilter base classes.
*/
GeglRectangle (*get_defined_region) (GeglOperation *self);
GeglRectangle (*get_defined_region) (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.
*/
GeglRectangle (*get_affected_region) (GeglOperation *self,
GeglRectangle (*compute_affected_region) (GeglOperation *operation,
const gchar *input_pad,
GeglRectangle 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,
GeglRectangle *roi);
/* Returns the node providing data for a specific location
*/
GeglNode* (*detect) (GeglOperation *self,
GeglNode* (*detect) (GeglOperation *operation,
gint x,
gint y);
/* Compute the region of interests on our own sources (and use
* gegl_operation_set_source_region() on each of them).
*/
gboolean (*calc_source_regions) (GeglOperation *self,
gpointer context_id);
/* do the actual processing needed to put GeglBuffers on the output pad */
gboolean (*process) (GeglOperation *self,
gboolean (*process) (GeglOperation *operation,
gpointer context_id,
const gchar *output_pad);
......@@ -119,6 +121,11 @@ GeglRectangle * gegl_operation_get_requested_region (GeglOperation *operation,
GeglRectangle * gegl_operation_source_get_defined_region (GeglOperation *operation,
const gchar *pad_name);
/* compute the rectangles that needs to be computed at the buffers */
gboolean
gegl_operation_calc_source_regions (GeglOperation *self,
gpointer context_id);
/* retrieves the node providing data to a named input pad */
GeglNode * gegl_operation_get_source_node (GeglOperation *operation,
const gchar *pad_name);
......@@ -140,11 +147,16 @@ GeglRectangle * gegl_operation_need_rect (GeglOperation *operation,
/* virtual method invokers that depends only on the set properties of a
* operation|node
*/
GeglRectangle gegl_operation_get_affected_region (GeglOperation *self,
GeglRectangle gegl_operation_compute_affected_region (GeglOperation *operation,
const gchar *input_pad,
GeglRectangle region);
GeglRectangle gegl_operation_get_defined_region (GeglOperation *self);
GeglNode *gegl_operation_detect (GeglOperation *self,
GeglRectangle gegl_operation_get_defined_region (GeglOperation *operation);
GeglRectangle gegl_operation_compute_input_request(GeglOperation *operation,
const gchar *input_pad,
GeglRectangle *roi);
GeglNode *gegl_operation_detect (GeglOperation *operation,
gint x,
gint y);
......@@ -152,13 +164,12 @@ GeglNode *gegl_operation_detect (GeglOperation *self,
/* virtual method invokers that change behavior based on the roi being computed,
* needs a context_id being based that is used for storing dynamic data.
*/
gboolean gegl_operation_calc_source_regions (GeglOperation *self,
gpointer context_id);
void gegl_operation_attach (GeglOperation *self,
void gegl_operation_attach (GeglOperation *operation,
GeglNode *node);
void gegl_operation_prepare (GeglOperation *self,
void gegl_operation_prepare (GeglOperation *operation,
gpointer context_id);
gboolean gegl_operation_process (GeglOperation *self,
gboolean gegl_operation_process (GeglOperation *operation,
gpointer context_id,
const gchar *output_pad);
......@@ -188,20 +199,20 @@ GParamSpec** gegl_list_properties (const gchar *operation_type
guint *n_properties_p);
/* set the name of an operation, transforms all occurences of "_" into "-" */
void gegl_operation_class_set_name (GeglOperationClass *self,
void gegl_operation_class_set_name (GeglOperationClass *operation,
const gchar *name);
/* 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.
*/
void gegl_operation_create_pad (GeglOperation *self,
void gegl_operation_create_pad (GeglOperation *operation,
GParamSpec *param_spec);
/* specify the bablformat for a pad on this operation (XXX: document when
* this is legal, at the moment, only used internally in some ops,. but might
* turn into a global mechanism) */
void gegl_operation_set_format (GeglOperation *self,
void gegl_operation_set_format (GeglOperation *operation,
const gchar *pad_name,
Babl *format);
......
......@@ -63,11 +63,13 @@ static gboolean is_composite_node (OpAffine *affine);
static void get_source_matrix (OpAffine *affine,
Matrix3 output);
static GeglRectangle get_defined_region (GeglOperation *op);
static gboolean calc_source_regions (GeglOperation *op,
gpointer context_id);
static GeglRectangle get_affected_region (GeglOperation *operation,
static GeglRectangle compute_affected_region (GeglOperation *operation,
const gchar *input_pad,
GeglRectangle region);
static GeglRectangle compute_input_request (GeglOperation *self,
const gchar *input_pad,
GeglRectangle *region);
static gboolean process (GeglOperation *op,
gpointer context_id);
static GeglNode * detect (GeglOperation *operation,
......@@ -139,9 +141,9 @@ op_affine_class_init (OpAffineClass *klass)
gobject_class->set_property = set_property;
gobject_class->get_property = get_property;
op_class->get_affected_region = get_affected_region;
op_class->compute_affected_region = compute_affected_region;
op_class->get_defined_region = get_defined_region;
op_class->calc_source_regions = calc_source_regions;
op_class->compute_input_request = compute_input_request;
op_class->detect = detect;
op_class->categories = "transform";
op_class->prepare = prepare;
......@@ -447,9 +449,9 @@ detect (GeglOperation *operation,
return gegl_operation_detect (source_node->operation, need_points[0], need_points[1]);
}
static gboolean
calc_source_regions (GeglOperation *op,
gpointer context_id)
static GeglRectangle compute_input_request (GeglOperation *op,
const gchar *input_pad,
GeglRectangle *region)
{
OpAffine *affine = (OpAffine *) op;
Matrix3 inverse;
......@@ -458,7 +460,7 @@ calc_source_regions (GeglOperation *op,
gdouble need_points [8];
gint i;
requested_rect = *(gegl_operation_get_requested_region (op, context_id));
requested_rect = *region;
matrix3_copy (inverse, affine->matrix);
matrix3_invert (inverse);
......@@ -466,8 +468,7 @@ calc_source_regions (GeglOperation *op,
if (is_intermediate_node (affine) ||
matrix3_is_identity (inverse))
{
gegl_operation_set_source_region (op, context_id, "input", &requested_rect);
return TRUE;
return requested_rect;
}
need_points [0] = requested_rect.x;
......@@ -506,12 +507,11 @@ calc_source_regions (GeglOperation *op,
}
}
gegl_operation_set_source_region (op, context_id, "input", &need_rect);
return TRUE;
return need_rect;
}
static GeglRectangle
get_affected_region (GeglOperation *op,
compute_affected_region (GeglOperation *op,
const gchar *input_pad,
GeglRectangle region)
{
......
......@@ -55,10 +55,13 @@ process (GeglOperation *operation,
input = GEGL_BUFFER (gegl_operation_get_data (operation, context_id, "input"));
{
GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
GeglRectangle *need = gegl_operation_need_rect (operation, context_id);
GeglBuffer *temp_in;
GeglBuffer *temp;
GeglRectangle *result = gegl_operation_result_rect (operation, context_id);
GeglRectangle *need = gegl_operation_need_rect (operation, context_id);
GeglRectangle compute;
GeglBuffer *temp_in;
GeglBuffer *temp;
compute = gegl_operation_compute_input_request (operation, "input", need);
if (self->radius < 0.5)
{
......@@ -68,25 +71,25 @@ process (GeglOperation *operation,
{
temp_in = g_object_new (GEGL_TYPE_BUFFER,
"source", input,
"x", need->x,
"y", need->y,
"width", need->width ,
"height", need->height ,
"x", compute.x,
"y", compute.y,
"width", compute.width ,
"height", compute.height ,
NULL);
temp = g_object_new (GEGL_TYPE_BUFFER,
"format", babl_format ("RaGaBaA float"),
"x", need->x,
"y", need->y,
"width", need->width ,
"height", need->height ,
"x", compute.x,
"y", compute.y,
"width", compute.width ,
"height", compute.height ,
NULL);
output = g_object_new (GEGL_TYPE_BUFFER,
"format", babl_format ("RaGaBaA float"),
"x", need->x,
"y", need->y,
"width", need->width ,
"height", need->height ,
"x", compute.x,
"y", compute.y,
"width", compute.width ,
"height", compute.height ,
NULL);