[gegl] stretch-contrast: implement get_cached_region
- From: Michael Henning <mhenning src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] stretch-contrast: implement get_cached_region
- Date: Sat, 12 Jan 2013 02:58:20 +0000 (UTC)
commit e72e6c03aa3be296affb80e95dd5fc16cb5d50ca
Author: Michael Henning <drawoc darkrefraction com>
Date: Sat Dec 22 12:55:23 2012 -0500
stretch-contrast: implement get_cached_region
operations/common/stretch-contrast.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/operations/common/stretch-contrast.c b/operations/common/stretch-contrast.c
index de769f8..e442424 100644
--- a/operations/common/stretch-contrast.c
+++ b/operations/common/stretch-contrast.c
@@ -70,7 +70,7 @@ static void prepare (GeglOperation *operation)
}
static GeglRectangle
-get_required_for_output (GeglOperation *operation,
+get_required_for_output (GeglOperation *operation,
const gchar *input_pad,
const GeglRectangle *roi)
{
@@ -78,6 +78,14 @@ get_required_for_output (GeglOperation *operation,
return result;
}
+static GeglRectangle
+get_cached_region (GeglOperation *operation,
+ const GeglRectangle *roi)
+{
+ GeglRectangle result = *gegl_operation_source_get_bounding_box (operation, "input");
+ return result;
+}
+
static gboolean
process (GeglOperation *operation,
GeglBuffer *input,
@@ -141,6 +149,7 @@ gegl_chant_class_init (GeglChantClass *klass)
filter_class->process = process;
operation_class->prepare = prepare;
operation_class->get_required_for_output = get_required_for_output;
+ operation_class->get_cached_region = get_cached_region;
gegl_operation_class_set_keys (operation_class,
"name" , "gegl:stretch-contrast",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]