diff options
| author | Monroe Linden <monroe@lindenlab.com> | 2010-04-19 18:02:56 -0700 |
|---|---|---|
| committer | Monroe Linden <monroe@lindenlab.com> | 2010-04-19 18:02:56 -0700 |
| commit | 41357bb01297ce0977da7a3e2e9308d3c903d3a8 (patch) | |
| tree | cf677aea0a81ecddbb394e64c9bd07db517880af /indra/newview/lltexturecache.cpp | |
| parent | c3fa45282f5bdb0cb7a3fcd680154e88cafde4bb (diff) | |
| parent | 3a7490e492b35d5dc55f6124d2e1acbca3bd4d79 (diff) | |
Automated merge with ssh://hg.lindenlab.com/q/viewer-hotfix
Diffstat (limited to 'indra/newview/lltexturecache.cpp')
| -rw-r--r-- | indra/newview/lltexturecache.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 67b0ca216e..df79725474 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -963,7 +963,7 @@ void LLTextureCache::purgeCache(ELLPath location) LLAPRFile::remove(file_name, getLocalAPRFilePool()); purgeAllTextures(true); - } + } mTexturesDirName = texture_dir ; } @@ -974,14 +974,14 @@ void LLTextureCache::purgeCache(ELLPath location) //is called in the main thread before initCache(...) is called. void LLTextureCache::setReadOnly(BOOL read_only) { - mReadOnly = read_only; + mReadOnly = read_only ; } //called in the main thread. S64 LLTextureCache::initCache(ELLPath location, S64 max_size, BOOL disable_texture_cache) { llassert_always(getPending() == 0) ; //should not start accessing the texture cache before initialized. - + S64 header_size = (max_size * 2) / 10; S64 max_entries = header_size / TEXTURE_CACHE_ENTRY_SIZE; sCacheMaxEntries = (S32)(llmin((S64)sCacheMaxEntries, max_entries)); @@ -1010,6 +1010,7 @@ S64 LLTextureCache::initCache(ELLPath location, S64 max_size, BOOL disable_textu if (!mReadOnly) { LLFile::mkdir(mTexturesDirName); + const char* subdirs = "0123456789abcdef"; for (S32 i=0; i<16; i++) { @@ -1274,8 +1275,8 @@ U32 LLTextureCache::openAndReadEntries(std::vector<Entry>& entries) else //update the header file first. { aprfile = openHeaderEntriesFile(false, 0); - updatedHeaderEntriesFile() ; - aprfile->seek(APR_SET, (S32)sizeof(EntriesInfo)); + updatedHeaderEntriesFile() ; + aprfile->seek(APR_SET, (S32)sizeof(EntriesInfo)); } for (U32 idx=0; idx<num_entries; idx++) { @@ -1498,9 +1499,9 @@ void LLTextureCache::purgeAllTextures(bool purge_directories) } if (purge_directories) { - gDirUtilp->deleteFilesInDir(mTexturesDirName,mask); + gDirUtilp->deleteFilesInDir(mTexturesDirName, mask); LLFile::rmdir(mTexturesDirName); - } + } } mHeaderIDMap.clear(); mTexturesSizeMap.clear(); |
