[gegl] gegl: add gegl_operation_get_source_space
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl: add gegl_operation_get_source_space
- Date: Wed, 4 Jul 2018 18:02:42 +0000 (UTC)
commit 9cc17e1578d5598a73cdfe032aff0efb29abc1d8
Author: Øyvind Kolås <pippin gimp org>
Date: Wed Jul 4 19:43:11 2018 +0200
gegl: add gegl_operation_get_source_space
For use in prepare when rigging up babl formats aware of BablSpace
the buffer flowing through the graph has.
gegl/operation/gegl-operation.c | 9 +++++++++
gegl/operation/gegl-operation.h | 3 +++
2 files changed, 12 insertions(+)
---
diff --git a/gegl/operation/gegl-operation.c b/gegl/operation/gegl-operation.c
index cb058b557..cc772d0ba 100644
--- a/gegl/operation/gegl-operation.c
+++ b/gegl/operation/gegl-operation.c
@@ -857,3 +857,12 @@ void gegl_operation_progress (GeglOperation *operation,
if (operation->node)
gegl_node_progress (operation->node, progress, message);
}
+
+const Babl *
+gegl_operation_get_source_space (GeglOperation *operation, const char *in_pad)
+{
+ const Babl *source_format = gegl_operation_get_source_format (operation, "input");
+ if (source_format)
+ return babl_format_get_space (source_format);
+ return NULL;
+}
diff --git a/gegl/operation/gegl-operation.h b/gegl/operation/gegl-operation.h
index e8bf96aa8..f6942c969 100644
--- a/gegl/operation/gegl-operation.h
+++ b/gegl/operation/gegl-operation.h
@@ -298,6 +298,9 @@ guchar *gegl_temp_buffer (int no, int min_size);
void gegl_operation_progress (GeglOperation *operation, gdouble progress, gchar *message);
+const Babl *gegl_operation_get_source_space (GeglOperation *operation, const char *in_pad);
+
+
G_END_DECLS
/***
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]