From c1b0625f384801cadcd9b8f210fd0c48d036a8a0 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 12 Feb 2010 14:23:22 -0800 Subject: fix for EXT-4653: Textures saved with "Save As" appear to be very low rez. and beyond: remove saved raw image automatically. --- indra/newview/llviewertexture.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewertexture.cpp') diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index b66f58d853..51d99a1d36 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -2250,13 +2250,13 @@ void LLViewerFetchedTexture::destroyRawImage() if (mRawImage.notNull()) { - sRawCount--; - setCachedRawImage() ; + sRawCount--; if(mForceToSaveRawImage) { saveRawImage() ; } + setCachedRawImage() ; } mRawImage = NULL; @@ -2346,7 +2346,8 @@ void LLViewerFetchedTexture::setCachedRawImage() mRawImage->scale(w >> i, h >> i) ; } mCachedRawImage = mRawImage ; - mCachedRawDiscardLevel = mRawDiscardLevel + i ; + mRawDiscardLevel += i ; + mCachedRawDiscardLevel = mRawDiscardLevel ; } } @@ -2416,7 +2417,7 @@ BOOL LLViewerFetchedTexture::hasSavedRawImage() const F32 LLViewerFetchedTexture::getElapsedLastReferencedSavedRawImageTime() const { - return mLastReferencedSavedRawImageTime - sCurrentTime ; + return sCurrentTime - mLastReferencedSavedRawImageTime ; } //---------------------------------------------------------------------------------------------- //atlasing -- cgit v1.2.3