gegl r2745 - in trunk: . gegl/buffer
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2745 - in trunk: . gegl/buffer
- Date: Fri, 14 Nov 2008 01:57:56 +0000 (UTC)
Author: ok
Date: Fri Nov 14 01:57:56 2008
New Revision: 2745
URL: http://svn.gnome.org/viewvc/gegl?rev=2745&view=rev
Log:
* gegl/buffer/gegl-buffer-access.c:
(gegl_buffer_clear): replaced for loop with memset.
Modified:
trunk/ChangeLog
trunk/gegl/buffer/gegl-buffer-access.c
Modified: trunk/gegl/buffer/gegl-buffer-access.c
==============================================================================
--- trunk/gegl/buffer/gegl-buffer-access.c (original)
+++ trunk/gegl/buffer/gegl-buffer-access.c Fri Nov 14 01:57:56 2008
@@ -1013,6 +1013,11 @@
sample_buf = g_malloc (buf_width * buf_height * bpp);
gegl_buffer_iterate (buffer, &sample_rect, sample_buf, GEGL_AUTO_ROWSTRIDE, FALSE, format, level);
+#if 1
+ /* slows testing of rendering code speed to much for now and
+ * no time to make a fast implementation
+ */
+
if (BABL (format)->format.type[0] == (BablType *) babl_type ("u8")
&& !(level == 0 && scale > 1.99))
{ /* do box-filter resampling if we're 8bit (which projections are) */
@@ -1033,6 +1038,7 @@
rowstride);
}
else
+#endif
{
resample_nearest (dest_buf,
sample_buf,
@@ -1185,12 +1191,13 @@
pxsize = dst->format->format.bytes_per_pixel;
+ /* FIXME: this can be even further optimized by special casing it so
+ * that fully voided tiles are dropped.
+ */
i = gegl_buffer_iterator_new (dst, dst_rect, dst->format, GEGL_BUFFER_WRITE);
while (gegl_buffer_iterator_next (i))
{
- gint j;
- for (j=0;j<i->length * pxsize;j++)
- ((guchar*)(i->data[0]))[j]=0;
+ memset (((guchar*)(i->data[0])), 0, i->length * pxsize);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]