summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturefetch.cpp
diff options
context:
space:
mode:
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,