fix the merge errors from the changeset 3eadda9666cf
parent
8315e97453
commit
7cc37d949e
|
|
@ -1009,13 +1009,15 @@ bool LLDrawable::isRecentlyVisible() const
|
|||
|
||||
void LLDrawable::setGroup(LLviewerOctreeGroup *groupp)
|
||||
{
|
||||
//precondition: mGroupp MUST be null or DEAD or mGroupp MUST NOT contain this
|
||||
llassert(!getGroup() || getGroup()->isDead() || !getGroup()->hasElement(this));
|
||||
LLSpatialGroup* cur_groupp = (LLSpatialGroup*)getGroup();
|
||||
|
||||
//precondition: mGroupp MUST be null or DEAD or mGroupp MUST NOT contain this
|
||||
//llassert(!cur_groupp || cur_groupp->isDead() || !cur_groupp->hasElement(this));
|
||||
|
||||
//precondition: groupp MUST be null or groupp MUST contain this
|
||||
llassert(!groupp || groupp->hasElement(this));
|
||||
llassert(!groupp || (LLSpatialGroup*)groupp->hasElement(this));
|
||||
|
||||
if (getGroup() != groupp && getVOVolume())
|
||||
if (cur_groupp != groupp && getVOVolume())
|
||||
{ //NULL out vertex buffer references for volumes on spatial group change to maintain
|
||||
//requirement that every face vertex buffer is either NULL or points to a vertex buffer
|
||||
//contained by its drawable's spatial group
|
||||
|
|
@ -1031,8 +1033,8 @@ void LLDrawable::setGroup(LLviewerOctreeGroup *groupp)
|
|||
|
||||
//postcondition: if next group is NULL, previous group must be dead OR NULL OR binIndex must be -1
|
||||
//postcondition: if next group is NOT NULL, binIndex must not be -1
|
||||
llassert(groupp == NULL ? (getGroup() == NULL || getGroup()->isDead()) || getBinIndex() == -1 :
|
||||
getBinIndex() != -1);
|
||||
//llassert(groupp == NULL ? (cur_groupp == NULL || cur_groupp->isDead()) || (!getEntry() || getEntry()->getBinIndex() == -1) :
|
||||
// (getEntry() && getEntry()->getBinIndex() != -1));
|
||||
|
||||
LLViewerOctreeEntryData::setGroup(groupp);
|
||||
}
|
||||
|
|
@ -1498,6 +1500,8 @@ void LLSpatialBridge::cleanupReferences()
|
|||
{
|
||||
drawable->setGroup(NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
LLDrawable* drawablep = mDrawable;
|
||||
mDrawable = NULL;
|
||||
|
|
|
|||
|
|
@ -1549,8 +1549,6 @@ BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp)
|
|||
drawablep->setGroup(NULL);
|
||||
}
|
||||
|
||||
drawablep->setSpatialGroup(NULL);
|
||||
|
||||
assert_octree_valid(mOctree);
|
||||
|
||||
return TRUE;
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry*
|
|||
}
|
||||
justCreated = true;
|
||||
mNumNewObjects++;
|
||||
sCacheHitRate.addValue(100.f);
|
||||
sCacheHitRate.sample(100.f);
|
||||
}
|
||||
|
||||
if (objectp->isDead())
|
||||
|
|
@ -578,8 +578,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys,
|
|||
}
|
||||
justCreated = TRUE;
|
||||
mNumNewObjects++;
|
||||
sCacheHitRate.sample(cached ? 100.f : 0.f);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -672,7 +670,7 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys,
|
|||
|
||||
continue; // no data packer, skip this object
|
||||
}
|
||||
sCacheHitRate.addValue(100.f);
|
||||
sCacheHitRate.sample(100.f);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -347,6 +347,15 @@ LLviewerOctreeGroup::LLviewerOctreeGroup(OctreeNode* node) :
|
|||
mOctreeNode->addListener(this);
|
||||
}
|
||||
|
||||
bool LLviewerOctreeGroup::hasElement(LLViewerOctreeEntryData* data)
|
||||
{
|
||||
if(!data->getEntry())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return std::find(getDataBegin(), getDataEnd(), data->getEntry()) != getDataEnd();
|
||||
}
|
||||
|
||||
bool LLviewerOctreeGroup::removeFromGroup(LLViewerOctreeEntryData* data)
|
||||
{
|
||||
return removeFromGroup(data->getEntry());
|
||||
|
|
|
|||
|
|
@ -94,6 +94,16 @@ public:
|
|||
S32 getBinIndex() const {return mBinIndex; }
|
||||
void setBinIndex(S32 index) const {mBinIndex = index; }
|
||||
|
||||
void* operator new(size_t size)
|
||||
{
|
||||
return ll_aligned_malloc_16(size);
|
||||
}
|
||||
|
||||
void operator delete(void* ptr)
|
||||
{
|
||||
ll_aligned_free_16(ptr);
|
||||
}
|
||||
|
||||
private:
|
||||
void addData(LLViewerOctreeEntryData* data);
|
||||
|
||||
|
|
@ -238,8 +248,9 @@ public:
|
|||
element_list& getData() { return mOctreeNode->getData(); }
|
||||
element_iter getDataBegin() { return mOctreeNode->getDataBegin(); }
|
||||
element_iter getDataEnd() { return mOctreeNode->getDataEnd(); }
|
||||
U32 getElementCount() const { return mOctreeNode->getElementCount(); }
|
||||
|
||||
U32 getElementCount() const { return mOctreeNode->getElementCount(); }
|
||||
bool hasElement(LLViewerOctreeEntryData* data);
|
||||
|
||||
private:
|
||||
virtual bool boundObjects(BOOL empty, LLVector4a& minOut, LLVector4a& maxOut);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue