From b07564b15cf90c757beb86b3ef41224a55d48da4 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Tue, 29 Dec 2009 15:02:22 -0700 Subject: fix for DEV-44134: trying to move away from a huge amount of objects with media causes viewer to hang for 15-20 seconds. --- indra/newview/llviewertexture.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'indra/newview/llviewertexture.h') diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index d6fbd5d570..6aaaa4021b 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -134,7 +134,7 @@ public: static S32 getIndexFromCategory(S32 category) ; static S32 getCategoryFromIndex(S32 index) ; - typedef std::list ll_face_list_t ; + typedef std::vector ll_face_list_t ; protected: virtual ~LLViewerTexture(); @@ -175,7 +175,8 @@ public: virtual void addFace(LLFace* facep) ; virtual void removeFace(LLFace* facep) ; - const ll_face_list_t* getFaceList() const {return &mFaceList ;} + S32 getNumFaces() const; + const ll_face_list_t* getFaceList() const {return &mFaceList;} void generateGLTexture() ; void destroyGLTexture() ; @@ -239,13 +240,14 @@ public: /*virtual*/ void updateBindStatsForTester() ; protected: void cleanup() ; - void init(bool firstinit) ; + void init(bool firstinit) ; + void reorganizeFaceList() ; private: //note: do not make this function public. /*virtual*/ LLImageGL* getGLTexture() const ; virtual void switchToCachedImage(); - + protected: LLUUID mID; S32 mBoostLevel; // enum describing priority level @@ -257,14 +259,16 @@ protected: mutable S8 mNeedsGLTexture; mutable BOOL mNeedsResetMaxVirtualSize ; mutable F32 mAdditionalDecodePriority; // priority add to mDecodePriority. - LLFrameTimer mLastReferencedTimer; - - ll_face_list_t mFaceList ; //reverse pointer pointing to the faces using this image as texture + LLFrameTimer mLastReferencedTimer; //GL texture LLPointer mGLTexturep ; S8 mDontDiscard; // Keep full res version of this image (for UI, etc) + ll_face_list_t mFaceList ; //reverse pointer pointing to the faces using this image as texture + U32 mNumFaces ; + LLFrameTimer mLastFaceListUpdateTimer ; + //do not use LLPointer here. LLViewerMediaTexture* mParcelMedia ; -- cgit v1.2.3