From 489757997a9c6ac1a0eb91468f69a5b8bb00cccb Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 7 Aug 2010 01:59:57 -0700 Subject: Applied patch by Robin Cornelius for SNOW-784: Textures remain blurry with http textures enabled --- linden/indra/newview/lltexturecache.cpp | 7 +++++++ linden/indra/newview/lltexturefetch.cpp | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'linden') diff --git a/linden/indra/newview/lltexturecache.cpp b/linden/indra/newview/lltexturecache.cpp index 3cedf73..c5c14b5 100644 --- a/linden/indra/newview/lltexturecache.cpp +++ b/linden/indra/newview/lltexturecache.cpp @@ -1063,6 +1063,13 @@ void LLTextureCache::writeEntryAndClose(S32 idx, Entry& entry) if (!mReadOnly) { entry.mTime = time(NULL); + if(entry.mImageSize < entry.mBodySize) + { + // Just say no, due to my messing around to cache discards other than 0 we can end up here + // after recalling an image from cache at a lower discard than cached. RC + return; + } + llassert_always(entry.mImageSize == 0 || entry.mImageSize == -1 || entry.mImageSize > entry.mBodySize); if (entry.mBodySize > 0) { diff --git a/linden/indra/newview/lltexturefetch.cpp b/linden/indra/newview/lltexturefetch.cpp index c9d8369..2184478 100644 --- a/linden/indra/newview/lltexturefetch.cpp +++ b/linden/indra/newview/lltexturefetch.cpp @@ -1142,7 +1142,15 @@ bool LLTextureFetchWorker::doWork(S32 param) else { setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority); - return true; + + if(mDecodedDiscard<=0) + { + return true; + } + else + { + return false; + } } } -- cgit v1.1