diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2010-02-08 14:40:06 -0800 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2010-02-08 14:40:06 -0800 |
commit | 68ea8e13aca84da898a8a067c98eb0b8327a8de4 (patch) | |
tree | f76d34387fb292df48d7092b8e4d6d6806114b94 /indra/newview/lltexturefetch.h | |
parent | ac59a7c130f3fcbbb8f228bdf69c44ffa09f07a2 (diff) |
partial fix for EXT-4352. fixed mutex deadlocks and turned on the multi-threaded texture fetching.
Diffstat (limited to 'indra/newview/lltexturefetch.h')
-rw-r--r-- | indra/newview/lltexturefetch.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h index 373e38a83c..5213c4f488 100644 --- a/indra/newview/lltexturefetch.h +++ b/indra/newview/lltexturefetch.h @@ -77,13 +77,14 @@ public: 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); 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 +93,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 +112,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; |