gegl r2469 - in trunk: . gegl/buffer tests/buffer
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2469 - in trunk: . gegl/buffer tests/buffer
- Date: Sun, 15 Jun 2008 10:58:55 +0000 (UTC)
Author: ok
Date: Sun Jun 15 10:58:54 2008
New Revision: 2469
URL: http://svn.gnome.org/viewvc/gegl?rev=2469&view=rev
Log:
* gegl/buffer/gegl-buffer-linear.c:
(gegl_buffer_linear_new_from_data): added rowstride parameter,
(gegl_buffer_linear_close): added the linear buffer itself as a
parameter. Only the API changed, the logic is not implemented yet.
* gegl/buffer/gegl-buffer-private.h: updated prototypes.
* tests/buffer/buffer-test.c: (linear_modify), (linear_from_data):
updated use of code.
Modified:
trunk/ChangeLog
trunk/gegl/buffer/gegl-buffer-linear.c
trunk/gegl/buffer/gegl-buffer-private.h
trunk/tests/buffer/buffer-test.c
Modified: trunk/gegl/buffer/gegl-buffer-linear.c
==============================================================================
--- trunk/gegl/buffer/gegl-buffer-linear.c (original)
+++ trunk/gegl/buffer/gegl-buffer-linear.c Sun Jun 15 10:58:54 2008
@@ -47,6 +47,7 @@
const Babl *format,
gint width,
gint height,
+ gint rowstride,
GCallback destroy_fn,
gpointer destroy_fn_data)
{
@@ -115,7 +116,9 @@
return NULL;
}
-void gegl_buffer_linear_close (GeglBuffer *buffer)
+void
+gegl_buffer_linear_close (GeglBuffer *buffer,
+ gpointer linear)
{
GeglTile *tile;
tile = g_object_get_data (G_OBJECT (buffer), "linear-tile");
Modified: trunk/gegl/buffer/gegl-buffer-private.h
==============================================================================
--- trunk/gegl/buffer/gegl-buffer-private.h (original)
+++ trunk/gegl/buffer/gegl-buffer-private.h Sun Jun 15 10:58:54 2008
@@ -101,35 +101,35 @@
gboolean gegl_buffer_lock (GeglBuffer *buffer);
gboolean gegl_buffer_unlock (GeglBuffer *buffer);
-GeglBuffer* gegl_buffer_linear_new (const GeglRectangle *extent,
- const Babl *format);
+GeglBuffer *gegl_buffer_linear_new (const GeglRectangle *extent,
+ const Babl *format);
-GeglBuffer * gegl_buffer_linear_new_from_data (const gpointer data,
- const Babl *format,
- gint width,
- gint height,
- /* gint rowstride, FIXME: this should be supported */
- GCallback destroy_fn,
- gpointer destroy_fn_data);
-
-gpointer *gegl_buffer_linear_open (GeglBuffer *buffer,
- gint *width,
- gint *height,
- gint *rowstride);
+GeglBuffer *gegl_buffer_linear_new_from_data (const gpointer data,
+ const Babl *format,
+ gint width,
+ gint height,
+ gint rowstride,
+ GCallback destroy_fn,
+ gpointer destroy_fn_data);
+
+gpointer *gegl_buffer_linear_open (GeglBuffer *buffer,
+ gint *width,
+ gint *height,
+ gint *rowstride);
/* needed if the linear buffer is faked */
-void gegl_buffer_linear_close (GeglBuffer *buffer);
+void gegl_buffer_linear_close (GeglBuffer *buffer,
+ gpointer linear);
-GType
-gegl_sampler_type_from_interpolation (GeglInterpolation interpolation);
+GType gegl_sampler_type_from_interpolation (GeglInterpolation interpolation);
-void gegl_buffer_sampler (GeglBuffer *buffer,
- gdouble x,
- gdouble y,
- gdouble scale,
- gpointer dest,
- const Babl *format,
- gpointer sampler);
+void gegl_buffer_sampler (GeglBuffer *buffer,
+ gdouble x,
+ gdouble y,
+ gdouble scale,
+ gpointer dest,
+ const Babl *format,
+ gpointer sampler);
#endif
Modified: trunk/tests/buffer/buffer-test.c
==============================================================================
--- trunk/tests/buffer/buffer-test.c (original)
+++ trunk/tests/buffer/buffer-test.c Sun Jun 15 10:58:54 2008
@@ -799,7 +799,7 @@
{
buf[i++]= ((x+y)*1.0) / width;
}
- gegl_buffer_linear_close (buffer);
+ gegl_buffer_linear_close (buffer, buf);
}
fill_rect (buffer, &roi, 0.2);
@@ -822,6 +822,7 @@
buffer = gegl_buffer_linear_new_from_data (buf, babl_format ("Y float"),
10, /* width */
10, /* height */
+ 10 * 4,
G_CALLBACK(g_free), /* destroy_notify */
NULL /* destroy_notify_data */);
print_buffer (buffer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]