diff options
Diffstat (limited to 'indra/newview/llviewertexturelist.h')
-rwxr-xr-x | indra/newview/llviewertexturelist.h | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index fbbfe9a7d4..b1b6f4d2aa 100755 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -59,6 +59,26 @@ typedef void (*LLImageCallback)(BOOL success, BOOL final, void* userdata); +struct LLTextureKey +{ + LLTextureKey(); + LLTextureKey(LLUUID id, bool is_ui); + LLUUID textureId; + bool isUI; + + friend bool operator<(const LLTextureKey& key1, const LLTextureKey& key2) + { + if (key1.textureId != key2.textureId) + { + return key1.textureId < key2.textureId; + } + else + { + return key1.isUI < key2.isUI; + } + } +}; + class LLViewerTextureList { friend class LLTextureView; @@ -83,7 +103,9 @@ public: void restoreGL(); BOOL isInitialized() const {return mInitialized;} - LLViewerFetchedTexture *findImage(const LLUUID &image_id); + void findTexturesByID(const LLUUID &image_id, std::vector<LLViewerFetchedTexture*> &output); + LLViewerFetchedTexture *findImage(const LLUUID &image_id, bool is_ui); + LLViewerFetchedTexture *findImage(const LLTextureKey &search_key); void dirtyImage(LLViewerFetchedTexture *image); @@ -120,7 +142,7 @@ private: void updateImagesUpdateStats(); F32 updateImagesLoadingFastCache(F32 max_time); - void addImage(LLViewerFetchedTexture *image); + void addImage(LLViewerFetchedTexture *image, bool add_ui); void deleteImage(LLViewerFetchedTexture *image); void addImageToList(LLViewerFetchedTexture *image); @@ -184,10 +206,10 @@ public: BOOL mForceResetTextureStats; private: - typedef std::map< LLUUID, LLPointer<LLViewerFetchedTexture> > uuid_map_t; - uuid_map_t mUUIDMap; - LLUUID mLastUpdateUUID; - LLUUID mLastFetchUUID; + typedef std::map< LLTextureKey, LLPointer<LLViewerFetchedTexture> > uuid_map_t; + uuid_map_t mUUIDMap; + LLTextureKey mLastUpdateKey; + LLTextureKey mLastFetchKey; typedef std::set<LLPointer<LLViewerFetchedTexture>, LLViewerFetchedTexture::Compare> image_priority_list_t; image_priority_list_t mImageList; |