diff options
author | Graham Linden <graham@lindenlab.com> | 2019-05-29 08:17:34 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-05-29 08:17:34 -0700 |
commit | baa1c7f6d7293ddb5caf56912a574cff45d5e002 (patch) | |
tree | 6a4f1c6c0f88c81592b1ba86e0e18dda3c622d18 /indra/newview/lltexturecache.cpp | |
parent | 5ad28c1f151cdd9711d4b0003d67af48cd260f08 (diff) |
SL-11073
Make tex cache not check size logic while performing validation.
Diffstat (limited to 'indra/newview/lltexturecache.cpp')
-rw-r--r-- | indra/newview/lltexturecache.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index e5af47ab6c..c02105f82c 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1733,28 +1733,27 @@ void LLTextureCache::purgeTextures(bool validate) iter != time_idx_set.end(); ++iter) { S32 idx = iter->second; - bool purge_entry = false; - std::string filename = getTextureFileName(entries[idx].mID); - if (cache_size >= purged_cache_size) - { - purge_entry = true; - } - else if (validate) + bool purge_entry = false; + if (validate) { // make sure file exists and is the correct size U32 uuididx = entries[idx].mID.mData[0]; if (uuididx == validate_idx) { + std::string filename = getTextureFileName(entries[idx].mID); LL_DEBUGS("TextureCache") << "Validating: " << filename << "Size: " << entries[idx].mBodySize << LL_ENDL; S32 bodysize = LLAPRFile::size(filename, getLocalAPRFilePool()); if (bodysize != entries[idx].mBodySize) { - LL_WARNS("TextureCache") << "TEXTURE CACHE BODY HAS BAD SIZE: " << bodysize << " != " << entries[idx].mBodySize - << filename << LL_ENDL; + LL_WARNS("TextureCache") << "TEXTURE CACHE BODY HAS BAD SIZE: " << bodysize << " != " << entries[idx].mBodySize << filename << LL_ENDL; purge_entry = true; } } } + else if (cache_size >= purged_cache_size) + { + purge_entry = true; + } else { break; @@ -1763,6 +1762,7 @@ void LLTextureCache::purgeTextures(bool validate) if (purge_entry) { purge_count++; + std::string filename = getTextureFileName(entries[idx].mID); LL_DEBUGS("TextureCache") << "PURGING: " << filename << LL_ENDL; cache_size -= entries[idx].mBodySize; removeEntry(idx, entries[idx], filename) ; |