Automated merge with ssh://hg.lindenlab.com/richard/viewer-interesting
commit
6cf85d1bf3
|
|
@ -343,6 +343,10 @@ void LLViewerObject::markDead()
|
|||
|
||||
// Mark itself as dead
|
||||
mDead = TRUE;
|
||||
if(mRegionp)
|
||||
{
|
||||
mRegionp->removeFromCreatedList(getLocalID());
|
||||
}
|
||||
gObjectList.cleanupReferences(this);
|
||||
|
||||
LLViewerObject *childp;
|
||||
|
|
@ -1046,6 +1050,17 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
|
|||
}
|
||||
else
|
||||
{
|
||||
if(regionp != mRegionp)
|
||||
{
|
||||
if(mRegionp)
|
||||
{
|
||||
mRegionp->removeFromCreatedList(getLocalID());
|
||||
}
|
||||
if(regionp)
|
||||
{
|
||||
regionp->addToCreatedList(getLocalID());
|
||||
}
|
||||
}
|
||||
mRegionp = regionp ;
|
||||
}
|
||||
}
|
||||
|
|
@ -5454,7 +5469,18 @@ void LLViewerObject::setRegion(LLViewerRegion *regionp)
|
|||
{
|
||||
llwarns << "viewer object set region to NULL" << llendl;
|
||||
}
|
||||
|
||||
if(regionp != mRegionp)
|
||||
{
|
||||
if(mRegionp)
|
||||
{
|
||||
mRegionp->removeFromCreatedList(getLocalID());
|
||||
}
|
||||
if(regionp)
|
||||
{
|
||||
regionp->addToCreatedList(getLocalID());
|
||||
}
|
||||
}
|
||||
|
||||
mLatestRecvPacketID = 0;
|
||||
mRegionp = regionp;
|
||||
|
||||
|
|
|
|||
|
|
@ -2045,6 +2045,10 @@ LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRe
|
|||
// llwarns << "Couldn't create object of type " << LLPrimitive::pCodeToString(pcode) << " id:" << fullid << llendl;
|
||||
return NULL;
|
||||
}
|
||||
if(regionp)
|
||||
{
|
||||
regionp->addToCreatedList(local_id);
|
||||
}
|
||||
|
||||
mUUIDObjectMap[fullid] = objectp;
|
||||
setUUIDAndLocal(fullid,
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ public:
|
|||
LLVOCachePartition* mVOCachePartition;
|
||||
LLVOCacheEntry::vocache_entry_set_t mVisibleEntries; //must-be-created visible entries wait for objects creation.
|
||||
LLVOCacheEntry::vocache_entry_priority_list_t mWaitingList; //transient list storing sorted visible entries waiting for object creation.
|
||||
std::set<U32> mNonCacheableCreatedList; //list of local ids of all non-cacheable objects
|
||||
|
||||
// time?
|
||||
// LRU info?
|
||||
|
|
@ -1694,7 +1695,9 @@ void LLViewerRegion::findOrphans(U32 parent_id)
|
|||
std::vector<U32>* children = &mOrphanMap[parent_id];
|
||||
for(S32 i = 0; i < children->size(); i++)
|
||||
{
|
||||
forceToRemoveFromCache((*children)[i], NULL);
|
||||
//parent is visible, so is the child.
|
||||
LLVOCacheEntry* child = getCacheEntry((*children)[i]);
|
||||
addVisibleCacheEntry(child);
|
||||
}
|
||||
children->clear();
|
||||
mOrphanMap.erase(parent_id);
|
||||
|
|
@ -1735,7 +1738,16 @@ void LLViewerRegion::decodeBoundingInfo(LLVOCacheEntry* entry)
|
|||
//2, parent is not in the cache, put into the orphan list.
|
||||
if(!parent)
|
||||
{
|
||||
mOrphanMap[parent_id].push_back(entry->getLocalID());
|
||||
//check if parent is non-cacheable and already created
|
||||
if(isNonCacheableObjectCreated(parent_id))
|
||||
{
|
||||
//parent is visible, so is the child.
|
||||
addVisibleCacheEntry(entry);
|
||||
}
|
||||
else
|
||||
{
|
||||
mOrphanMap[parent_id].push_back(entry->getLocalID());
|
||||
}
|
||||
}
|
||||
else //parent in cache
|
||||
{
|
||||
|
|
@ -1901,6 +1913,36 @@ void LLViewerRegion::addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_ty
|
|||
#endif
|
||||
}
|
||||
|
||||
//check if a non-cacheable object is already created.
|
||||
bool LLViewerRegion::isNonCacheableObjectCreated(U32 local_id)
|
||||
{
|
||||
if(mImpl && local_id > 0 && mImpl->mNonCacheableCreatedList.find(local_id) != mImpl->mNonCacheableCreatedList.end())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLViewerRegion::removeFromCreatedList(U32 local_id)
|
||||
{
|
||||
if(mImpl && local_id > 0)
|
||||
{
|
||||
std::set<U32>::iterator iter = mImpl->mNonCacheableCreatedList.find(local_id);
|
||||
if(iter != mImpl->mNonCacheableCreatedList.end())
|
||||
{
|
||||
mImpl->mNonCacheableCreatedList.erase(iter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLViewerRegion::addToCreatedList(U32 local_id)
|
||||
{
|
||||
if(mImpl && local_id > 0)
|
||||
{
|
||||
mImpl->mNonCacheableCreatedList.insert(local_id);
|
||||
}
|
||||
}
|
||||
|
||||
// Get data packer for this object, if we have cached data
|
||||
// AND the CRC matches. JC
|
||||
bool LLViewerRegion::probeCache(U32 local_id, U32 crc, U32 flags, U8 &cache_miss_type)
|
||||
|
|
|
|||
|
|
@ -347,6 +347,9 @@ public:
|
|||
void getNeighboringRegions( std::vector<LLViewerRegion*>& uniqueRegions );
|
||||
void getNeighboringRegionsStatus( std::vector<S32>& regions );
|
||||
|
||||
void removeFromCreatedList(U32 local_id);
|
||||
void addToCreatedList(U32 local_id);
|
||||
|
||||
private:
|
||||
void addToVOCacheTree(LLVOCacheEntry* entry);
|
||||
LLViewerObject* addNewObject(LLVOCacheEntry* entry);
|
||||
|
|
@ -361,6 +364,8 @@ private:
|
|||
|
||||
void addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type);
|
||||
void decodeBoundingInfo(LLVOCacheEntry* entry);
|
||||
bool isNonCacheableObjectCreated(U32 local_id);
|
||||
|
||||
public:
|
||||
struct CompareDistance
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue