mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-21 20:12:30 +00:00
synchronised with GEGL headers.
* app/gegl/gegl/gegl-operation-sink.h: * app/gegl/gegl/gegl-operation-source.h: * app/gegl/gegl/gegl-operation.h: synchronised with GEGL headers. * app/gegl/gimpoperationtilesink.c: * app/gegl/gimpoperationtilesource.c: added const GeglRectangle *result to arguments of _process(). svn path=/trunk/; revision=24536
This commit is contained in:
parent
3881c132aa
commit
20e49c0db0
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2008-01-04 Øyvind Kolås <pippin@gimp.org>
|
||||
|
||||
* app/gegl/gegl/gegl-operation-sink.h:
|
||||
* app/gegl/gegl/gegl-operation-source.h:
|
||||
* app/gegl/gegl/gegl-operation.h: synchronised with GEGL headers.
|
||||
|
||||
* app/gegl/gimpoperationtilesink.c:
|
||||
* app/gegl/gimpoperationtilesource.c: added const GeglRectangle
|
||||
*result to arguments of _process().
|
||||
|
||||
2008-01-04 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/config/gimpdisplayconfig.c: changed the default marching ants
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,10 +265,6 @@ 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);
|
||||
|
||||
|
|
|
@ -65,7 +65,9 @@ static void gimp_operation_tile_sink_set_property (GObject *object,
|
|||
GParamSpec *pspec);
|
||||
|
||||
static gboolean gimp_operation_tile_sink_process (GeglOperation *operation,
|
||||
gpointer context_id);
|
||||
gpointer context_id,
|
||||
const GeglRectangle *need,
|
||||
const GeglRectangle *result);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationTileSink, gimp_operation_tile_sink,
|
||||
|
@ -190,8 +192,9 @@ gimp_operation_tile_sink_set_property (GObject *object,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gimp_operation_tile_sink_process (GeglOperation *operation,
|
||||
gpointer context_id)
|
||||
gimp_operation_tile_sink_process (GeglOperation *operation,
|
||||
gpointer context_id,
|
||||
const GeglRectangle *result)
|
||||
{
|
||||
GimpOperationTileSink *self = GIMP_OPERATION_TILE_SINK (operation);
|
||||
|
||||
|
@ -199,13 +202,10 @@ gimp_operation_tile_sink_process (GeglOperation *operation,
|
|||
{
|
||||
GeglBuffer *input;
|
||||
const Babl *format;
|
||||
const GeglRectangle *extent;
|
||||
PixelRegion destPR;
|
||||
const guint bpp = tile_manager_bpp (self->tile_manager);
|
||||
gpointer pr;
|
||||
|
||||
extent = gegl_operation_result_rect (operation, context_id);
|
||||
|
||||
if (self->linear)
|
||||
format = gimp_bpp_to_babl_format_linear (bpp);
|
||||
else
|
||||
|
@ -215,8 +215,8 @@ gimp_operation_tile_sink_process (GeglOperation *operation,
|
|||
"input"));
|
||||
|
||||
pixel_region_init (&destPR, self->tile_manager,
|
||||
extent->x, extent->y,
|
||||
extent->width, extent->height,
|
||||
result->x, result->y,
|
||||
result->width, result->height,
|
||||
TRUE);
|
||||
|
||||
for (pr = pixel_regions_register (1, &destPR);
|
||||
|
@ -230,7 +230,7 @@ gimp_operation_tile_sink_process (GeglOperation *operation,
|
|||
}
|
||||
|
||||
g_signal_emit (operation, tile_sink_signals[DATA_WRITTEN], 0,
|
||||
extent);
|
||||
result);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -59,7 +59,9 @@ static GeglRectangle
|
|||
gimp_operation_tile_source_get_defined_region (GeglOperation *operation);
|
||||
|
||||
static gboolean gimp_operation_tile_source_process (GeglOperation *operation,
|
||||
gpointer context_id);
|
||||
gpointer context_id,
|
||||
const GeglRectangle *need,
|
||||
const GeglRectangle *result);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpOperationTileSource, gimp_operation_tile_source,
|
||||
|
@ -195,8 +197,9 @@ gimp_operation_tile_source_get_defined_region (GeglOperation *operation)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gimp_operation_tile_source_process (GeglOperation *operation,
|
||||
gpointer context_id)
|
||||
gimp_operation_tile_source_process (GeglOperation *operation,
|
||||
gpointer context_id,
|
||||
const GeglRectangle *result)
|
||||
{
|
||||
GimpOperationTileSource *self = GIMP_OPERATION_TILE_SOURCE (operation);
|
||||
|
||||
|
@ -204,23 +207,20 @@ gimp_operation_tile_source_process (GeglOperation *operation,
|
|||
{
|
||||
GeglBuffer *output;
|
||||
const Babl *format;
|
||||
const GeglRectangle *extent;
|
||||
PixelRegion srcPR;
|
||||
const guint bpp = tile_manager_bpp (self->tile_manager);
|
||||
gpointer pr;
|
||||
|
||||
extent = gegl_operation_result_rect (operation, context_id);
|
||||
|
||||
if (self->linear)
|
||||
format = gimp_bpp_to_babl_format_linear (bpp);
|
||||
else
|
||||
format = gimp_bpp_to_babl_format (bpp);
|
||||
|
||||
output = gegl_buffer_new (extent, format);
|
||||
output = gegl_buffer_new (result, format);
|
||||
|
||||
pixel_region_init (&srcPR, self->tile_manager,
|
||||
extent->x, extent->y,
|
||||
extent->width, extent->height,
|
||||
result->x, result->y,
|
||||
result->width, result->height,
|
||||
FALSE);
|
||||
|
||||
for (pr = pixel_regions_register (1, &srcPR);
|
||||
|
|
Loading…
Reference in a new issue