mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-22 20:41:43 +00:00
modified to match newer API in GEGL.
* app/gegl/gimpoperationtilesink.c: * app/gegl/gimpoperationtilesource.c: modified to match newer API in GEGL. * app/gegl/gegl/gegl-operation-sink.h: * app/gegl/gegl/gegl-operation-source.h: updated from GEGL. svn path=/trunk/; revision=24555
This commit is contained in:
parent
7acc5de91f
commit
9a88941195
|
@ -1,3 +1,12 @@
|
||||||
|
2008-01-07 Øyvind Kolås <pippin@gimp.org>
|
||||||
|
|
||||||
|
* app/gegl/gimpoperationtilesink.c:
|
||||||
|
* app/gegl/gimpoperationtilesource.c: modified to match newer API in
|
||||||
|
GEGL.
|
||||||
|
|
||||||
|
* app/gegl/gegl/gegl-operation-sink.h:
|
||||||
|
* app/gegl/gegl/gegl-operation-source.h: updated from GEGL.
|
||||||
|
|
||||||
2008-01-06 Michael Natterer <mitch@gimp.org>
|
2008-01-06 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/gegl/gegl/buffer/gegl-buffer-types.h
|
* app/gegl/gegl/buffer/gegl-buffer-types.h
|
||||||
|
|
|
@ -45,6 +45,7 @@ struct _GeglOperationSinkClass
|
||||||
|
|
||||||
gboolean (* process) (GeglOperation *self,
|
gboolean (* process) (GeglOperation *self,
|
||||||
GeglNodeContext *context,
|
GeglNodeContext *context,
|
||||||
|
GeglBuffer *input,
|
||||||
const GeglRectangle *result);
|
const GeglRectangle *result);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ struct _GeglOperationSourceClass
|
||||||
|
|
||||||
gboolean (* process) (GeglOperation *self,
|
gboolean (* process) (GeglOperation *self,
|
||||||
GeglNodeContext *context,
|
GeglNodeContext *context,
|
||||||
|
GeglBuffer *output,
|
||||||
const GeglRectangle *result);
|
const GeglRectangle *result);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@ static void gimp_operation_tile_sink_set_property (GObject *object,
|
||||||
|
|
||||||
static gboolean gimp_operation_tile_sink_process (GeglOperation *operation,
|
static gboolean gimp_operation_tile_sink_process (GeglOperation *operation,
|
||||||
GeglNodeContext *context,
|
GeglNodeContext *context,
|
||||||
|
GeglBuffer *input,
|
||||||
const GeglRectangle *result);
|
const GeglRectangle *result);
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,13 +195,13 @@ gimp_operation_tile_sink_set_property (GObject *object,
|
||||||
static gboolean
|
static gboolean
|
||||||
gimp_operation_tile_sink_process (GeglOperation *operation,
|
gimp_operation_tile_sink_process (GeglOperation *operation,
|
||||||
GeglNodeContext *context,
|
GeglNodeContext *context,
|
||||||
|
GeglBuffer *input,
|
||||||
const GeglRectangle *result)
|
const GeglRectangle *result)
|
||||||
{
|
{
|
||||||
GimpOperationTileSink *self = GIMP_OPERATION_TILE_SINK (operation);
|
GimpOperationTileSink *self = GIMP_OPERATION_TILE_SINK (operation);
|
||||||
|
|
||||||
if (self->tile_manager)
|
if (self->tile_manager)
|
||||||
{
|
{
|
||||||
GeglBuffer *input;
|
|
||||||
const Babl *format;
|
const Babl *format;
|
||||||
PixelRegion destPR;
|
PixelRegion destPR;
|
||||||
guint bpp = tile_manager_bpp (self->tile_manager);
|
guint bpp = tile_manager_bpp (self->tile_manager);
|
||||||
|
@ -211,8 +212,6 @@ gimp_operation_tile_sink_process (GeglOperation *operation,
|
||||||
else
|
else
|
||||||
format = gimp_bpp_to_babl_format (bpp);
|
format = gimp_bpp_to_babl_format (bpp);
|
||||||
|
|
||||||
input = gegl_node_context_get_source (context, "input");
|
|
||||||
|
|
||||||
pixel_region_init (&destPR, self->tile_manager,
|
pixel_region_init (&destPR, self->tile_manager,
|
||||||
result->x, result->y,
|
result->x, result->y,
|
||||||
result->width, result->height,
|
result->width, result->height,
|
||||||
|
|
|
@ -61,6 +61,7 @@ static GeglRectangle
|
||||||
|
|
||||||
static gboolean gimp_operation_tile_source_process (GeglOperation *operation,
|
static gboolean gimp_operation_tile_source_process (GeglOperation *operation,
|
||||||
GeglNodeContext *context,
|
GeglNodeContext *context,
|
||||||
|
GeglBuffer *output,
|
||||||
const GeglRectangle *result);
|
const GeglRectangle *result);
|
||||||
|
|
||||||
|
|
||||||
|
@ -199,6 +200,7 @@ gimp_operation_tile_source_get_defined_region (GeglOperation *operation)
|
||||||
static gboolean
|
static gboolean
|
||||||
gimp_operation_tile_source_process (GeglOperation *operation,
|
gimp_operation_tile_source_process (GeglOperation *operation,
|
||||||
GeglNodeContext *context,
|
GeglNodeContext *context,
|
||||||
|
GeglBuffer *output,
|
||||||
const GeglRectangle *result)
|
const GeglRectangle *result)
|
||||||
{
|
{
|
||||||
GimpOperationTileSource *self = GIMP_OPERATION_TILE_SOURCE (operation);
|
GimpOperationTileSource *self = GIMP_OPERATION_TILE_SOURCE (operation);
|
||||||
|
@ -211,12 +213,12 @@ gimp_operation_tile_source_process (GeglOperation *operation,
|
||||||
guint bpp = tile_manager_bpp (self->tile_manager);
|
guint bpp = tile_manager_bpp (self->tile_manager);
|
||||||
gpointer pr;
|
gpointer pr;
|
||||||
|
|
||||||
if (self->linear)
|
if (self->linear) /* FIXME: this should be set in prepare and not process */
|
||||||
format = gimp_bpp_to_babl_format_linear (bpp);
|
format = gimp_bpp_to_babl_format_linear (bpp);
|
||||||
else
|
else
|
||||||
format = gimp_bpp_to_babl_format (bpp);
|
format = gimp_bpp_to_babl_format (bpp);
|
||||||
|
|
||||||
output = gegl_buffer_new (result, format);
|
output = gegl_buffer_new (result, format); /* FIXME: use the passed in buffer */
|
||||||
|
|
||||||
pixel_region_init (&srcPR, self->tile_manager,
|
pixel_region_init (&srcPR, self->tile_manager,
|
||||||
result->x, result->y,
|
result->x, result->y,
|
||||||
|
@ -232,7 +234,9 @@ gimp_operation_tile_source_process (GeglOperation *operation,
|
||||||
gegl_buffer_set (output, &rect, format, srcPR.data, srcPR.rowstride);
|
gegl_buffer_set (output, &rect, format, srcPR.data, srcPR.rowstride);
|
||||||
}
|
}
|
||||||
|
|
||||||
gegl_node_context_set_object (context, "output", G_OBJECT (output));
|
gegl_node_context_set_object (context, "output", G_OBJECT (output)); /* FIXME: should not be needed
|
||||||
|
if using the passed in
|
||||||
|
buffer */
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue