diff options
author | Dave Parks <davep@lindenlab.com> | 2012-11-01 11:29:03 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-11-01 11:29:03 -0500 |
commit | 9ff687218af74000c7281e0579d17ef2930c6e33 (patch) | |
tree | 36c265c97f6b4dff503223412d993d22d961f511 /indra/newview | |
parent | e4df3c1ca875d396240f75c1af8db20f4f7300bf (diff) | |
parent | 44a024d2f5d4467372d0d2082a83449696b22948 (diff) |
Automated merge with http://bitbucket.org/lindenlab/viewer-beta
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewerobjectlist.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llviewerobjectlist.h | 1 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 3 |
3 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index ea20950b36..b433484783 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1405,8 +1405,9 @@ void LLViewerObjectList::removeFromActiveList(LLViewerObject* objectp) { mActiveObjects[idx] = mActiveObjects[last_index]; mActiveObjects[idx]->setListIndex(idx); - mActiveObjects.pop_back(); } + + mActiveObjects.pop_back(); } } @@ -1450,6 +1451,12 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp) objectp->setOnActiveList(FALSE); } } + + //post condition: if object is active, it must be on the active list + llassert(!active || std::find(mActiveObjects.begin(), mActiveObjects.end(), objectp) != mActiveObjects.end()); + + //post condition: if object is not active, it must not be on the active list + llassert(active || std::find(mActiveObjects.begin(), mActiveObjects.end(), objectp) == mActiveObjects.end()); } void LLViewerObjectList::updateObjectCost(LLViewerObject* object) diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 9936432a71..449a4633ff 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -129,6 +129,7 @@ public: LLViewerObject *getSelectedObject(const U32 object_id); inline S32 getNumObjects() { return (S32) mObjects.size(); } + inline S32 getNumActiveObjects() { return (S32) mActiveObjects.size(); } void addToMap(LLViewerObject *objectp); void removeFromMap(LLViewerObject *objectp); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index af2eec9ba8..98ea923272 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -563,6 +563,9 @@ public: addText(xpos, ypos, llformat("%d Render Calls", gPipeline.mBatchCount)); ypos += y_inc; + addText(xpos, ypos, llformat("%d/%d Objects Active", gObjectList.getNumActiveObjects(), gObjectList.getNumObjects())); + ypos += y_inc; + addText(xpos, ypos, llformat("%d Matrix Ops", gPipeline.mMatrixOpCount)); ypos += y_inc; |