diff options
author | Richard Linden <none@none> | 2013-01-17 23:30:50 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2013-01-17 23:30:50 -0800 |
commit | 033e96259912b1bfaa96529386bf255fab24c17f (patch) | |
tree | 427d207ce41924740c5815871330df7c925cec2d /indra/newview/llviewerregion.h | |
parent | d290112d6f531bfe72700e85ddf48854cf1ab8d7 (diff) | |
parent | f740faf760cedec5b72928224b386c0dc8a3dd6e (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.h | 35 |
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; |