[gegl] map-{absolute, relative}: don't require entire aux region for output
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] map-{absolute, relative}: don't require entire aux region for output
- Date: Wed, 17 May 2017 19:21:25 +0000 (UTC)
commit 4164522310a92b2f4c12efb92e8dc8cd4d3e3c05
Author: Ell <ell_se yahoo com>
Date: Wed May 17 11:13:31 2017 -0400
map-{absolute,relative}: don't require entire aux region for output
We only need the entire input region; for aux, the output region
is enough.
operations/common/map-absolute.c | 7 ++++---
operations/common/map-relative.c | 7 ++++---
2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/operations/common/map-absolute.c b/operations/common/map-absolute.c
index 8e40956..ce80a07 100644
--- a/operations/common/map-absolute.c
+++ b/operations/common/map-absolute.c
@@ -49,9 +49,10 @@ get_required_for_output (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *region)
{
- GeglRectangle result = *gegl_operation_source_get_bounding_box (operation, "input");
-
- return result;
+ if (! strcmp (input_pad, "input"))
+ return *gegl_operation_source_get_bounding_box (operation, "input");
+ else
+ return *region;
}
static gboolean
diff --git a/operations/common/map-relative.c b/operations/common/map-relative.c
index 174bc24..6ad1963 100644
--- a/operations/common/map-relative.c
+++ b/operations/common/map-relative.c
@@ -54,9 +54,10 @@ get_required_for_output (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *region)
{
- GeglRectangle result = *gegl_operation_source_get_bounding_box (operation, "input");
-
- return result;
+ if (! strcmp (input_pad, "input"))
+ return *gegl_operation_source_get_bounding_box (operation, "input");
+ else
+ return *region;
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]