From 24a0601a50f81b8f1a21c2c64c118702dd93f645 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 13 Aug 2019 20:19:46 +0300 Subject: DRTVWR-493 Reworked a number of inits --- indra/newview/llvocache.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'indra/newview/llvocache.h') diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h index 594d38249b..41b5246480 100644 --- a/indra/newview/llvocache.h +++ b/indra/newview/llvocache.h @@ -221,9 +221,9 @@ private: // //Note: LLVOCache is not thread-safe // -class LLVOCache : public LLSingleton +class LLVOCache : public LLParamSingleton { - LLSINGLETON(LLVOCache); + LLSINGLETON(LLVOCache, ELLPath location, U32 size, U32 cache_version, bool read_only); ~LLVOCache() ; private: @@ -259,19 +259,18 @@ private: typedef std::map handle_entry_map_t; public: - void initCache(ELLPath location, U32 size, U32 cache_version) ; void removeCache(ELLPath location, bool started = false) ; void readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_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 removeEntry(U64 handle) ; - void setReadOnly(bool read_only) {mReadOnly = read_only;} - U32 getCacheEntries() { return mNumEntries; } U32 getCacheEntriesMax() { return mCacheSize; } private: + void initCache(ELLPath location, U32 size, U32 cache_version); + void setDirNames(ELLPath location); // determine the cache filename for the region from the region handle void getObjectCacheFilename(U64 handle, std::string& filename); -- cgit v1.2.3 From 27d391b2bb068ee38ba36e7b3169058196da9420 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 4 Sep 2019 19:20:52 +0300 Subject: SL-11868 Fix cache init after purge --- indra/newview/llvocache.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llvocache.h') diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h index 41b5246480..6c95541c11 100644 --- a/indra/newview/llvocache.h +++ b/indra/newview/llvocache.h @@ -223,7 +223,7 @@ private: // class LLVOCache : public LLParamSingleton { - LLSINGLETON(LLVOCache, ELLPath location, U32 size, U32 cache_version, bool read_only); + LLSINGLETON(LLVOCache, bool read_only); ~LLVOCache() ; private: @@ -259,6 +259,8 @@ private: typedef std::map handle_entry_map_t; public: + // We need this init to be separate from constructor, since we might construct cache, purge it, then init. + void initCache(ELLPath location, U32 size, U32 cache_version); void removeCache(ELLPath location, bool started = false) ; void readFromCache(U64 handle, const LLUUID& id, LLVOCacheEntry::vocache_entry_map_t& cache_entry_map) ; @@ -269,8 +271,6 @@ public: U32 getCacheEntriesMax() { return mCacheSize; } private: - void initCache(ELLPath location, U32 size, U32 cache_version); - void setDirNames(ELLPath location); // determine the cache filename for the region from the region handle void getObjectCacheFilename(U64 handle, std::string& filename); -- cgit v1.2.3