summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturecache.h
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2017-08-09 18:19:28 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2017-08-09 18:19:28 +0300
commit654aead8a1014d095331986a32690920b6d8464a (patch)
tree222521b4173f8961dcb0483279ab7319ac5f49fe /indra/newview/lltexturecache.h
parentaea3a9c18aeaee73daf1afb93120688817e8cb6a (diff)
SL-684 Improve cache version guard
Diffstat (limited to 'indra/newview/lltexturecache.h')
-rw-r--r--indra/newview/lltexturecache.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h
index 6ff4c44568..95f9afc2bc 100644
--- a/indra/newview/lltexturecache.h
+++ b/indra/newview/lltexturecache.h
@@ -46,10 +46,13 @@ class LLTextureCache : public LLWorkerThread
private:
// Entries
+ static const U32 sHeaderEncoderStringSize = 32;
struct EntriesInfo
{
- EntriesInfo() : mVersion(0.f), mEntries(0) {}
+ EntriesInfo() : mVersion(0.f), mAdressSize(0), mEntries(0) { memset(mEncoderVersion, 0, sHeaderEncoderStringSize); }
F32 mVersion;
+ U32 mAdressSize;
+ char mEncoderVersion[sHeaderEncoderStringSize];
U32 mEntries;
};
struct Entry
@@ -156,6 +159,7 @@ private:
LLAPRFile* openHeaderEntriesFile(bool readonly, S32 offset);
void closeHeaderEntriesFile();
void readEntriesHeader();
+ void setEntriesHeader();
void writeEntriesHeader();
S32 openAndReadEntry(const LLUUID& id, Entry& entry, bool create);
bool updateEntry(S32& idx, Entry& entry, S32 new_image_size, S32 new_body_size);
@@ -224,6 +228,8 @@ private:
// Statics
static F32 sHeaderCacheVersion;
+ static U32 sHeaderCacheAddressSize;
+ static std::string sHeaderCacheEncoderVersion;
static U32 sCacheMaxEntries;
static S64 sCacheMaxTexturesSize;
};