summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturefetch.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-03-25 22:50:26 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-03-25 22:50:26 +0000
commit6fcf38217e8772b2f90c7a8e7ce6b60071f6d20c (patch)
treea8e35fe195cc86c616daf9d8a21571e04bc2bc35 /indra/newview/lltexturefetch.cpp
parent11a3589665aae1a2423e258e40eba45c117627d5 (diff)
merge release@82858 maint-render-2-merge@83010 -> release
QAR-389
Diffstat (limited to 'indra/newview/lltexturefetch.cpp')
-rw-r--r--indra/newview/lltexturefetch.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 008eaccdc4..acd64220d9 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -474,7 +474,7 @@ void LLTextureFetchWorker::setDesiredDiscard(S32 discard, S32 size)
mDesiredDiscard = discard;
mDesiredSize = size;
}
- else if (size > mDesiredSize)
+ else if (size > mDesiredSize || size == 0)
{
mDesiredSize = size;
prioritize = true;
@@ -571,7 +571,8 @@ bool LLTextureFetchWorker::doWork(S32 param)
U32 cache_priority = mWorkPriority;
S32 offset = mFormattedImage.notNull() ? mFormattedImage->getDataSize() : 0;
S32 size = mDesiredSize - offset;
- if (size <= 0)
+
+ if(mDesiredSize != 0 && size <= 0)
{
mState = CACHE_POST;
return false;
@@ -1304,6 +1305,13 @@ bool LLTextureFetch::createRequest(const LLUUID& id, const LLHost& host, F32 pri
// we really do get it.)
desired_size = worker->mFileSize;
}
+ else if ((discard == 0) && worker == NULL)
+ {
+ // if we want the entire image, but we don't know its size, then send
+ // a sentinel value of zero to request the entire contents of the cache.
+ // patch supplied by resident Sheet Spotter for VWR-2404
+ desired_size = 0;
+ }
else if (w*h*c > 0)
{
// If the requester knows the dimentions of the image,