summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexturelist.h
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2016-03-17 13:14:21 -0700
committerRider Linden <rider@lindenlab.com>2016-03-17 13:14:21 -0700
commitb8c1976460374e743743728ef49b38ad52c453a4 (patch)
tree4f340d954ae3552d4dbb87b389d15d98d66eba51 /indra/newview/llviewertexturelist.h
parent7a0fb4fece5a92627caa08622e9584a903a3fa1d (diff)
parent4aae7b51616c0963af4668442bdb5bfaba8c5044 (diff)
Merge
Diffstat (limited to 'indra/newview/llviewertexturelist.h')
-rwxr-xr-xindra/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 100755
--- 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;