[gegl] buffer: reintroduce zeroing of scratch buffer allocation
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] buffer: reintroduce zeroing of scratch buffer allocation
- Date: Mon, 19 Oct 2015 12:25:12 +0000 (UTC)
commit 47a52b8f59b973c31d9af7a10859b2340926db8c
Author: Øyvind Kolås <pippin gimp org>
Date: Mon Oct 19 14:04:58 2015 +0200
buffer: reintroduce zeroing of scratch buffer allocation
Without this, valgrind complains about accessing uninitialized memory, this is
pixels around the edges of the scratch buffer - for some babl conversions this
also leads to horizontal/vertical line trails around brushes moving over the
image. Further investigation into whether a manual clearing of this or
avodiding the computations at the edges are faster would be nice.
gegl/buffer/gegl-buffer-access.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-access.c b/gegl/buffer/gegl-buffer-access.c
index 3d083fb..fc7c190 100644
--- a/gegl/buffer/gegl-buffer-access.c
+++ b/gegl/buffer/gegl-buffer-access.c
@@ -1471,7 +1471,7 @@ _gegl_buffer_get_unlocked (GeglBuffer *buffer,
offset = (buf_width + 1) * bpp;
}
- sample_buf = g_malloc (buf_height * buf_width * bpp);
+ sample_buf = g_malloc0 (buf_height * buf_width * bpp);
gegl_buffer_iterate_read_dispatch (buffer, &sample_rect,
(guchar*)sample_buf + offset,
buf_width * bpp,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]