summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-04-11 14:07:34 -0600
committerXiaohong Bao <bao@lindenlab.com>2013-04-11 14:07:34 -0600
commit0a3d29c6b415ef8d22f4b86fadbde370a51d0f46 (patch)
tree4666f992e0d0cc748a769facf169ad2b3a931a89
parentfaebbb23f87a855463aba611ca8944ec7f4e0a9c (diff)
parent81943ecbe53779a226da4bbdf2c8b1ae39eba11b (diff)
Automated merge with ssh://hg.lindenlab.com/richard/viewer-interesting
-rw-r--r--indra/newview/llscenemonitor.cpp2
-rw-r--r--indra/newview/llvieweroctree.cpp86
-rw-r--r--indra/newview/llvieweroctree.h18
-rw-r--r--indra/newview/llviewerregion.cpp36
4 files changed, 81 insertions, 61 deletions
diff --git a/indra/newview/llscenemonitor.cpp b/indra/newview/llscenemonitor.cpp
index c06d9d2689..15fe77f028 100644
--- a/indra/newview/llscenemonitor.cpp
+++ b/indra/newview/llscenemonitor.cpp
@@ -523,7 +523,7 @@ void LLSceneMonitor::addMonitorResult()
//dump results to a file _scene_monitor_results.csv
void LLSceneMonitor::dumpToFile(std::string file_name)
{
- if(mMonitorResults.empty())
+ if(mMonitorResults.empty() || !getRecording())
{
return; //nothing to dump
}
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
index 158fc4b0a9..926d791d1f 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -799,46 +799,46 @@ void LLViewerOctreeCull::visit(const OctreeNode* branch)
}
}
-//--------------------------------------------------------------
-//class LLViewerOctreeDebug
-//virtual
-void LLViewerOctreeDebug::visit(const OctreeNode* branch)
-{
-#if 0
- llinfos << "Node: " << (U32)branch << " # Elements: " << branch->getElementCount() << " # Children: " << branch->getChildCount() << llendl;
- for (U32 i = 0; i < branch->getChildCount(); i++)
- {
- llinfos << "Child " << i << " : " << (U32)branch->getChild(i) << llendl;
- }
-#endif
- LLviewerOctreeGroup* group = (LLviewerOctreeGroup*) branch->getListener(0);
- processGroup(group);
-}
-
-//virtual
-void LLViewerOctreeDebug::processGroup(LLviewerOctreeGroup* group)
-{
-#if 0
- const LLVector4a* vec4 = group->getBounds();
- LLVector3 vec[2];
- vec[0].set(vec4[0].getF32ptr());
- vec[1].set(vec4[1].getF32ptr());
- llinfos << "Bounds: " << vec[0] << " : " << vec[1] << llendl;
-
- vec4 = group->getExtents();
- vec[0].set(vec4[0].getF32ptr());
- vec[1].set(vec4[1].getF32ptr());
- llinfos << "Extents: " << vec[0] << " : " << vec[1] << llendl;
-
- vec4 = group->getObjectBounds();
- vec[0].set(vec4[0].getF32ptr());
- vec[1].set(vec4[1].getF32ptr());
- llinfos << "ObjectBounds: " << vec[0] << " : " << vec[1] << llendl;
-
- vec4 = group->getObjectExtents();
- vec[0].set(vec4[0].getF32ptr());
- vec[1].set(vec4[1].getF32ptr());
- llinfos << "ObjectExtents: " << vec[0] << " : " << vec[1] << llendl;
-#endif
-}
-//--------------------------------------------------------------
+//--------------------------------------------------------------
+//class LLViewerOctreeDebug
+//virtual
+void LLViewerOctreeDebug::visit(const OctreeNode* branch)
+{
+#if 0
+ llinfos << "Node: " << (U32)branch << " # Elements: " << branch->getElementCount() << " # Children: " << branch->getChildCount() << llendl;
+ for (U32 i = 0; i < branch->getChildCount(); i++)
+ {
+ llinfos << "Child " << i << " : " << (U32)branch->getChild(i) << llendl;
+ }
+#endif
+ LLviewerOctreeGroup* group = (LLviewerOctreeGroup*) branch->getListener(0);
+ processGroup(group);
+}
+
+//virtual
+void LLViewerOctreeDebug::processGroup(LLviewerOctreeGroup* group)
+{
+#if 0
+ const LLVector4a* vec4 = group->getBounds();
+ LLVector3 vec[2];
+ vec[0].set(vec4[0].getF32ptr());
+ vec[1].set(vec4[1].getF32ptr());
+ llinfos << "Bounds: " << vec[0] << " : " << vec[1] << llendl;
+
+ vec4 = group->getExtents();
+ vec[0].set(vec4[0].getF32ptr());
+ vec[1].set(vec4[1].getF32ptr());
+ llinfos << "Extents: " << vec[0] << " : " << vec[1] << llendl;
+
+ vec4 = group->getObjectBounds();
+ vec[0].set(vec4[0].getF32ptr());
+ vec[1].set(vec4[1].getF32ptr());
+ llinfos << "ObjectBounds: " << vec[0] << " : " << vec[1] << llendl;
+
+ vec4 = group->getObjectExtents();
+ vec[0].set(vec4[0].getF32ptr());
+ vec[1].set(vec4[1].getF32ptr());
+ llinfos << "ObjectExtents: " << vec[0] << " : " << vec[1] << llendl;
+#endif
+}
+//--------------------------------------------------------------
diff --git a/indra/newview/llvieweroctree.h b/indra/newview/llvieweroctree.h
index 21cc934d77..b6faf4c7ba 100644
--- a/indra/newview/llvieweroctree.h
+++ b/indra/newview/llvieweroctree.h
@@ -324,15 +324,15 @@ protected:
S32 mRes;
};
-//scan the octree, output the info of each node for debug use.
-class LLViewerOctreeDebug : public OctreeTraveler
-{
-public:
- virtual void processGroup(LLviewerOctreeGroup* group);
- virtual void visit(const OctreeNode* branch);
-
-public:
- static BOOL sInDebug;
+//scan the octree, output the info of each node for debug use.
+class LLViewerOctreeDebug : public OctreeTraveler
+{
+public:
+ virtual void processGroup(LLviewerOctreeGroup* group);
+ virtual void visit(const OctreeNode* branch);
+
+public:
+ static BOOL sInDebug;
};
#endif
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index bed047ff0b..84e9c8ea9a 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -465,8 +465,8 @@ void LLViewerRegion::saveObjectCache()
if(LLVOCache::hasInstance())
{
const F32 start_time_threshold = 600.0f; //seconds
- bool removal_enabled = mRegionTimer.getElapsedTimeF32() > start_time_threshold; //allow to remove invalid objects from object cache file.
-
+ bool removal_enabled = sVOCacheCullingEnabled && (mRegionTimer.getElapsedTimeF32() > start_time_threshold); //allow to remove invalid objects from object cache file.
+
LLVOCache::getInstance()->writeToCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap, mCacheDirty, removal_enabled) ;
mCacheDirty = FALSE;
}
@@ -1120,8 +1120,13 @@ BOOL LLViewerRegion::idleUpdate(F32 max_update_time)
max_update_time -= update_timer.getElapsedTimeF32();
if(max_update_time < 0.f || mImpl->mCacheMap.empty())
{
- return did_update;
-}
+ return did_update;
+ }
+
+ if(!sVOCacheCullingEnabled)
+ {
+ return did_update;
+ }
sCurRegionp = this;
@@ -1704,6 +1709,12 @@ void LLViewerRegion::findOrphans(U32 parent_id)
void LLViewerRegion::decodeBoundingInfo(LLVOCacheEntry* entry)
{
+ if(!sVOCacheCullingEnabled)
+ {
+ gObjectList.processObjectUpdateFromCache(entry, this);
+ return;
+ }
+
if(entry != NULL && !entry->getEntry())
{
entry->setOctreeEntry(NULL);
@@ -1882,12 +1893,17 @@ LLViewerRegion::eCacheUpdateResult LLViewerRegion::cacheFullUpdate(LLViewerObjec
}
LLVOCacheEntry* LLViewerRegion::getCacheEntryForOctree(U32 local_id)
+{
+ if(!sVOCacheCullingEnabled)
{
+ return NULL;
+ }
+
LLVOCacheEntry* entry = getCacheEntry(local_id);
removeFromVOCacheTree(entry);
return entry;
- }
+}
LLVOCacheEntry* LLViewerRegion::getCacheEntry(U32 local_id)
{
@@ -2172,10 +2188,14 @@ void LLViewerRegion::unpackRegionHandshake()
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("RegionInfo");
- U32 flags = 0x00000001; //set the bit 0 to be 1 to ask sim to send all cacheable objects.
- if(mImpl->mCacheMap.empty())
+ U32 flags = 0;
+ if(sVOCacheCullingEnabled)
{
- flags |= 0x00000002; //set the bit 1 to be 1 to tell sim the cache file is empty, no need to send cache probes.
+ flags = 0x00000001; //set the bit 0 to be 1 to ask sim to send all cacheable objects.
+ if(mImpl->mCacheMap.empty())
+ {
+ flags |= 0x00000002; //set the bit 1 to be 1 to tell sim the cache file is empty, no need to send cache probes.
+ }
}
msg->addU32("Flags", flags );
msg->sendReliable(host);