Skip to content
  • 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...
    7f24430c