From c1920e3c1c60fb792cf091750b05de618b355878 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Fri, 9 Nov 2007 01:56:15 +0000 Subject: 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 --- indra/newview/lltexturefetch.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'indra/newview/lltexturefetch.cpp') 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 -- cgit v1.2.3