[gegl] maze: pass-through on infinite planes (issue #179)
- From: Thomas Manni <tmanni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] maze: pass-through on infinite planes (issue #179)
- Date: Tue, 30 Jul 2019 19:28:48 +0000 (UTC)
commit 32829d10d88dc0fdcf1d65e585ac4d324e6b87fd
Author: Thomas Manni <thomas manni free fr>
Date: Tue Jul 30 21:25:50 2019 +0200
maze: pass-through on infinite planes (issue #179)
operations/common-gpl3+/maze.c | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
---
diff --git a/operations/common-gpl3+/maze.c b/operations/common-gpl3+/maze.c
index b7cdb5c17..eecc0dad7 100644
--- a/operations/common-gpl3+/maze.c
+++ b/operations/common-gpl3+/maze.c
@@ -584,7 +584,8 @@ get_cached_region (GeglOperation *operation,
GeglRectangle *in_rect;
in_rect = gegl_operation_source_get_bounding_box (operation, "input");
- if (in_rect)
+
+ if (in_rect && ! gegl_rectangle_is_infinite_plane (in_rect))
{
result = *in_rect;
}
@@ -776,6 +777,32 @@ process (GeglOperation *operation,
return TRUE;
}
+static gboolean
+operation_process (GeglOperation *operation,
+ GeglOperationContext *context,
+ const gchar *output_prop,
+ const GeglRectangle *result,
+ gint level)
+{
+ GeglOperationClass *operation_class;
+
+ const GeglRectangle *in_rect =
+ gegl_operation_source_get_bounding_box (operation, "input");
+
+ if (in_rect && gegl_rectangle_is_infinite_plane (in_rect))
+ {
+ gpointer in = gegl_operation_context_get_object (context, "input");
+ gegl_operation_context_take_object (context, "output",
+ g_object_ref (G_OBJECT (in)));
+ return TRUE;
+ }
+
+ operation_class = GEGL_OPERATION_CLASS (gegl_op_parent_class);
+
+ return operation_class->process (operation, context, output_prop, result,
+ gegl_operation_context_get_level (context));
+}
+
static void
gegl_op_class_init (GeglOpClass *klass)
{
@@ -787,6 +814,7 @@ gegl_op_class_init (GeglOpClass *klass)
operation_class->get_cached_region = get_cached_region;
operation_class->prepare = prepare;
+ operation_class->process = operation_process;
operation_class->threaded = FALSE;
filter_class->process = process;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]