summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexturelist.h
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2016-03-16 13:08:06 -0400
committerOz Linden <oz@lindenlab.com>2016-03-16 13:08:06 -0400
commit31f3db02919870a8e92c9452de477c1478b273e9 (patch)
tree1acf6944bf8dbe0b67bb64caee9188ad5e36d913 /indra/newview/llviewertexturelist.h
parent0b996159cef3a4022c6a3d4691bd2e2db37b6e92 (diff)
parent9197a8652e49178c63ea208c6c4acf1ca3433659 (diff)
merge changes for DRTVWR-417
Diffstat (limited to 'indra/newview/llviewertexturelist.h')
-rw-r--r--indra/newview/llviewertexturelist.h40
1 files changed, 34 insertions, 6 deletions
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index fbbfe9a7d4..9f94f2f1bc 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -59,6 +59,32 @@ typedef void (*LLImageCallback)(BOOL success,
BOOL final,
void* userdata);
+enum ETexListType
+{
+ TEX_LIST_DISCARD = 0,
+ TEX_LIST_UI
+};
+
+struct LLTextureKey
+{
+ LLTextureKey();
+ LLTextureKey(LLUUID id, ETexListType tex_type);
+ LLUUID textureId;
+ ETexListType textureType;
+
+ friend bool operator<(const LLTextureKey& key1, const LLTextureKey& key2)
+ {
+ if (key1.textureId != key2.textureId)
+ {
+ return key1.textureId < key2.textureId;
+ }
+ else
+ {
+ return key1.textureType < key2.textureType;
+ }
+ }
+};
+
class LLViewerTextureList
{
friend class LLTextureView;
@@ -83,7 +109,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, ETexListType tex_type);
+ LLViewerFetchedTexture *findImage(const LLTextureKey &search_key);
void dirtyImage(LLViewerFetchedTexture *image);
@@ -120,7 +148,7 @@ private:
void updateImagesUpdateStats();
F32 updateImagesLoadingFastCache(F32 max_time);
- void addImage(LLViewerFetchedTexture *image);
+ void addImage(LLViewerFetchedTexture *image, ETexListType tex_type);
void deleteImage(LLViewerFetchedTexture *image);
void addImageToList(LLViewerFetchedTexture *image);
@@ -184,10 +212,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;