aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview
diff options
context:
space:
mode:
authorArmin Weatherwax2010-07-14 14:34:13 +0200
committerMcCabe Maxsted2010-07-22 07:49:09 -0700
commit3f32470363a1a57381271366eb32f40454692892 (patch)
tree23b72299fa1ab6d3b14f6c106044647cfbf28e05 /linden/indra/newview
parentGroup like items in the Advanced menu (diff)
downloadmeta-impy-3f32470363a1a57381271366eb32f40454692892.zip
meta-impy-3f32470363a1a57381271366eb32f40454692892.tar.gz
meta-impy-3f32470363a1a57381271366eb32f40454692892.tar.bz2
meta-impy-3f32470363a1a57381271366eb32f40454692892.tar.xz
different approach to delete broken images ( components > 4 )
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewerimage.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/linden/indra/newview/llviewerimage.cpp b/linden/indra/newview/llviewerimage.cpp
index 62539a6..400fb2f 100644
--- a/linden/indra/newview/llviewerimage.cpp
+++ b/linden/indra/newview/llviewerimage.cpp
@@ -545,7 +545,14 @@ BOOL LLViewerImage::createTexture(S32 usename/*= 0*/)
545 destroyRawImage(); 545 destroyRawImage();
546 return FALSE; 546 return FALSE;
547 } 547 }
548 548 if (mRawImage->getComponents()>4)
549 {
550 LL_DEBUGS("Openjpeg")<<"broken raw image" << LL_ENDL;
551 setIsMissingAsset();
552 destroyRawImage();
553 return FALSE;
554 }
555
549 res = LLImageGL::createGLTexture(mRawDiscardLevel, mRawImage, usename); 556 res = LLImageGL::createGLTexture(mRawDiscardLevel, mRawImage, usename);
550 } 557 }
551 558
@@ -1058,6 +1065,11 @@ bool LLViewerImage::updateFetch()
1058 { 1065 {
1059 if (getComponents() != mRawImage->getComponents()) 1066 if (getComponents() != mRawImage->getComponents())
1060 { 1067 {
1068 // We've changed the number of components, so we need to move any
1069 // objects using this pool to a different pool.
1070 mComponents = mRawImage->getComponents();
1071 gImageList.dirtyImage(this);
1072/*
1061 // Do a quick sanity check to make sure we can actually 1073 // Do a quick sanity check to make sure we can actually
1062 // use the right number of components here -- MC 1074 // use the right number of components here -- MC
1063 if ((U32)mRawImage->getComponents() > 4) 1075 if ((U32)mRawImage->getComponents() > 4)
@@ -1079,6 +1091,7 @@ bool LLViewerImage::updateFetch()
1079 mComponents = mRawImage->getComponents(); 1091 mComponents = mRawImage->getComponents();
1080 gImageList.dirtyImage(this); 1092 gImageList.dirtyImage(this);
1081 } 1093 }
1094*/
1082 } 1095 }
1083 1096
1084 mFullWidth = mRawImage->getWidth() << mRawDiscardLevel; 1097 mFullWidth = mRawImage->getWidth() << mRawDiscardLevel;