summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llmeshrepository.cpp1
-rw-r--r--indra/newview/llviewerregion.cpp40
2 files changed, 20 insertions, 21 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 2a68fbac8d..0a1eadf4d0 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -35,6 +35,7 @@
#include "llappviewer.h"
#include "llbufferstream.h"
#include "llcurl.h"
+#include "lldatapacker.h"
#include "llfasttimer.h"
#include "llfloatermodelpreview.h"
#include "llfloaterperms.h"
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 46cf9a24e9..f835351c04 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1187,34 +1187,32 @@ LLDataPacker *LLViewerRegion::getDP(U32 local_id, U32 crc, U8 &cache_miss_type)
{
//llassert(mCacheLoaded); This assert failes often, changing to early-out -- davep, 2010/10/18
- if (mCacheLoaded)
- {
- LLVOCacheEntry* entry = get_if_there(mCacheMap, local_id, (LLVOCacheEntry*)NULL);
+ LLVOCacheEntry* entry = get_if_there(mImpl->mCacheMap, local_id, (LLVOCacheEntry*)NULL);
- if (entry)
+ if (entry)
+ {
+ // we've seen this object before
+ if (entry->getCRC() == crc)
{
- // we've seen this object before
- if (entry->getCRC() == crc)
- {
- // Record a hit
- entry->recordHit();
- cache_miss_type = CACHE_MISS_TYPE_NONE;
- return entry->getDP(crc);
- }
- else
- {
- // llinfos << "CRC miss for " << local_id << llendl;
- cache_miss_type = CACHE_MISS_TYPE_CRC;
- mCacheMissCRC.put(local_id);
- }
+ // Record a hit
+ entry->recordHit();
+ cache_miss_type = CACHE_MISS_TYPE_NONE;
+ return entry->getDP(crc);
}
else
{
- // llinfos << "Cache miss for " << local_id << llendl;
- cache_miss_type = CACHE_MISS_TYPE_FULL;
- mCacheMissFull.put(local_id);
+ // llinfos << "CRC miss for " << local_id << llendl;
+ cache_miss_type = CACHE_MISS_TYPE_CRC;
+ mCacheMissCRC.put(local_id);
}
}
+ else
+ {
+ // llinfos << "Cache miss for " << local_id << llendl;
+ cache_miss_type = CACHE_MISS_TYPE_FULL;
+ mCacheMissFull.put(local_id);
+ }
+
return NULL;
}