[gegl] graph: prepare graph before getting cache in gegl_node_blit()



commit 50f0cf5095d1d20f476224acbb92340d9f9a5a0b
Author: Ell <ell_se yahoo com>
Date:   Thu Jan 18 09:08:58 2018 -0500

    graph: prepare graph before getting cache in gegl_node_blit()
    
    When gegl_node_blit() is called with GEGL_BLIT_CACHE, prepare the
    graph before getting the node's cache, so that the output format
    of the node is known in gegl_node_get_cache().

 gegl/graph/gegl-node.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/gegl/graph/gegl-node.c b/gegl/graph/gegl-node.c
index bcb46a3..7d07394 100644
--- a/gegl/graph/gegl-node.c
+++ b/gegl/graph/gegl-node.c
@@ -1164,8 +1164,14 @@ gegl_node_blit (GeglNode            *self,
     }
   else if (flags & GEGL_BLIT_CACHE)
     {
-      GeglCache  *cache  = gegl_node_get_cache (self);
-      GeglBuffer *buffer = GEGL_BUFFER (cache);
+      GeglCache  *cache;
+      GeglBuffer *buffer;
+
+      /* make sure we have an output format for the cache */
+      gegl_eval_manager_prepare (gegl_node_get_eval_manager (self));
+
+      cache  = gegl_node_get_cache (self);
+      buffer = GEGL_BUFFER (cache);
 
       if (!(flags & GEGL_BLIT_DIRTY))
         {


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