diff options
Diffstat (limited to 'indra/newview/llvocache.h')
-rw-r--r-- | indra/newview/llvocache.h | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h index 55a13d934d..f41e9301ca 100644 --- a/indra/newview/llvocache.h +++ b/indra/newview/llvocache.h @@ -33,10 +33,24 @@ #include "llvieweroctree.h" #include "llapr.h" +#include <unordered_map> + //--------------------------------------------------------------------------- // Cache entries class LLCamera; +class LLGLTFOverrideCacheEntry +{ +public: + bool fromLLSD(const LLSD& data); + LLSD toLLSD(); + + LLUUID mObjectId; + std::map<S32, std::string> mSides; //json per side + U64 mRegionHandle; + bool mHasRegionHandle; +}; + class LLVOCacheEntry : public LLViewerOctreeEntryData { @@ -79,6 +93,13 @@ public: } } }; + + struct ExtrasEntry + { + LLSD extras; + std::string extras_raw; + }; + protected: ~LLVOCacheEntry(); public: @@ -142,7 +163,9 @@ private: public: typedef std::map<U32, LLPointer<LLVOCacheEntry> > vocache_entry_map_t; typedef std::set<LLVOCacheEntry*> vocache_entry_set_t; - typedef std::set<LLVOCacheEntry*, CompareVOCacheEntry> vocache_entry_priority_list_t; + typedef std::set<LLVOCacheEntry*, CompareVOCacheEntry> vocache_entry_priority_list_t; + + typedef std::unordered_map<U32, LLGLTFOverrideCacheEntry> vocache_gltf_overrides_map_t; S32 mLastCameraUpdated; protected: @@ -265,7 +288,10 @@ public: void removeCache(ELLPath location, bool started = false) ; void readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) ; + void readGenericExtrasFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map); + void writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache, bool removal_enabled); + void writeGenericExtrasToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, BOOL dirty_cache, bool removal_enabled); void removeEntry(U64 handle) ; U32 getCacheEntries() { return mNumEntries; } |