diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2013-01-09 22:43:10 -0700 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2013-01-09 22:43:10 -0700 |
commit | 7cc37d949e9319a5b60641ff8453a0fed763d817 (patch) | |
tree | 366eeb2e217c26f589fa98c8e777a38d22c6df3b | |
parent | 8315e9745398c1c3215ffe1b3bfbfb6c7d16291d (diff) |
fix the merge errors from the changeset 3eadda9666cf
-rw-r--r-- | indra/newview/lldrawable.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llspatialpartition.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerobjectlist.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llvieweroctree.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llvieweroctree.h | 15 |
5 files changed, 34 insertions, 14 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index d91c7b0e1a..ba970671af 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -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; diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index bcafe2e008..0e2109c4af 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -1549,8 +1549,6 @@ BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp) drawablep->setGroup(NULL); } - drawablep->setSpatialGroup(NULL); - assert_octree_valid(mOctree); return TRUE; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 0543d11644..0335cd769b 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -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; diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index 7f502a6c51..cfa24c32ed 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -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()); diff --git a/indra/newview/llvieweroctree.h b/indra/newview/llvieweroctree.h index f6ad3ac327..5bcaeb85da 100644 --- a/indra/newview/llvieweroctree.h +++ b/indra/newview/llvieweroctree.h @@ -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); |