summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturefetch.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltexturefetch.h')
-rw-r--r--indra/newview/lltexturefetch.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index 373e38a83c..634e590fe0 100644
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -58,9 +58,11 @@ public:
~LLTextureFetch();
/*virtual*/ S32 update(U32 max_time_ms);
+ void shutDownTextureCacheThread() ; //called in the main thread after the TextureCacheThread shuts down.
+ void shutDownImageDecodeThread() ; //called in the main thread after the ImageDecodeThread shuts down.
bool createRequest(const std::string& url, const LLUUID& id, const LLHost& host, F32 priority,
- S32 w, S32 h, S32 c, S32 discard, bool needs_aux);
+ S32 w, S32 h, S32 c, S32 discard, bool needs_aux, bool can_use_http);
void deleteRequest(const LLUUID& id, bool cancel);
bool getRequestFinished(const LLUUID& id, S32& discard_level,
LLPointer<LLImageRaw>& raw, LLPointer<LLImageRaw>& aux);
@@ -75,15 +77,16 @@ public:
// Debug
BOOL isFromLocalCache(const LLUUID& id);
S32 getFetchState(const LLUUID& id, F32& decode_progress_p, F32& requested_priority_p,
- U32& fetch_priority_p, F32& fetch_dtime_p, F32& request_dtime_p);
+ U32& fetch_priority_p, F32& fetch_dtime_p, F32& request_dtime_p, bool& can_use_http);
void dump();
- S32 getNumRequests() { return mRequestMap.size(); }
- S32 getNumHTTPRequests() { return mHTTPTextureQueue.size(); }
+ S32 getNumRequests() ;
+ S32 getNumHTTPRequests() ;
// Public for access by callbacks
void lockQueue() { mQueueMutex.lock(); }
void unlockQueue() { mQueueMutex.unlock(); }
LLTextureFetchWorker* getWorker(const LLUUID& id);
+ LLTextureFetchWorker* getWorkerAfterLock(const LLUUID& id);
LLTextureInfo* getTextureInfo() { return &mTextureInfo; }
@@ -92,7 +95,7 @@ protected:
void removeFromNetworkQueue(LLTextureFetchWorker* worker, bool cancel);
void addToHTTPQueue(const LLUUID& id);
void removeFromHTTPQueue(const LLUUID& id);
- S32 getHTTPQueueSize() { return (S32)mHTTPTextureQueue.size(); }
+ S32 getHTTPQueueSize() { return getNumHTTPRequests(); }
void removeRequest(LLTextureFetchWorker* worker, bool cancel);
// Called from worker thread (during doWork)
void processCurlRequests();
@@ -111,8 +114,8 @@ public:
S32 mBadPacketCount;
private:
- LLMutex mQueueMutex;
- LLMutex mNetworkQueueMutex;
+ LLMutex mQueueMutex; //to protect mRequestMap only
+ LLMutex mNetworkQueueMutex; //to protect mNetworkQueue, mHTTPTextureQueue and mCancelQueue.
LLTextureCache* mTextureCache;
LLImageDecodeThread* mImageDecodeThread;