summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-05-13 10:11:12 -0600
committerXiaohong Bao <bao@lindenlab.com>2013-05-13 10:11:12 -0600
commitbbefabff3e2f3453ac682262defe0e7f9b94d5a8 (patch)
treede31849d3749f29b60a4455bbaeff05cc70d00b1 /indra
parentedf731c180a61dc49255ebb25342b6256e8d6065 (diff)
parent6244679b34bfb450bc83fd1ccd8c765028bb6735 (diff)
Automated merge with ssh://hg.lindenlab.com/richard/viewer-interesting
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvieweroctree.cpp2
-rw-r--r--indra/newview/llviewerregion.cpp31
2 files changed, 28 insertions, 5 deletions
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
index 0fa1f5bef3..0670b47f52 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -525,7 +525,7 @@ void LLviewerOctreeGroup::handleChildAddition(const OctreeNode* parent, OctreeNo
}
else
{
- OCT_ERRS << "LLSpatialGroup redundancy detected." << llendl;
+ OCT_ERRS << "LLviewerOctreeGroup redundancy detected." << llendl;
}
unbound();
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index e85c566394..2ba0d939be 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1128,7 +1128,6 @@ BOOL LLViewerRegion::idleUpdate(F32 max_update_time)
createVisibleObjects(max_update_time);
mImpl->mVisibleGroups.clear();
- mImpl->mWaitingList.clear();
sCurRegionp = NULL;
return did_update;
@@ -1141,16 +1140,40 @@ F32 LLViewerRegion::killInvisibleObjects(F32 max_time)
{
return max_time;
}
+ if(mImpl->mActiveSet.empty())
+ {
+ return max_time;
+ }
+
+ static LLVOCacheEntry* last_visited_entry = NULL;
+ const size_t MAX_UPDATE = 32;
std::vector<LLDrawable*> delete_list;
- for(LLVOCacheEntry::vocache_entry_set_t::iterator iter = mImpl->mActiveSet.begin();
- iter != mImpl->mActiveSet.end(); ++iter)
- {
+ S32 update_counter = llmin(MAX_UPDATE, mImpl->mActiveSet.size());
+ LLVOCacheEntry::vocache_entry_set_t::iterator iter = mImpl->mActiveSet.upper_bound(last_visited_entry);
+
+ for(; update_counter > 0; --update_counter, ++iter)
+ {
+ if(iter == mImpl->mActiveSet.end())
+ {
+ iter = mImpl->mActiveSet.begin();
+ }
+
if(!(*iter)->isRecentlyVisible())
{
killObject((*iter), delete_list);
}
}
+
+ if(iter == mImpl->mActiveSet.end())
+ {
+ last_visited_entry = NULL;
+ }
+ else
+ {
+ last_visited_entry = *iter;
+ }
+
for(S32 i = 0; i < delete_list.size(); i++)
{
gObjectList.killObject(delete_list[i]->getVObj());