diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2012-04-11 11:06:06 -0400 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2012-04-11 11:06:06 -0400 |
| commit | 4743a2dac6af23a602c7ce8c5b5b0d351ae340e7 (patch) | |
| tree | 8290203934beeb1ea5e37945a4749cf0e7eaca27 /indra/llimage/llimageworker.cpp | |
| parent | 4574a9a008690c64158abd6d792d6d485bf0e235 (diff) | |
| parent | 46a7cdd2866c4219bb690974d9d6266e6994b431 (diff) | |
Automated merge with file:///home/nat/linden/viewer-leap-temp
Diffstat (limited to 'indra/llimage/llimageworker.cpp')
| -rw-r--r-- | indra/llimage/llimageworker.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp index 2c6d6f31ea..ad2eb0f69c 100644 --- a/indra/llimage/llimageworker.cpp +++ b/indra/llimage/llimageworker.cpp @@ -35,18 +35,20 @@ LLImageDecodeThread::LLImageDecodeThread(bool threaded) : LLQueuedThread("imagedecode", threaded) { + mCreationMutex = new LLMutex(getAPRPool()); } //virtual LLImageDecodeThread::~LLImageDecodeThread() { + delete mCreationMutex ; } // MAIN THREAD // virtual -S32 LLImageDecodeThread::update(U32 max_time_ms) +S32 LLImageDecodeThread::update(F32 max_time_ms) { - LLMutexLock lock(&mCreationMutex); + LLMutexLock lock(mCreationMutex); for (creation_list_t::iterator iter = mCreationList.begin(); iter != mCreationList.end(); ++iter) { @@ -69,7 +71,7 @@ S32 LLImageDecodeThread::update(U32 max_time_ms) LLImageDecodeThread::handle_t LLImageDecodeThread::decodeImage(LLImageFormatted* image, U32 priority, S32 discard, BOOL needs_aux, Responder* responder) { - LLMutexLock lock(&mCreationMutex); + LLMutexLock lock(mCreationMutex); handle_t handle = generateHandle(); mCreationList.push_back(creation_info(handle, image, priority, discard, needs_aux, responder)); return handle; @@ -79,7 +81,7 @@ LLImageDecodeThread::handle_t LLImageDecodeThread::decodeImage(LLImageFormatted* // Returns the size of the mutex guarded list as an indication of sanity S32 LLImageDecodeThread::tut_size() { - LLMutexLock lock(&mCreationMutex); + LLMutexLock lock(mCreationMutex); S32 res = mCreationList.size(); return res; } |
