diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-03-05 20:41:11 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-03-05 20:41:11 +0000 |
commit | ed8e6f65fcc6065101a5decb26be31a4bfdefe5d (patch) | |
tree | 5d414bb2fcb74cdbc989e8285570258d0fa840e4 /indra/newview/lltexturefetch.cpp | |
parent | b43441d9024db6e2ff46e53aace14f1fb6c1bbe6 (diff) | |
parent | 32aa06139e6fb5f2e84d3e657dfbe8961170a804 (diff) |
viewer2 merge.
Diffstat (limited to 'indra/newview/lltexturefetch.cpp')
-rw-r--r-- | indra/newview/lltexturefetch.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 0053ce8df8..b1b3ae473c 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -431,11 +431,11 @@ LLTextureFetchWorker::~LLTextureFetchWorker() // << " Desired=" << mDesiredDiscard << llendl; llassert_always(!haveWork()); lockWorkMutex(); - if (mCacheReadHandle != LLTextureCache::nullHandle()) + if (mCacheReadHandle != LLTextureCache::nullHandle() && mFetcher->mTextureCache) { mFetcher->mTextureCache->readComplete(mCacheReadHandle, true); } - if (mCacheWriteHandle != LLTextureCache::nullHandle()) + if (mCacheWriteHandle != LLTextureCache::nullHandle() && mFetcher->mTextureCache) { mFetcher->mTextureCache->writeComplete(mCacheWriteHandle, true); } @@ -1429,6 +1429,8 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image LLTextureFetch::~LLTextureFetch() { + clearDeleteList() ; + // ~LLQueuedThread() called here } @@ -1737,6 +1739,26 @@ S32 LLTextureFetch::update(U32 max_time_ms) return res; } +//called in the MAIN thread after the TextureCacheThread shuts down. +void LLTextureFetch::shutDownTextureCacheThread() +{ + if(mTextureCache) + { + llassert_always(mTextureCache->isQuitting() || mTextureCache->isStopped()) ; + mTextureCache = NULL ; + } +} + +//called in the MAIN thread after the ImageDecodeThread shuts down. +void LLTextureFetch::shutDownImageDecodeThread() +{ + if(mImageDecodeThread) + { + llassert_always(mImageDecodeThread->isQuitting() || mImageDecodeThread->isStopped()) ; + mImageDecodeThread = NULL ; + } +} + // WORKER THREAD void LLTextureFetch::startThread() { |