diff options
author | McCabe Maxsted | 2010-05-13 19:21:19 -0700 |
---|---|---|
committer | Jacek Antonelli | 2010-06-19 02:05:25 -0500 |
commit | 34bc68611a3d3879b5645929c24eacb6778db2f3 (patch) | |
tree | 1ac8c5d9ef2c87b2beacf9a53823aac0bace02aa | |
parent | Added brandable buy currency button in the status bar (#273). Effectively rev... (diff) | |
download | meta-impy-34bc68611a3d3879b5645929c24eacb6778db2f3.zip meta-impy-34bc68611a3d3879b5645929c24eacb6778db2f3.tar.gz meta-impy-34bc68611a3d3879b5645929c24eacb6778db2f3.tar.bz2 meta-impy-34bc68611a3d3879b5645929c24eacb6778db2f3.tar.xz |
Stops an avatar's texture from flickering on OS but leaves behind the corrupt texture until they rebake. A half-fix at best. Maybe. Revert if it causes problems
-rw-r--r-- | linden/indra/newview/llviewerimage.cpp | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/linden/indra/newview/llviewerimage.cpp b/linden/indra/newview/llviewerimage.cpp index 3a14bf0..62539a6 100644 --- a/linden/indra/newview/llviewerimage.cpp +++ b/linden/indra/newview/llviewerimage.cpp | |||
@@ -776,6 +776,10 @@ void LLViewerImage::switchToCachedImage() | |||
776 | // We've changed the number of components, so we need to move any | 776 | // We've changed the number of components, so we need to move any |
777 | // objects using this pool to a different pool. | 777 | // objects using this pool to a different pool. |
778 | mComponents = mRawImage->getComponents(); | 778 | mComponents = mRawImage->getComponents(); |
779 | if ((U32)mComponents > 4) | ||
780 | { | ||
781 | LL_DEBUGS("Openjpeg") << "Bad number of components for mRawImage: " << (U32)mComponents << "!" << llendl; | ||
782 | } | ||
779 | gImageList.dirtyImage(this); | 783 | gImageList.dirtyImage(this); |
780 | } | 784 | } |
781 | 785 | ||
@@ -1054,10 +1058,27 @@ bool LLViewerImage::updateFetch() | |||
1054 | { | 1058 | { |
1055 | if (getComponents() != mRawImage->getComponents()) | 1059 | if (getComponents() != mRawImage->getComponents()) |
1056 | { | 1060 | { |
1057 | // We've changed the number of components, so we need to move any | 1061 | // Do a quick sanity check to make sure we can actually |
1058 | // objects using this pool to a different pool. | 1062 | // use the right number of components here -- MC |
1059 | mComponents = mRawImage->getComponents(); | 1063 | if ((U32)mRawImage->getComponents() > 4) |
1060 | gImageList.dirtyImage(this); | 1064 | { |
1065 | LL_DEBUGS("Openjpeg") << "Bad number of components for mRawImage->getComponents(): " << (U32)mRawImage->getComponents() << "! Stopping fetching of the texture" << llendl; | ||
1066 | |||
1067 | destroyRawImage(); | ||
1068 | setIsMissingAsset(); | ||
1069 | mRawDiscardLevel = INVALID_DISCARD_LEVEL ; | ||
1070 | mIsFetching = FALSE ; | ||
1071 | gImageList.deleteImage(this); | ||
1072 | |||
1073 | return FALSE; | ||
1074 | } | ||
1075 | else | ||
1076 | { | ||
1077 | // We've changed the number of components, so we need to move any | ||
1078 | // objects using this pool to a different pool. | ||
1079 | mComponents = mRawImage->getComponents(); | ||
1080 | gImageList.dirtyImage(this); | ||
1081 | } | ||
1061 | } | 1082 | } |
1062 | 1083 | ||
1063 | mFullWidth = mRawImage->getWidth() << mRawDiscardLevel; | 1084 | mFullWidth = mRawImage->getWidth() << mRawDiscardLevel; |