[gegl] gegl_node_invalidated accept NULL as region to invalidate
- From: Øyvind Kolås <ok src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gegl] gegl_node_invalidated accept NULL as region to invalidate
- Date: Sun, 6 Dec 2009 16:49:13 +0000 (UTC)
commit 70b8f04ecd6267cb88fd087966d01d1a97f47480
Author: �yvind Kolås <pippin gimp org>
Date: Sun Dec 6 16:40:53 2009 +0000
gegl_node_invalidated accept NULL as region to invalidate
When passing NULL as the region to invalidate to gegl_node_invalidated
or gegl_operation_invalidated, the entire current have_rect of the
operation will be invalidated.
gegl/graph/gegl-node.c | 4 +++-
gegl/operation/gegl-operation.h | 13 ++++++++++---
2 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/gegl/graph/gegl-node.c b/gegl/graph/gegl-node.c
index fc9e31e..0120d91 100644
--- a/gegl/graph/gegl-node.c
+++ b/gegl/graph/gegl-node.c
@@ -530,7 +530,9 @@ gegl_node_invalidated (GeglNode *node,
gboolean clear_cache)
{
g_return_if_fail (GEGL_IS_NODE (node));
- g_return_if_fail (rect != NULL);
+
+ if (!rect)
+ rect = &node->have_rect;
if (node->cache)
{
diff --git a/gegl/operation/gegl-operation.h b/gegl/operation/gegl-operation.h
index d15953c..d0169e4 100644
--- a/gegl/operation/gegl-operation.h
+++ b/gegl/operation/gegl-operation.h
@@ -217,15 +217,22 @@ GParamSpec ** gegl_list_properties (const gchar *operation_type,
guint *n_properties_p);
+/* invalidate a specific rectangle, indicating the any computation depending
+ * on this roi is now invalid.
+ *
+ * @roi : the region to blank or NULL for the nodes current have_rect
+ * @clear_cache: whether any present caches should be zeroed out
+ */
+void gegl_operation_invalidate (GeglOperation *operation,
+ const GeglRectangle *roi,
+ gboolean clear_cache);
+
/* internal utility functions used by gegl, these should not be used
* externally */
gboolean gegl_operation_calc_need_rects (GeglOperation *operation,
gpointer context_id);
void gegl_operation_path_prop_changed (GeglPath *path,
GeglOperation *operation);
-void gegl_operation_invalidate (GeglOperation *operation,
- const GeglRectangle *roi,
- gboolean clear_cache);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]