[gegl] operations: don't process an infinite plane in stretch-contrast
- From: Téo Mazars <teom src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] operations: don't process an infinite plane in stretch-contrast
- Date: Sun, 22 Dec 2013 11:10:36 +0000 (UTC)
commit 7c6acab59bf622c4f7ca4bfcde9a9f708f55946e
Author: Téo Mazars <teomazars gmail com>
Date: Sun Dec 22 12:06:56 2013 +0100
operations: don't process an infinite plane in stretch-contrast
operations/common/stretch-contrast.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/operations/common/stretch-contrast.c b/operations/common/stretch-contrast.c
index de6bc2f..96cce28 100644
--- a/operations/common/stretch-contrast.c
+++ b/operations/common/stretch-contrast.c
@@ -99,6 +99,11 @@ get_required_for_output (GeglOperation *operation,
const GeglRectangle *roi)
{
GeglRectangle result = *gegl_operation_source_get_bounding_box (operation, "input");
+
+ /* Don't request an infinite plane */
+ if (gegl_rectangle_is_infinite_plane (&result))
+ return *GEGL_RECTANGLE (0, 0, 0, 0);
+
return result;
}
@@ -450,6 +455,10 @@ process (GeglOperation *operation,
GeglChantO *o;
gint c;
+ /* Don't process an infinite plane */
+ if (gegl_rectangle_is_infinite_plane (result))
+ return FALSE;
+
if (gegl_cl_is_accelerated ())
if (cl_process (operation, input, output, result))
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]