summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturecache.h
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-03-10 10:31:41 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-03-10 10:31:41 +0000
commit8229fdd4902012c2d87cdd0264ad30de5cd7e0fa (patch)
tree83c7138949312de0ba2d89557807ff555f23a907 /indra/newview/lltexturecache.h
parentd6547a9b84695b994eef5425d62d19929478109a (diff)
parentbc852b9a5dcffcec4cbf15b5cc4e571f8970c125 (diff)
merge from viewer-2-0
Diffstat (limited to 'indra/newview/lltexturecache.h')
-rw-r--r--indra/newview/lltexturecache.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h
index 64ec881fc3..b840619c1f 100644
--- a/indra/newview/lltexturecache.h
+++ b/indra/newview/lltexturecache.h
@@ -68,6 +68,7 @@ private:
Entry(const LLUUID& id, S32 imagesize, S32 bodysize, U32 time) :
mID(id), mImageSize(imagesize), mBodySize(bodysize), mTime(time) {}
void init(const LLUUID& id, U32 time) { mID = id, mImageSize = 0; mBodySize = 0; mTime = time; }
+ Entry& operator=(const Entry& entry) {mID = entry.mID, mImageSize = entry.mImageSize; mBodySize = entry.mBodySize; mTime = entry.mTime; return *this;}
LLUUID mID; // 16 bytes
S32 mImageSize; // total size of image if known
S32 mBodySize; // size of body file in body cache
@@ -166,6 +167,8 @@ private:
S32 getHeaderCacheEntry(const LLUUID& id, S32& imagesize);
S32 setHeaderCacheEntry(const LLUUID& id, S32 imagesize);
bool removeHeaderCacheEntry(const LLUUID& id);
+ void writeUpdatedEntries() ;
+ void updatedHeaderEntriesFile() ;
void lockHeaders() { mHeaderMutex.lock(); }
void unlockHeaders() { mHeaderMutex.unlock(); }
@@ -204,6 +207,9 @@ private:
S64 mTexturesSizeTotal;
LLAtomic32<BOOL> mDoPurge;
+ typedef std::map<S32, Entry> idx_entry_map_t;
+ idx_entry_map_t mUpdatedEntryMap;
+
// Statics
static F32 sHeaderCacheVersion;
static U32 sCacheMaxEntries;