diff options
author | Richard Linden <none@none> | 2013-12-09 11:55:25 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2013-12-09 11:55:25 -0800 |
commit | 1459c6dfd79f95d24fe15093feb99c0ac25f508d (patch) | |
tree | a659682a8d5bd4de46401fcdb6e0c991800f4516 /indra/newview/llviewerregion.cpp | |
parent | 24b7fd1c7f2bd88f40d2a6a12810b1ad559af7eb (diff) | |
parent | 24a2ba735540f896bb84dfdbaff8644b1d60044b (diff) |
merge
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rwxr-xr-x | indra/newview/llviewerregion.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index c3cdfa2901..f9689c7473 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -847,13 +847,18 @@ void LLViewerRegion::replaceVisibleCacheEntry(LLVOCacheEntry* old_entry, LLVOCac } //physically delete the cache entry -void LLViewerRegion::killCacheEntry(LLVOCacheEntry* entry) +void LLViewerRegion::killCacheEntry(LLVOCacheEntry* entry, bool for_rendering) { if(!entry) { return; } + if(for_rendering && !entry->isState(LLVOCacheEntry::ACTIVE)) + { + addNewObject(entry); //force to add to rendering pipeline + } + //remove from active list and waiting list if(entry->isState(LLVOCacheEntry::ACTIVE)) { @@ -882,9 +887,20 @@ void LLViewerRegion::killCacheEntry(LLVOCacheEntry* entry) parent->removeChild(entry); } } - else if(entry->getNumOfChildren() > 0)//disconnect children if has any + else if(entry->getNumOfChildren() > 0)//remove children from cache if has any { - entry->removeAllChildren(); + S32 num_child = entry->getNumOfChildren(); + + LLVOCacheEntry* child; + for(S32 i = 0; i < num_child; i++) + { + child = entry->getChild(i); + if(child) + { + child->setParentID(0); //disconnect from parent + killCacheEntry(child, for_rendering); + } + } } //remove from mCacheMap, real deletion @@ -1552,13 +1568,13 @@ LLViewerObject* LLViewerRegion::updateCacheEntry(U32 local_id, LLViewerObject* o if(!objectp) //object not created { //create a new object from cache. - objectp = gObjectList.processObjectUpdateFromCache(entry, this); + objectp = addNewObject(entry); } //remove from cache if terse update if(update_type == (U32)OUT_TERSE_IMPROVED) { - killCacheEntry(entry); + killCacheEntry(entry, true); } return objectp; |