summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-01-25 16:18:27 -0800
committerRichard Linden <none@none>2013-01-25 16:18:27 -0800
commit1e39461e7bab716232366f8454793e4a5216fb13 (patch)
treef7d8963894b8eb76e8f1a2ff20a01645b27ecc04 /indra/newview/llviewerregion.h
parent09ee16c61d372c1eb620bc3ef3dbfeb798c0a82e (diff)
parent5ee3071e85de80cd37cc95c51dee5c497957ff9f (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..de14c0fe27 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;