summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-01-18 16:02:03 -0800
committerRichard Linden <none@none>2013-01-18 16:02:03 -0800
commita4d01f05e054eb0f7cbe2621548429cea70ffe26 (patch)
treeccf47ea062bb77c2166e826d85c104bc3a17e798 /indra/newview/llviewerregion.h
parente975ae35ab57f56adfaed64bc108240a5013f040 (diff)
parent033e96259912b1bfaa96529386bf255fab24c17f (diff)
Automated merge with ssh://hg.lindenlab.com/richard/viewer-interesting-metrics
Diffstat (limited to 'indra/newview/llviewerregion.h')
-rw-r--r--indra/newview/llviewerregion.h35
1 files changed, 32 insertions, 3 deletions
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index 9252923aa3..4f0087ba7c 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -169,6 +169,9 @@ public:
const LLVector3d &getOriginGlobal() const;
LLVector3 getOriginAgent() const;
+ //estimate weight of cache missed object
+ F32 calcObjectWeight(U32 flags);
+
// Center is at the height of the water table.
const LLVector3d &getCenterGlobal() const;
LLVector3 getCenterAgent() const;
@@ -316,7 +319,7 @@ public:
// handle a full update message
eCacheUpdateResult cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp);
LLVOCacheEntry* getCacheEntryForOctree(U32 local_id);
- bool probeCache(U32 local_id, U32 crc, U8 &cache_miss_type);
+ bool probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss_type);
void requestCacheMisses();
void addCacheMissFull(const U32 local_id);
@@ -356,6 +359,7 @@ private:
F32 createVisibleObjects(F32 max_time);
F32 updateVisibleEntries(F32 max_time); //update visible entries
+ void addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type, F32 weight);
public:
struct CompareDistance
{
@@ -441,8 +445,33 @@ private:
BOOL mReleaseNotesRequested;
BOOL mDead; //if true, this region is in the process of deleting.
- LLDynamicArray<U32> mCacheMissFull;
- LLDynamicArray<U32> mCacheMissCRC;
+ class CacheMissItem
+ {
+ public:
+ CacheMissItem(U32 id, LLViewerRegion::eCacheMissType miss_type, F32 weight) : mID(id), mType(miss_type), mWeight(weight){}
+
+ U32 mID; //local object id
+ LLViewerRegion::eCacheMissType mType; //cache miss type
+ F32 mWeight; //importance of this object to the current camera.
+
+ struct Compare
+ {
+ bool operator()(const CacheMissItem& lhs, const CacheMissItem& rhs)
+ {
+ if(lhs.mWeight == rhs.mWeight) //larger weight first
+ {
+ return &lhs < &rhs;
+ }
+ else
+ {
+ return lhs.mWeight > rhs.mWeight; //larger weight first
+ }
+ }
+ };
+
+ typedef std::set<CacheMissItem, Compare> cache_miss_list_t;
+ };
+ CacheMissItem::cache_miss_list_t mCacheMissList;
caps_received_signal_t mCapabilitiesReceivedSignal;
LLSD mSimulatorFeatures;