diff options
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_cache.h')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_cache.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_cache.h b/source/blender/depsgraph/intern/builder/deg_builder_cache.h index bb4e1f5c96a..e04ae3a3727 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_cache.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_cache.h @@ -23,6 +23,8 @@ #pragma once +#include "MEM_guardedalloc.h" + #include "intern/depsgraph_type.h" #include "RNA_access.h" @@ -31,7 +33,8 @@ struct ID; struct PointerRNA; struct PropertyRNA; -namespace DEG { +namespace blender { +namespace deg { class DepsgraphBuilderCache; @@ -44,14 +47,14 @@ class AnimatedPropertyID { AnimatedPropertyID(ID *id, StructRNA *type, const char *property_name); AnimatedPropertyID(ID *id, StructRNA *type, void *data, const char *property_name); - uint32_t hash() const; - - bool operator<(const AnimatedPropertyID &other) const; + uint64_t hash() const; friend bool operator==(const AnimatedPropertyID &a, const AnimatedPropertyID &b); /* Corresponds to PointerRNA.data. */ void *data; const PropertyRNA *property_rna; + + MEM_CXX_CLASS_ALLOC_FUNCS("AnimatedPropertyID"); }; class AnimatedPropertyStorage { @@ -71,9 +74,9 @@ class AnimatedPropertyStorage { /* indexed by PointerRNA.data. */ Set<AnimatedPropertyID> animated_properties_set; -}; -typedef map<ID *, AnimatedPropertyStorage *> AnimatedPropertyStorageMap; + MEM_CXX_CLASS_ALLOC_FUNCS("AnimatedPropertyStorage"); +}; /* Cached data which can be re-used by multiple builders. */ class DepsgraphBuilderCache { @@ -100,7 +103,10 @@ class DepsgraphBuilderCache { return animated_property_storage->isPropertyAnimated(args...); } - AnimatedPropertyStorageMap animated_property_storage_map_; + Map<ID *, AnimatedPropertyStorage *> animated_property_storage_map_; + + MEM_CXX_CLASS_ALLOC_FUNCS("DepsgraphBuilderCache"); }; -} // namespace DEG +} // namespace deg +} // namespace blender |