diff options
Diffstat (limited to 'linden/indra/newview/lltexturefetch.cpp')
-rw-r--r-- | linden/indra/newview/lltexturefetch.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/linden/indra/newview/lltexturefetch.cpp b/linden/indra/newview/lltexturefetch.cpp index 878c2fa..ab867a6 100644 --- a/linden/indra/newview/lltexturefetch.cpp +++ b/linden/indra/newview/lltexturefetch.cpp | |||
@@ -664,16 +664,17 @@ bool LLTextureFetchWorker::doWork(S32 param) | |||
664 | mLoaded = FALSE; | 664 | mLoaded = FALSE; |
665 | setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it | 665 | setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); // Set priority first since Responder may change it |
666 | 666 | ||
667 | CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage); | ||
668 | if (mUrl.compare(0, 7, "file://") == 0) | 667 | if (mUrl.compare(0, 7, "file://") == 0) |
669 | { | 668 | { |
670 | // read file from local disk | 669 | // read file from local disk |
671 | std::string filename = mUrl.substr(7, std::string::npos); | 670 | std::string filename = mUrl.substr(7, std::string::npos); |
671 | CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage); | ||
672 | mCacheReadHandle = mFetcher->mTextureCache->readFromCache(filename, mID, cache_priority, | 672 | mCacheReadHandle = mFetcher->mTextureCache->readFromCache(filename, mID, cache_priority, |
673 | offset, size, responder); | 673 | offset, size, responder); |
674 | } | 674 | } |
675 | else if (mUrl.empty()) | 675 | else if (mUrl.empty()) |
676 | { | 676 | { |
677 | CacheReadResponder* responder = new CacheReadResponder(mFetcher, mID, mFormattedImage); | ||
677 | mCacheReadHandle = mFetcher->mTextureCache->readFromCache(mID, cache_priority, | 678 | mCacheReadHandle = mFetcher->mTextureCache->readFromCache(mID, cache_priority, |
678 | offset, size, responder); | 679 | offset, size, responder); |
679 | } | 680 | } |
@@ -723,6 +724,7 @@ bool LLTextureFetchWorker::doWork(S32 param) | |||
723 | { | 724 | { |
724 | // we have enough data, decode it | 725 | // we have enough data, decode it |
725 | llassert_always(mFormattedImage->getDataSize() > 0); | 726 | llassert_always(mFormattedImage->getDataSize() > 0); |
727 | mLoadedDiscard = mDesiredDiscard; | ||
726 | mState = DECODE_IMAGE; | 728 | mState = DECODE_IMAGE; |
727 | mWriteToCacheState = NOT_WRITE ; | 729 | mWriteToCacheState = NOT_WRITE ; |
728 | LL_DEBUGS("Texture") << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize() | 730 | LL_DEBUGS("Texture") << mID << ": Cached. Bytes: " << mFormattedImage->getDataSize() |