summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-03-13 22:31:19 -0600
committerXiaohong Bao <bao@lindenlab.com>2013-03-13 22:31:19 -0600
commit4624848a6894be669cdb19a82101ea168c407ecd (patch)
treeb74cef281742fc9ee03fe495d20ae7e06ee2b823 /indra/newview/llviewerregion.cpp
parent27bb36b1e796add58f319555bf761e417f7957ef (diff)
revert changes for SH-3653: Can we repurpose ObjectUpdateCached:ObjectData:UpdateFlags field to carry spatial+size data?
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rw-r--r--indra/newview/llviewerregion.cpp22
1 files changed, 5 insertions, 17 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index c74e7158b6..bf4bff60d7 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1896,21 +1896,9 @@ LLVOCacheEntry* LLViewerRegion::getCacheEntry(U32 local_id)
return NULL;
}
-//estimate weight of cache missed object
-F32 LLViewerRegion::calcObjectWeight(U32 flags)
+void LLViewerRegion::addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type)
{
- LLVector3 pos((F32)(flags & 0xff) + 0.5f, (F32)((flags >> 8) & 0xff) + 0.5f, (F32)((flags >> 16) & 0xff) * 16.f + 8.0f);
- F32 rad = (F32)((flags >> 24) & 0xff);
-
- pos += getOriginAgent();
- pos -= LLViewerCamera::getInstance()->getOrigin();
-
- return 100.f * rad * rad / pos.lengthSquared();
-}
-
-void LLViewerRegion::addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type, F32 weight)
-{
- mCacheMissList.insert(CacheMissItem(id, miss_type, weight));
+ mCacheMissList.insert(CacheMissItem(id, miss_type));
}
// Get data packer for this object, if we have cached data
@@ -1949,13 +1937,13 @@ bool LLViewerRegion::probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss
{
// llinfos << "CRC miss for " << local_id << llendl;
- addCacheMiss(local_id, CACHE_MISS_TYPE_CRC, calcObjectWeight(flags));
+ addCacheMiss(local_id, CACHE_MISS_TYPE_CRC);
}
}
else
{
// llinfos << "Cache miss for " << local_id << llendl;
- addCacheMiss(local_id, CACHE_MISS_TYPE_FULL, calcObjectWeight(flags));
+ addCacheMiss(local_id, CACHE_MISS_TYPE_FULL);
}
return false;
@@ -1963,7 +1951,7 @@ bool LLViewerRegion::probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss
void LLViewerRegion::addCacheMissFull(const U32 local_id)
{
- addCacheMiss(local_id, CACHE_MISS_TYPE_FULL, 100.f);
+ addCacheMiss(local_id, CACHE_MISS_TYPE_FULL);
}
void LLViewerRegion::requestCacheMisses()