[gegl] Honor cached_region, needed by some area filters
- From: Daniel Sabo <daniels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Honor cached_region, needed by some area filters
- Date: Thu, 20 Jun 2013 00:57:11 +0000 (UTC)
commit 32867e162ffa9fd5d5c7ea37238c1ae59a2ca9a7
Author: Daniel Sabo <DanielSabo gmail com>
Date: Wed Jun 19 03:40:47 2013 -0700
Honor cached_region, needed by some area filters
Not an optimal solution because it prevents any kind of incremental
processing, but necessary for now to avoid breaking operations that
need to do calculations based on the entire input.
gegl/process/gegl-graph-traversal.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gegl/process/gegl-graph-traversal.c b/gegl/process/gegl-graph-traversal.c
index e9f4695..5895054 100644
--- a/gegl/process/gegl-graph-traversal.c
+++ b/gegl/process/gegl-graph-traversal.c
@@ -271,6 +271,11 @@ gegl_graph_prepare_request (GeglGraphTraversal *path,
}
else
{
+ /* Expand request if the operation has a minimum processing requirement */
+ GeglRectangle full_request = gegl_operation_get_cached_region (operation, request);
+
+ gegl_operation_context_set_need_rect (context, &full_request);
+
/* FIXME: We could trim this down based on the cache, instead of being all or nothing */
gegl_operation_context_set_result_rect (context, request);
@@ -287,7 +292,7 @@ gegl_graph_prepare_request (GeglGraphTraversal *path,
GeglRectangle rect, current_need, new_need;
/* Combine this need rect with any existing request */
- rect = gegl_operation_get_required_for_output (operation, pad_name, request);
+ rect = gegl_operation_get_required_for_output (operation, pad_name, &full_request);
current_need = *gegl_operation_context_get_need_rect (source_context);
gegl_rectangle_bounding_box (&new_need, &rect, ¤t_need);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]