[gegl] gegl: add gegl_processor_get_buffer
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl: add gegl_processor_get_buffer
- Date: Sat, 22 Dec 2018 00:33:48 +0000 (UTC)
commit 03df443179a502cc99bea6d2a1fdd089eb1e2be0
Author: Øyvind Kolås <pippin gimp org>
Date: Sat Dec 22 00:29:25 2018 +0100
gegl: add gegl_processor_get_buffer
This returns the GeglNode provided internal cache buffer that results
are being rendered into.
gegl/process/gegl-processor.c | 7 +++++++
gegl/process/gegl-processor.h | 11 +++++++++++
2 files changed, 18 insertions(+)
---
diff --git a/gegl/process/gegl-processor.c b/gegl/process/gegl-processor.c
index dab0567f7..89a4504dc 100644
--- a/gegl/process/gegl-processor.c
+++ b/gegl/process/gegl-processor.c
@@ -819,6 +819,13 @@ void gegl_processor_set_level (GeglProcessor *processor,
processor->level = level;
set_scaled_rectangle (processor);
}
+
+GeglBuffer *gegl_processor_get_buffer (GeglProcessor *processor)
+{
+ return processor?GEGL_BUFFER(gegl_node_get_cache (processor->input)):NULL;
+}
+
+
void gegl_processor_set_scale (GeglProcessor *processor,
gdouble scale)
{
diff --git a/gegl/process/gegl-processor.h b/gegl/process/gegl-processor.h
index 26766951c..a809e12e0 100644
--- a/gegl/process/gegl-processor.h
+++ b/gegl/process/gegl-processor.h
@@ -78,6 +78,17 @@ void gegl_processor_set_rectangle (GeglProcessor *processor,
*/
gboolean gegl_processor_work (GeglProcessor *processor,
gdouble *progress);
+/**
+ * gegl_processor_get_buffer:
+ * @processor: a #GeglProcessor
+ *
+ * Returns the (cache) buffer the processor is rendering into, another way of
+ * getting to the same pixel data is calling gegl_node_blit with flags
+ * indicating that we want caching and accept dirty data.
+ */
+
+GeglBuffer *gegl_processor_get_buffer (GeglProcessor *processor);
+
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]