diff options
author | McCabe Maxsted | 2011-03-04 17:34:19 -0700 |
---|---|---|
committer | McCabe Maxsted | 2011-03-04 17:34:19 -0700 |
commit | bf2203ac04a0b9cff32b29a633fcc18eebb988ec (patch) | |
tree | 73e65c3f06a06991c5cd3e09a6639c8053260d1a /linden/indra/newview/lltexturefetch.cpp | |
parent | Fix #778: Textures get stuck half fetched. (diff) | |
parent | Workaround #726: SIGSEGV in memcpy in LLImageRaw::LLImageRaw with data=0 (diff) | |
download | meta-impy-bf2203ac04a0b9cff32b29a633fcc18eebb988ec.zip meta-impy-bf2203ac04a0b9cff32b29a633fcc18eebb988ec.tar.gz meta-impy-bf2203ac04a0b9cff32b29a633fcc18eebb988ec.tar.bz2 meta-impy-bf2203ac04a0b9cff32b29a633fcc18eebb988ec.tar.xz |
Merge remote branch 'thickbrick/weekly' into weekly
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() |