• Ell's avatar
    operation, graph: add {GeglOperationClass,GeglNode}::cache-policy · 7f24430c
    Ell authored
    Caching of operation output is currently controlled by the
    GeglOperationClass::no_cache field on a per-operation-class basis,
    and by the GeglNode::dont-cache property on a per-node basis.
    However, since these fields are boolean, they prevent us from
    automating the decision of whether an op should be cached, or,
    altenatively, they don't provide sufficient control over this
    decision.
    
    Instead, add a ternary GeglCachePolicy enum, which can be one of
    AUTO, NEVER, or ALWAYS, and add a GeglOperationClass::cache_policy
    field, and a GeglNode::cache-policy property, which use this type.
    When the cache-policy property of a node in NEVER or ALWAYS, its
    result isn't/is cached, respectively; when it's AUTO, the deicision
    depends on the operation:  When the cache_policy field of the
    operation class is NEVER or ALWAYS, the result isn't/is cached,
    respectively; when it's AUTO, the result is cached only if the
    operation implements get_cached_region().  Both of these field are
    set to AUTO by default -- the idea is that we generally don't want
    to implicitly cache results, unless they correspond to a different
    region than the ROI.
    
    The existing dont-cache/no_cache fields are deprecated, but are
    still used for now: when GeglNode::cache-policy is AUTO and
    GeglNode::dont-cache is TRUE, the node isn't cached; when
    GeglOperationClass::cache_policy is AUTO and
    GeglOperationClass::no_cache is TRUE, the operation isn't cached.
    
    Like GeglNode::dont-cache, GeglNode::cache-policy is inherited by
    the node's children.
    7f24430c
Name
Last commit
Last update
..
.gitignore Loading commit data...
Makefile.am Loading commit data...
gegl-cache.c Loading commit data...
gegl-cache.h Loading commit data...
gegl-callback-visitor.c Loading commit data...
gegl-callback-visitor.h Loading commit data...
gegl-connection.c Loading commit data...
gegl-connection.h Loading commit data...
gegl-node-output-visitable.c Loading commit data...
gegl-node-output-visitable.h Loading commit data...
gegl-node-private.h Loading commit data...
gegl-node.c Loading commit data...
gegl-node.h Loading commit data...
gegl-pad.c Loading commit data...
gegl-pad.h Loading commit data...
gegl-region-generic.c Loading commit data...
gegl-region-generic.h Loading commit data...
gegl-region.h Loading commit data...
gegl-visitable.c Loading commit data...
gegl-visitable.h Loading commit data...
gegl-visitor.c Loading commit data...
gegl-visitor.h Loading commit data...