gegl r2905 - trunk/gegl/process



Author: martinn
Date: Wed Feb 11 21:23:18 2009
New Revision: 2905
URL: http://svn.gnome.org/viewvc/gegl?rev=2905&view=rev

Log:
When node changes, set GeglOperationContext::cached FALSE

In the gegl_eval_mgr_change_notification() callback, set
GeglOperationContext::cached to FALSE since the buffers needs to be
refreshed.

Modified:
   trunk/gegl/process/gegl-eval-mgr.c

Modified: trunk/gegl/process/gegl-eval-mgr.c
==============================================================================
--- trunk/gegl/process/gegl-eval-mgr.c	(original)
+++ trunk/gegl/process/gegl-eval-mgr.c	Wed Feb 11 21:23:18 2009
@@ -101,10 +101,24 @@
                                    gpointer    user_data)
 {
   GeglEvalMgr *mgr = GEGL_EVAL_MGR (user_data);
+
+  if (mgr->node != NULL)
+    {
+      gpointer              context_id = mgr;
+      GeglOperationContext *context    = gegl_node_get_context (mgr->node,
+                                                                context_id);
+      if (context != NULL)
+        {
+          /* If the node is changed we can't use the cache any longer */
+          context->cached = FALSE;
+        }
+    }
+
   if (mgr->state)
     {
       mgr->state = 1;
     }
+
   return FALSE;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]