diff options
author | Dave Parks <davep@lindenlab.com> | 2009-12-16 11:20:44 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2009-12-16 11:20:44 -0600 |
commit | edb67a898c4d20a1d4f18ad0db9ad02d6157b2ed (patch) | |
tree | ee8006d71074b5e067a232f8dba6287afe511c7e /indra/newview | |
parent | c6aaf115ade4b335df9ca479992b08e028ffd910 (diff) |
Convert ll_face_list_t in llviewertexture to a std::set to improve performance on face deletion.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewertexture.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llviewertexture.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index faf7a93281..c9558860db 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -614,13 +614,13 @@ void LLViewerTexture::setKnownDrawSize(S32 width, S32 height) //virtual void LLViewerTexture::addFace(LLFace* facep) { - mFaceList.push_back(facep) ; + mFaceList.insert(facep) ; } //virtual void LLViewerTexture::removeFace(LLFace* facep) { - mFaceList.remove(facep) ; + mFaceList.erase(facep); } //virtual @@ -1519,7 +1519,7 @@ void LLViewerFetchedTexture::updateVirtualSize() } if(mFaceList.size() > 0) { - for(std::list<LLFace*>::iterator iter = mFaceList.begin(); iter != mFaceList.end(); ++iter) + for(ll_face_list_t::iterator iter = mFaceList.begin(); iter != mFaceList.end(); ++iter) { LLFace* facep = *iter ; if(facep->getDrawable()->isRecentlyVisible()) @@ -2391,7 +2391,7 @@ BOOL LLViewerFetchedTexture::insertToAtlas() LLFace* facep; //if the atlas slot pointers for some faces are null, process them later. - ll_face_list_t waiting_list ; + std::vector<LLFace*> waiting_list ; for(ll_face_list_t::iterator iter = mFaceList.begin(); iter != mFaceList.end(); ++iter) { @@ -2475,7 +2475,7 @@ BOOL LLViewerFetchedTexture::insertToAtlas() } //process the waiting_list - for(ll_face_list_t::iterator iter = waiting_list.begin(); iter != waiting_list.end(); ++iter) + for(std::vector<LLFace*>::iterator iter = waiting_list.begin(); iter != waiting_list.end(); ++iter) { facep = (LLFace*)*iter ; groupp = facep->getDrawable()->getSpatialGroup() ; @@ -3153,7 +3153,7 @@ F32 LLViewerMediaTexture::getMaxVirtualSize() { if(mFaceList.size() > 0) { - for(std::list<LLFace*>::iterator iter = mFaceList.begin(); iter != mFaceList.end(); ++iter) + for(ll_face_list_t::iterator iter = mFaceList.begin(); iter != mFaceList.end(); ++iter) { LLFace* facep = *iter ; if(facep->getDrawable()->isRecentlyVisible()) diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 141979052d..bf4b1cf800 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -139,7 +139,7 @@ public: static S32 getIndexFromCategory(S32 category) ; static S32 getCategoryFromIndex(S32 index) ; - typedef std::list<LLFace*> ll_face_list_t ; + typedef std::set<LLFace*> ll_face_list_t ; protected: virtual ~LLViewerTexture(); |