summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-01-09 23:08:32 -0800
committerRichard Linden <none@none>2013-01-09 23:08:32 -0800
commit0f3411f2b4b95336dcc96950459396d780a43049 (patch)
tree53b5a75c9fcd0bf1e65af1e3af795cbf2794d608 /indra/newview/llviewerregion.h
parenta09719c0eb8d06d6bb689984a1b108932ea35314 (diff)
parentc539004c7ebec31d7e61209e7110ec96c867aaa6 (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.h51
1 files changed, 39 insertions, 12 deletions
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index 756c0dc61f..9252923aa3 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -65,8 +65,11 @@ class LLDataPacker;
class LLDataPackerBinaryBuffer;
class LLHost;
class LLBBox;
-
+class LLSpatialGroup;
+class LLDrawable;
class LLViewerRegionImpl;
+class LLviewerOctreeGroup;
+class LLVOCachePartition;
class LLViewerRegion: public LLCapabilityProvider // implements this interface
{
@@ -83,7 +86,8 @@ public:
PARTITION_GRASS,
PARTITION_VOLUME,
PARTITION_BRIDGE,
- PARTITION_HUD_PARTICLE,
+ PARTITION_HUD_PARTICLE,
+ PARTITION_VO_CACHE,
PARTITION_NONE,
NUM_PARTITIONS
} eObjectPartitions;
@@ -215,6 +219,12 @@ public:
F32 getWidth() const { return mWidth; }
BOOL idleUpdate(F32 max_update_time);
+ void addVisibleGroup(LLviewerOctreeGroup* group);
+ void addVisibleCacheEntry(LLVOCacheEntry* entry);
+ void addActiveCacheEntry(LLVOCacheEntry* entry);
+ void removeActiveCacheEntry(LLVOCacheEntry* entry, LLDrawable* drawablep);
+ void killCacheEntry(U32 local_id); //physically delete the cache entry
+ void clearVisibleGroup(LLviewerOctreeGroup* group);
// Like idleUpdate, but forces everything to complete regardless of
// how long it takes.
@@ -304,8 +314,9 @@ public:
} eCacheUpdateResult;
// handle a full update message
- eCacheUpdateResult cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp);
- LLDataPacker *getDP(U32 local_id, U32 crc, U8 &cache_miss_type);
+ eCacheUpdateResult cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinaryBuffer &dp);
+ LLVOCacheEntry* getCacheEntryForOctree(U32 local_id);
+ bool probeCache(U32 local_id, U32 crc, U8 &cache_miss_type);
void requestCacheMisses();
void addCacheMissFull(const U32 local_id);
@@ -321,7 +332,9 @@ public:
virtual std::string getDescription() const;
std::string getHttpUrl() const { return mHttpUrl ;}
+ U32 getNumOfActiveCachedObjects() const;
LLSpatialPartition* getSpatialPartition(U32 type);
+ LLVOCachePartition* getVOCachePartition();
bool objectIsReturnable(const LLVector3& pos, const std::vector<LLBBox>& boxes) const;
bool childrenObjectReturnable( const std::vector<LLBBox>& boxes ) const;
@@ -330,6 +343,19 @@ public:
void getNeighboringRegions( std::vector<LLViewerRegion*>& uniqueRegions );
void getNeighboringRegionsStatus( std::vector<S32>& regions );
+private:
+ void addToVOCacheTree(LLVOCacheEntry* entry);
+ LLViewerObject* addNewObject(LLVOCacheEntry* entry);
+ void killObject(LLVOCacheEntry* entry, std::vector<LLDrawable*>& delete_list);
+ LLVOCacheEntry* getCacheEntry(U32 local_id);
+ void removeFromVOCacheTree(LLVOCacheEntry* entry);
+ void replaceCacheEntry(LLVOCacheEntry* old_entry, LLVOCacheEntry* new_entry);
+ void killCacheEntry(LLVOCacheEntry* entry); //physically delete the cache entry
+
+ F32 killInvisibleObjects(F32 max_time);
+ F32 createVisibleObjects(F32 max_time);
+ F32 updateVisibleEntries(F32 max_time); //update visible entries
+
public:
struct CompareDistance
{
@@ -363,6 +389,8 @@ public:
LLDynamicArray<U32> mMapAvatars;
LLDynamicArray<LLUUID> mMapAvatarIDs;
+ static LLViewerRegion* sCurRegionp;
+ static BOOL sVOCacheCullingEnabled; //vo cache culling enabled or not.
private:
LLViewerRegionImpl * mImpl;
@@ -406,18 +434,17 @@ private:
// Maps local ids to cache entries.
// Regions can have order 10,000 objects, so assume
// a structure of size 2^14 = 16,000
- BOOL mCacheLoaded;
- BOOL mCacheDirty;
+ BOOL mCacheLoaded;
+ BOOL mCacheDirty;
+ BOOL mAlive; // can become false if circuit disconnects
+ BOOL mCapabilitiesReceived;
+ BOOL mReleaseNotesRequested;
+ BOOL mDead; //if true, this region is in the process of deleting.
LLDynamicArray<U32> mCacheMissFull;
LLDynamicArray<U32> mCacheMissCRC;
-
- bool mAlive; // can become false if circuit disconnects
- bool mCapabilitiesReceived;
- caps_received_signal_t mCapabilitiesReceivedSignal;
-
- BOOL mReleaseNotesRequested;
+ caps_received_signal_t mCapabilitiesReceivedSignal;
LLSD mSimulatorFeatures;
};