diff options
author | Jacek Antonelli | 2008-08-15 23:45:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:50 -0500 |
commit | 2a4dea528f670b9bb1f77ef27a8a1dd16603d114 (patch) | |
tree | 95c68e362703c9099d571ecbdc6142b1cda1e005 /linden/indra/newview/lltexturecache.cpp | |
parent | Second Life viewer sources 1.20.6 (diff) | |
download | meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.zip meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.gz meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.bz2 meta-impy-2a4dea528f670b9bb1f77ef27a8a1dd16603d114.tar.xz |
Second Life viewer sources 1.20.7
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/lltexturecache.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/linden/indra/newview/lltexturecache.cpp b/linden/indra/newview/lltexturecache.cpp index c31fbba..ab85b32 100644 --- a/linden/indra/newview/lltexturecache.cpp +++ b/linden/indra/newview/lltexturecache.cpp | |||
@@ -1023,8 +1023,8 @@ S64 LLTextureCache::initCache(ELLPath location, S64 max_size, BOOL read_only) | |||
1023 | sCacheMaxTexturesSize = max_size; | 1023 | sCacheMaxTexturesSize = max_size; |
1024 | max_size -= sCacheMaxTexturesSize; | 1024 | max_size -= sCacheMaxTexturesSize; |
1025 | 1025 | ||
1026 | llinfos << "TEXTURE CACHE: Headers: " << sCacheMaxEntries | 1026 | LL_INFOS("TextureCache") << "Headers: " << sCacheMaxEntries |
1027 | << " Textures size: " << sCacheMaxTexturesSize/(1024*1024) << " MB" << llendl; | 1027 | << " Textures size: " << sCacheMaxTexturesSize/(1024*1024) << " MB" << LL_ENDL; |
1028 | 1028 | ||
1029 | setDirNames(location); | 1029 | setDirNames(location); |
1030 | 1030 | ||
@@ -1161,7 +1161,7 @@ void LLTextureCache::purgeTextures(bool validate) | |||
1161 | S32 num_entries = filesize / sizeof(Entry); | 1161 | S32 num_entries = filesize / sizeof(Entry); |
1162 | if (num_entries * (S32)sizeof(Entry) != filesize) | 1162 | if (num_entries * (S32)sizeof(Entry) != filesize) |
1163 | { | 1163 | { |
1164 | llwarns << "Bad cache file: " << mTexturesDirEntriesFileName << " Purging." << llendl; | 1164 | LL_WARNS("TextureCache") << "Bad cache file: " << mTexturesDirEntriesFileName << " Purging." << LL_ENDL; |
1165 | purgeAllTextures(false); | 1165 | purgeAllTextures(false); |
1166 | return; | 1166 | return; |
1167 | } | 1167 | } |
@@ -1175,19 +1175,19 @@ void LLTextureCache::purgeTextures(bool validate) | |||
1175 | (U8*)entries, 0, num_entries*sizeof(Entry)); | 1175 | (U8*)entries, 0, num_entries*sizeof(Entry)); |
1176 | if (bytes_read != filesize) | 1176 | if (bytes_read != filesize) |
1177 | { | 1177 | { |
1178 | llwarns << "Bad cache file (2): " << mTexturesDirEntriesFileName << " Purging." << llendl; | 1178 | LL_WARNS("TextureCache") << "Bad cache file (2): " << mTexturesDirEntriesFileName << " Purging." << LL_ENDL; |
1179 | purgeAllTextures(false); | 1179 | purgeAllTextures(false); |
1180 | return; | 1180 | return; |
1181 | } | 1181 | } |
1182 | 1182 | ||
1183 | llinfos << "TEXTURE CACHE: Reading Entries..." << llendl; | 1183 | LL_DEBUGS("TextureCache") << "TEXTURE CACHE: Reading Entries..." << LL_ENDL; |
1184 | 1184 | ||
1185 | std::map<LLUUID, S32> entry_idx_map; | 1185 | std::map<LLUUID, S32> entry_idx_map; |
1186 | S64 total_size = 0; | 1186 | S64 total_size = 0; |
1187 | for (S32 idx=0; idx<num_entries; idx++) | 1187 | for (S32 idx=0; idx<num_entries; idx++) |
1188 | { | 1188 | { |
1189 | const LLUUID& id = entries[idx].mID; | 1189 | const LLUUID& id = entries[idx].mID; |
1190 | // llinfos << "Entry: " << id << " Size: " << entries[i].mSize << " Time: " << entries[i].mTime << llendl; | 1190 | LL_DEBUGS("TextureCache") << "Entry: " << id << " Size: " << entries[idx].mSize << " Time: " << entries[idx].mTime << LL_ENDL; |
1191 | std::map<LLUUID, S32>::iterator iter = entry_idx_map.find(id); | 1191 | std::map<LLUUID, S32>::iterator iter = entry_idx_map.find(id); |
1192 | if (iter != entry_idx_map.end()) | 1192 | if (iter != entry_idx_map.end()) |
1193 | { | 1193 | { |
@@ -1206,7 +1206,7 @@ void LLTextureCache::purgeTextures(bool validate) | |||
1206 | validate_idx = gSavedSettings.getU32("CacheValidateCounter"); | 1206 | validate_idx = gSavedSettings.getU32("CacheValidateCounter"); |
1207 | U32 next_idx = (++validate_idx) % 256; | 1207 | U32 next_idx = (++validate_idx) % 256; |
1208 | gSavedSettings.setU32("CacheValidateCounter", next_idx); | 1208 | gSavedSettings.setU32("CacheValidateCounter", next_idx); |
1209 | llinfos << "TEXTURE CACHE: Validating: " << validate_idx << llendl; | 1209 | LL_DEBUGS("TextureCache") << "TEXTURE CACHE: Validating: " << validate_idx << LL_ENDL; |
1210 | } | 1210 | } |
1211 | 1211 | ||
1212 | S64 min_cache_size = (sCacheMaxTexturesSize * 9) / 10; | 1212 | S64 min_cache_size = (sCacheMaxTexturesSize * 9) / 10; |
@@ -1230,12 +1230,12 @@ void LLTextureCache::purgeTextures(bool validate) | |||
1230 | S32 uuididx = entries[idx].mID.mData[0]; | 1230 | S32 uuididx = entries[idx].mID.mData[0]; |
1231 | if (uuididx == validate_idx) | 1231 | if (uuididx == validate_idx) |
1232 | { | 1232 | { |
1233 | // llinfos << "Validating: " << filename << "Size: " << entries[idx].mSize << llendl; | 1233 | LL_DEBUGS("TextureCache") << "Validating: " << filename << "Size: " << entries[idx].mSize << LL_ENDL; |
1234 | S32 bodysize = ll_apr_file_size(filename, NULL); | 1234 | S32 bodysize = ll_apr_file_size(filename, NULL); |
1235 | if (bodysize != entries[idx].mSize) | 1235 | if (bodysize != entries[idx].mSize) |
1236 | { | 1236 | { |
1237 | llwarns << "TEXTURE CACHE BODY HAS BAD SIZE: " << bodysize << " != " << entries[idx].mSize | 1237 | LL_WARNS("TextureCache") << "TEXTURE CACHE BODY HAS BAD SIZE: " << bodysize << " != " << entries[idx].mSize |
1238 | << filename << llendl; | 1238 | << filename << LL_ENDL; |
1239 | purge_entry = true; | 1239 | purge_entry = true; |
1240 | } | 1240 | } |
1241 | } | 1241 | } |
@@ -1243,7 +1243,7 @@ void LLTextureCache::purgeTextures(bool validate) | |||
1243 | if (purge_entry) | 1243 | if (purge_entry) |
1244 | { | 1244 | { |
1245 | purge_count++; | 1245 | purge_count++; |
1246 | // llinfos << "PURGING: " << filename << llendl; | 1246 | LL_DEBUGS("TextureCache") << "PURGING: " << filename << LL_ENDL; |
1247 | ll_apr_file_remove(filename, NULL); | 1247 | ll_apr_file_remove(filename, NULL); |
1248 | total_size -= entries[idx].mSize; | 1248 | total_size -= entries[idx].mSize; |
1249 | entries[idx].mSize = 0; | 1249 | entries[idx].mSize = 0; |
@@ -1259,7 +1259,7 @@ void LLTextureCache::purgeTextures(bool validate) | |||
1259 | } | 1259 | } |
1260 | num_entries = next_idx; | 1260 | num_entries = next_idx; |
1261 | 1261 | ||
1262 | llinfos << "TEXTURE CACHE: Writing Entries: " << num_entries << llendl; | 1262 | LL_DEBUGS("TextureCache") << "TEXTURE CACHE: Writing Entries: " << num_entries << LL_ENDL; |
1263 | 1263 | ||
1264 | ll_apr_file_remove(mTexturesDirEntriesFileName, NULL); | 1264 | ll_apr_file_remove(mTexturesDirEntriesFileName, NULL); |
1265 | ll_apr_file_write_ex(mTexturesDirEntriesFileName, NULL, | 1265 | ll_apr_file_write_ex(mTexturesDirEntriesFileName, NULL, |
@@ -1276,7 +1276,7 @@ void LLTextureCache::purgeTextures(bool validate) | |||
1276 | 1276 | ||
1277 | delete[] entries; | 1277 | delete[] entries; |
1278 | 1278 | ||
1279 | llinfos << "TEXTURE CACHE:" | 1279 | LL_INFOS("TextureCache") << "TEXTURE CACHE:" |
1280 | << " PURGED: " << purge_count | 1280 | << " PURGED: " << purge_count |
1281 | << " ENTRIES: " << num_entries | 1281 | << " ENTRIES: " << num_entries |
1282 | << " CACHE SIZE: " << total_size / 1024*1024 << " MB" | 1282 | << " CACHE SIZE: " << total_size / 1024*1024 << " MB" |