aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lltexturecache.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/lltexturecache.cpp71
1 files changed, 37 insertions, 34 deletions
diff --git a/linden/indra/newview/lltexturecache.cpp b/linden/indra/newview/lltexturecache.cpp
index c9ad5a3..cf4304b 100644
--- a/linden/indra/newview/lltexturecache.cpp
+++ b/linden/indra/newview/lltexturecache.cpp
@@ -186,7 +186,7 @@ bool LLTextureCacheLocalFileWorker::doRead()
186 186
187 if (mImageFormat == IMG_CODEC_INVALID) 187 if (mImageFormat == IMG_CODEC_INVALID)
188 { 188 {
189 llwarns << "Unrecognized file extension " << extension << " for local texture " << mFileName << llendl; 189// llwarns << "Unrecognized file extension " << extension << " for local texture " << mFileName << llendl;
190 mDataSize = 0; // no data 190 mDataSize = 0; // no data
191 return true; 191 return true;
192 } 192 }
@@ -227,9 +227,9 @@ bool LLTextureCacheLocalFileWorker::doRead()
227 { 227 {
228 if (mBytesRead != mBytesToRead) 228 if (mBytesRead != mBytesToRead)
229 { 229 {
230 llwarns << "Error reading file from local cache: " << local_filename 230// llwarns << "Error reading file from local cache: " << local_filename
231 << " Bytes: " << mDataSize << " Offset: " << mOffset 231// << " Bytes: " << mDataSize << " Offset: " << mOffset
232 << " / " << mDataSize << llendl; 232// << " / " << mDataSize << llendl;
233 mDataSize = 0; // failed 233 mDataSize = 0; // failed
234 delete[] mReadData; 234 delete[] mReadData;
235 mReadData = NULL; 235 mReadData = NULL;
@@ -251,9 +251,9 @@ bool LLTextureCacheLocalFileWorker::doRead()
251 mReadData, mOffset, mDataSize); 251 mReadData, mOffset, mDataSize);
252 if (bytes_read != mDataSize) 252 if (bytes_read != mDataSize)
253 { 253 {
254 llwarns << "Error reading file from local cache: " << mFileName 254// llwarns << "Error reading file from local cache: " << mFileName
255 << " Bytes: " << mDataSize << " Offset: " << mOffset 255// << " Bytes: " << mDataSize << " Offset: " << mOffset
256 << " / " << mDataSize << llendl; 256// << " / " << mDataSize << llendl;
257 mDataSize = 0; 257 mDataSize = 0;
258 delete[] mReadData; 258 delete[] mReadData;
259 mReadData = NULL; 259 mReadData = NULL;
@@ -368,9 +368,9 @@ bool LLTextureCacheRemoteWorker::doRead()
368 { 368 {
369 if (mBytesRead != mBytesToRead) 369 if (mBytesRead != mBytesToRead)
370 { 370 {
371 llwarns << "Error reading file from local cache: " << local_filename 371// llwarns << "Error reading file from local cache: " << local_filename
372 << " Bytes: " << mDataSize << " Offset: " << mOffset 372// << " Bytes: " << mDataSize << " Offset: " << mOffset
373 << " / " << mDataSize << llendl; 373// << " / " << mDataSize << llendl;
374 mDataSize = 0; // failed 374 mDataSize = 0; // failed
375 delete[] mReadData; 375 delete[] mReadData;
376 mReadData = NULL; 376 mReadData = NULL;
@@ -392,9 +392,9 @@ bool LLTextureCacheRemoteWorker::doRead()
392 mReadData, mOffset, mDataSize); 392 mReadData, mOffset, mDataSize);
393 if (bytes_read != mDataSize) 393 if (bytes_read != mDataSize)
394 { 394 {
395 llwarns << "Error reading file from local cache: " << local_filename 395// llwarns << "Error reading file from local cache: " << local_filename
396 << " Bytes: " << mDataSize << " Offset: " << mOffset 396// << " Bytes: " << mDataSize << " Offset: " << mOffset
397 << " / " << mDataSize << llendl; 397// << " / " << mDataSize << llendl;
398 mDataSize = 0; 398 mDataSize = 0;
399 delete[] mReadData; 399 delete[] mReadData;
400 mReadData = NULL; 400 mReadData = NULL;
@@ -455,9 +455,9 @@ bool LLTextureCacheRemoteWorker::doRead()
455 { 455 {
456 if (mBytesRead != mBytesToRead) 456 if (mBytesRead != mBytesToRead)
457 { 457 {
458 llwarns << "LLTextureCacheWorker: " << mID 458// llwarns << "LLTextureCacheWorker: " << mID
459 << " incorrect number of bytes read from header: " << mBytesRead 459// << " incorrect number of bytes read from header: " << mBytesRead
460 << " != " << mBytesToRead << llendl; 460// << " != " << mBytesToRead << llendl;
461 mDataSize = -1; // failed 461 mDataSize = -1; // failed
462 return true; 462 return true;
463 } 463 }
@@ -486,9 +486,9 @@ bool LLTextureCacheRemoteWorker::doRead()
486 mReadData, offset, size); 486 mReadData, offset, size);
487 if (bytes_read != size) 487 if (bytes_read != size)
488 { 488 {
489 llwarns << "LLTextureCacheWorker: " << mID 489// llwarns << "LLTextureCacheWorker: " << mID
490 << " incorrect number of bytes read from header: " << bytes_read 490// << " incorrect number of bytes read from header: " << bytes_read
491 << " / " << size << llendl; 491// << " / " << size << llendl;
492 mDataSize = -1; // failed 492 mDataSize = -1; // failed
493 return true; 493 return true;
494 } 494 }
@@ -554,9 +554,9 @@ bool LLTextureCacheRemoteWorker::doRead()
554 { 554 {
555 if (mBytesRead != mBytesToRead) 555 if (mBytesRead != mBytesToRead)
556 { 556 {
557 llwarns << "LLTextureCacheWorker: " << mID 557// llwarns << "LLTextureCacheWorker: " << mID
558 << " incorrect number of bytes read from body: " << mBytesRead 558// << " incorrect number of bytes read from body: " << mBytesRead
559 << " != " << mBytesToRead << llendl; 559// << " != " << mBytesToRead << llendl;
560 mDataSize = -1; // failed 560 mDataSize = -1; // failed
561 } 561 }
562 return true; 562 return true;
@@ -593,9 +593,9 @@ bool LLTextureCacheRemoteWorker::doRead()
593 file_offset, file_size); 593 file_offset, file_size);
594 if (bytes_read != file_size) 594 if (bytes_read != file_size)
595 { 595 {
596 llwarns << "LLTextureCacheWorker: " << mID 596// llwarns << "LLTextureCacheWorker: " << mID
597 << " incorrect number of bytes read from body: " << bytes_read 597// << " incorrect number of bytes read from body: " << bytes_read
598 << " / " << file_size << llendl; 598// << " / " << file_size << llendl;
599 mDataSize = -1; // failed 599 mDataSize = -1; // failed
600 return true; 600 return true;
601 } 601 }
@@ -632,7 +632,7 @@ bool LLTextureCacheRemoteWorker::doWrite()
632 { 632 {
633 if(cur_imagesize > 0 && mImageSize != cur_imagesize) 633 if(cur_imagesize > 0 && mImageSize != cur_imagesize)
634 { 634 {
635 llwarns << "Header cache entry size: " << cur_imagesize << " != mImageSize: " << mImageSize << llendl; 635// llwarns << "Header cache entry size: " << cur_imagesize << " != mImageSize: " << mImageSize << llendl;
636 offset = 0; // re-write header 636 offset = 0; // re-write header
637 } 637 }
638 mState = offset < TEXTURE_CACHE_ENTRY_SIZE ? HEADER : BODY; 638 mState = offset < TEXTURE_CACHE_ENTRY_SIZE ? HEADER : BODY;
@@ -667,9 +667,9 @@ bool LLTextureCacheRemoteWorker::doWrite()
667 { 667 {
668 if (mBytesRead != mBytesToRead) 668 if (mBytesRead != mBytesToRead)
669 { 669 {
670 llwarns << "LLTextureCacheWorker: " << mID 670// llwarns << "LLTextureCacheWorker: " << mID
671 << " incorrect number of bytes written to header: " << mBytesRead 671// << " incorrect number of bytes written to header: " << mBytesRead
672 << " != " << mBytesToRead << llendl; 672// << " != " << mBytesToRead << llendl;
673 mDataSize = -1; // failed 673 mDataSize = -1; // failed
674 return true; 674 return true;
675 } 675 }
@@ -698,7 +698,7 @@ bool LLTextureCacheRemoteWorker::doWrite()
698 698
699 if (bytes_written <= 0) 699 if (bytes_written <= 0)
700 { 700 {
701 llwarns << "LLTextureCacheWorker: missing entry: " << mID << llendl; 701// llwarns << "LLTextureCacheWorker: missing entry: " << mID << llendl;
702 mDataSize = -1; // failed 702 mDataSize = -1; // failed
703 return true; 703 return true;
704 } 704 }
@@ -747,9 +747,9 @@ bool LLTextureCacheRemoteWorker::doWrite()
747 { 747 {
748 if (mBytesRead != mBytesToRead) 748 if (mBytesRead != mBytesToRead)
749 { 749 {
750 llwarns << "LLTextureCacheWorker: " << mID 750// llwarns << "LLTextureCacheWorker: " << mID
751 << " incorrect number of bytes written to body: " << mBytesRead 751// << " incorrect number of bytes written to body: " << mBytesRead
752 << " != " << mBytesToRead << llendl; 752// << " != " << mBytesToRead << llendl;
753 mDataSize = -1; // failed 753 mDataSize = -1; // failed
754 } 754 }
755 return true; 755 return true;
@@ -839,7 +839,10 @@ void LLTextureCacheWorker::finishWork(S32 param, bool completed)
839 { 839 {
840 delete[] mReadData; 840 delete[] mReadData;
841 mReadData = NULL; 841 mReadData = NULL;
842 842 if (mDataSize != 0)
843 {
844 llinfos << "Read Failed. mDataSize = " << mDataSize << llendl;
845 }
843 } 846 }
844 } 847 }
845 else 848 else