From edb67a898c4d20a1d4f18ad0db9ad02d6157b2ed Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 16 Dec 2009 11:20:44 -0600 Subject: Convert ll_face_list_t in llviewertexture to a std::set to improve performance on face deletion. --- indra/newview/llviewertexture.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llviewertexture.cpp') 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::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 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::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::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()) -- cgit v1.2.3