|
Blender V5.3
|
#include <BLI_cache_mutex.hh>
Public Member Functions | |
| void | ensure (const FunctionRef< void()> compute_cache) |
| void | tag_dirty () |
| bool | is_dirty () const |
| bool | is_cached () const |
Definition at line 72 of file BLI_cache_mutex.hh.
|
inline |
Make sure the cache exists and is up to date. This calls compute_cache once to update the cache (which is stored outside of this class) if it is dirty, otherwise it does nothing.
This function is thread-safe under the assumption that the same parameters are passed from every thread.
Definition at line 85 of file BLI_cache_mutex.hh.
Referenced by blender::nodes::ensure_geometry_nodes_lazy_function_graph(), blender::ensure_inference_usage_cache(), blender::bke::node_tree_runtime::ensure_topology_cache(), blender::fn::FieldInput::field_inputs(), and blender::bke::get_tree_zones().
|
inline |
Return true if the cache exists and is valid.
Definition at line 113 of file BLI_cache_mutex.hh.
Referenced by is_dirty().
|
inline |
Return true if the cache currently does not exist or has been invalidated.
Definition at line 105 of file BLI_cache_mutex.hh.
References is_cached().
Referenced by blender::bke::node_tree_runtime::topology_cache_is_available().
|
inline |
Reset the cache. The next time ensure is called, it will recompute that code.
Definition at line 97 of file BLI_cache_mutex.hh.
Referenced by blender::add_tree_tag(), blender::BKE_layer_collection_sync(), blender::BKE_main_collection_sync_remap(), blender::bke::node_tree_runtime::preprocess_geometry_node_tree_for_evaluation(), and blender::bke::NodeTreeMainUpdater::update_rooted().