diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2010-03-29 12:33:22 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2010-03-29 12:33:22 -0600 |
commit | 5de0c907de836106dbc175978ddfca76a796ff93 (patch) | |
tree | 35c9863a741f2e6121130342d8c641b3030924df | |
parent | b4cb21e9b38bd86eddfd4ebef82283e2865f958b (diff) | |
parent | 8b40230f4157ca9a47bd3615dfe7817750db6c4c (diff) |
Automated merge with ssh://hg.lindenlab.com/q/viewer-trunk
-rw-r--r-- | indra/newview/lltexturecache.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 7a0712f8aa..08bc8220d9 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -852,8 +852,8 @@ bool LLTextureCache::updateTextureEntryList(const LLUUID& id, S32 bodysize) } else if (oldbodysize != entry.mBodySize) { - // TODO: change to llwarns - llerrs << "Entry mismatch in mTextureSizeMap / mHeaderIDMap" + // only happens to 64 bits systems, do not know why. + llwarns << "Entry mismatch in mTextureSizeMap / mHeaderIDMap" << " idx=" << idx << " oldsize=" << oldbodysize << " entrysize=" << entry.mBodySize << llendl; } updateEntry(idx, entry, entry.mImageSize, bodysize); @@ -1221,9 +1221,17 @@ U32 LLTextureCache::openAndReadEntries(std::vector<Entry>& entries) mFreeList.clear(); mTexturesSizeTotal = 0; - LLAPRFile* aprfile = openHeaderEntriesFile(true, 0); - updatedHeaderEntriesFile() ; - aprfile->seek(APR_SET, (S32)sizeof(EntriesInfo)); + LLAPRFile* aprfile = NULL; + if(mUpdatedEntryMap.empty()) + { + aprfile = openHeaderEntriesFile(true, (S32)sizeof(EntriesInfo)); + } + else //update the header file first. + { + aprfile = openHeaderEntriesFile(false, 0); + updatedHeaderEntriesFile() ; + aprfile->seek(APR_SET, (S32)sizeof(EntriesInfo)); + } for (U32 idx=0; idx<num_entries; idx++) { Entry entry; |