[gegl] buffer: permit gegl_buffer_sample with NULL format
- From: Ãyvind KolÃs <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] buffer: permit gegl_buffer_sample with NULL format
- Date: Tue, 27 Mar 2012 00:22:27 +0000 (UTC)
commit 28a2e849c591c79c86144d8d3f52f3e5d75bf8fe
Author: Ãyvind KolÃs <pippin gimp org>
Date: Tue Mar 27 01:22:18 2012 +0100
buffer: permit gegl_buffer_sample with NULL format
gegl/buffer/gegl-buffer-access.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-access.c b/gegl/buffer/gegl-buffer-access.c
index 6651159..a033e86 100644
--- a/gegl/buffer/gegl-buffer-access.c
+++ b/gegl/buffer/gegl-buffer-access.c
@@ -1106,6 +1106,9 @@ gegl_buffer_sample (GeglBuffer *buffer,
desired_type = gegl_sampler_gtype_from_enum (sampler_type);
+ if (!format)
+ format = buffer->soft_format;
+
/* unset the cached sampler if it dosn't match the needs */
if (buffer->sampler != NULL &&
(!G_TYPE_CHECK_INSTANCE_TYPE (buffer->sampler, desired_type) ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]