summaryrefslogtreecommitdiff
path: root/indra/llimage/llimageworker.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-10-19 10:47:55 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-10-19 10:47:55 -0400
commit444bdef6d4949b6381b8706ab056588bc6bd88eb (patch)
tree1f72cc9ec78d7b8c4bad57f4ef14c12a04b7a3a0 /indra/llimage/llimageworker.cpp
parentaf0be560002d4de4d9d89709b5d3b4cc1aef31fc (diff)
parentdd61baa3401a09bd8ff1e894514c15390946cdb3 (diff)
merge
Diffstat (limited to 'indra/llimage/llimageworker.cpp')
-rw-r--r--indra/llimage/llimageworker.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp
index 2c6d6f31ea..28dc3bd313 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)
{
- 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;
}