diff options
Diffstat (limited to 'linden/indra/newview/lltexturefetch.cpp')
-rw-r--r-- | linden/indra/newview/lltexturefetch.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/linden/indra/newview/lltexturefetch.cpp b/linden/indra/newview/lltexturefetch.cpp index 7d5e6ab..9464146 100644 --- a/linden/indra/newview/lltexturefetch.cpp +++ b/linden/indra/newview/lltexturefetch.cpp | |||
@@ -46,7 +46,6 @@ | |||
46 | #include "llviewerimagelist.h" | 46 | #include "llviewerimagelist.h" |
47 | #include "llviewerimage.h" | 47 | #include "llviewerimage.h" |
48 | #include "llviewerregion.h" | 48 | #include "llviewerregion.h" |
49 | #include "viewer.h" | ||
50 | 49 | ||
51 | ////////////////////////////////////////////////////////////////////////////// | 50 | ////////////////////////////////////////////////////////////////////////////// |
52 | 51 | ||
@@ -1295,11 +1294,21 @@ bool LLTextureFetch::createRequest(const LLUUID& id, const LLHost& host, F32 pri | |||
1295 | return false; | 1294 | return false; |
1296 | } | 1295 | } |
1297 | } | 1296 | } |
1298 | // If the requester knows the dimentions of the image, | 1297 | |
1299 | // this will calculate how much data we need without having to parse the header | ||
1300 | S32 desired_size; | 1298 | S32 desired_size; |
1301 | if (w*h*c > 0) | 1299 | if ((discard == 0) && worker && worker->mFileSize) |
1300 | { | ||
1301 | // if we want the entire image, and we know its size, then get it all | ||
1302 | // (calcDataSizeJ2C() below makes assumptions about how the image | ||
1303 | // was compressed - this code ensures that when we request the entire image, | ||
1304 | // we really do get it.) | ||
1305 | desired_size = worker->mFileSize; | ||
1306 | } | ||
1307 | else if (w*h*c > 0) | ||
1302 | { | 1308 | { |
1309 | // If the requester knows the dimentions of the image, | ||
1310 | // this will calculate how much data we need without having to parse the header | ||
1311 | |||
1303 | desired_size = LLImageJ2C::calcDataSizeJ2C(w, h, c, discard); | 1312 | desired_size = LLImageJ2C::calcDataSizeJ2C(w, h, c, discard); |
1304 | } | 1313 | } |
1305 | else | 1314 | else |