gimp r24740 - in trunk: . app/gegl
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r24740 - in trunk: . app/gegl
- Date: Mon, 28 Jan 2008 21:49:01 +0000 (GMT)
Author: mitch
Date: Mon Jan 28 21:49:00 2008
New Revision: 24740
URL: http://svn.gnome.org/viewvc/gimp?rev=24740&view=rev
Log:
2008-01-28 Michael Natterer <mitch gimp org>
* app/gegl/gimpoperationtilesink.c
* app/gegl/gimpoperationtilesource.c (process): return FALSE when
there is no tile manager.
Modified:
trunk/ChangeLog
trunk/app/gegl/gimpoperationtilesink.c
trunk/app/gegl/gimpoperationtilesource.c
Modified: trunk/app/gegl/gimpoperationtilesink.c
==============================================================================
--- trunk/app/gegl/gimpoperationtilesink.c (original)
+++ trunk/app/gegl/gimpoperationtilesink.c Mon Jan 28 21:49:00 2008
@@ -191,41 +191,38 @@
const GeglRectangle *result)
{
GimpOperationTileSink *self = GIMP_OPERATION_TILE_SINK (operation);
+ const Babl *format;
+ PixelRegion destPR;
+ guint bpp;
+ gpointer pr;
- if (self->tile_manager)
- {
- const Babl *format;
- PixelRegion destPR;
- guint bpp = tile_manager_bpp (self->tile_manager);
- gpointer pr;
-
- if (self->linear)
- format = gimp_bpp_to_babl_format_linear (bpp);
- else
- format = gimp_bpp_to_babl_format (bpp);
-
- pixel_region_init (&destPR, self->tile_manager,
- result->x, result->y,
- result->width, result->height,
- TRUE);
-
- for (pr = pixel_regions_register (1, &destPR);
- pr;
- pr = pixel_regions_process (pr))
- {
- GeglRectangle rect = { destPR.x, destPR.y, destPR.w, destPR.h };
-
- gegl_buffer_get (input,
- 1.0, &rect, format, destPR.data, destPR.rowstride);
- }
+ if (! self->tile_manager)
+ return FALSE;
- g_signal_emit (operation, tile_sink_signals[DATA_WRITTEN], 0,
- result);
- }
+ bpp = tile_manager_bpp (self->tile_manager);
+
+ if (self->linear)
+ format = gimp_bpp_to_babl_format_linear (bpp);
else
+ format = gimp_bpp_to_babl_format (bpp);
+
+ pixel_region_init (&destPR, self->tile_manager,
+ result->x, result->y,
+ result->width, result->height,
+ TRUE);
+
+ for (pr = pixel_regions_register (1, &destPR);
+ pr;
+ pr = pixel_regions_process (pr))
{
- g_warning ("no tilemanager?");
+ GeglRectangle rect = { destPR.x, destPR.y, destPR.w, destPR.h };
+
+ gegl_buffer_get (input,
+ 1.0, &rect, format, destPR.data, destPR.rowstride);
}
+ g_signal_emit (operation, tile_sink_signals[DATA_WRITTEN], 0,
+ result);
+
return TRUE;
}
Modified: trunk/app/gegl/gimpoperationtilesource.c
==============================================================================
--- trunk/app/gegl/gimpoperationtilesource.c (original)
+++ trunk/app/gegl/gimpoperationtilesource.c Mon Jan 28 21:49:00 2008
@@ -220,28 +220,27 @@
const GeglRectangle *result)
{
GimpOperationTileSource *self = GIMP_OPERATION_TILE_SOURCE (operation);
-
- if (self->tile_manager)
+ const Babl *format;
+ PixelRegion srcPR;
+ gpointer pr;
+
+ if (! self->tile_manager)
+ return FALSE;
+
+ format = gegl_operation_get_format (operation, "output");
+
+ pixel_region_init (&srcPR, self->tile_manager,
+ result->x, result->y,
+ result->width, result->height,
+ FALSE);
+
+ for (pr = pixel_regions_register (1, &srcPR);
+ pr;
+ pr = pixel_regions_process (pr))
{
- const Babl *format;
- PixelRegion srcPR;
- gpointer pr;
-
- format = gegl_operation_get_format (operation, "output");
-
- pixel_region_init (&srcPR, self->tile_manager,
- result->x, result->y,
- result->width, result->height,
- FALSE);
-
- for (pr = pixel_regions_register (1, &srcPR);
- pr;
- pr = pixel_regions_process (pr))
- {
- GeglRectangle rect = { srcPR.x, srcPR.y, srcPR.w, srcPR.h };
+ GeglRectangle rect = { srcPR.x, srcPR.y, srcPR.w, srcPR.h };
- gegl_buffer_set (output, &rect, format, srcPR.data, srcPR.rowstride);
- }
+ gegl_buffer_set (output, &rect, format, srcPR.data, srcPR.rowstride);
}
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]