summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturefetch.cpp
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2007-11-09 01:56:15 +0000
committerDon Kjer <don@lindenlab.com>2007-11-09 01:56:15 +0000
commitc1920e3c1c60fb792cf091750b05de618b355878 (patch)
tree204b78e0f0b87fb2875b90af0f579d53e3138cbb /indra/newview/lltexturefetch.cpp
parent760f2ceb1518d87e865f25ac87a540625e974517 (diff)
EFFECTIVE MERGE: svn merge -r 70833:71458 svn+ssh://svn/svn/linden/branches/maintenance-2 into release
ACTUAL MERGE: svn merge -r 73210:73222 svn+ssh://svn/svn/linden/qa/maintenance-2-merge-73206 into release
Diffstat (limited to 'indra/newview/lltexturefetch.cpp')
-rw-r--r--indra/newview/lltexturefetch.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index ae42ec60d3..9464146742 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -1294,11 +1294,21 @@ bool LLTextureFetch::createRequest(const LLUUID& id, const LLHost& host, F32 pri
return false;
}
}
- // If the requester knows the dimentions of the image,
- // this will calculate how much data we need without having to parse the header
+
S32 desired_size;
- if (w*h*c > 0)
+ if ((discard == 0) && worker && worker->mFileSize)
+ {
+ // if we want the entire image, and we know its size, then get it all
+ // (calcDataSizeJ2C() below makes assumptions about how the image
+ // was compressed - this code ensures that when we request the entire image,
+ // we really do get it.)
+ desired_size = worker->mFileSize;
+ }
+ else if (w*h*c > 0)
{
+ // If the requester knows the dimentions of the image,
+ // this will calculate how much data we need without having to parse the header
+
desired_size = LLImageJ2C::calcDataSizeJ2C(w, h, c, discard);
}
else