diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2011-12-01 12:08:30 -0700 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2011-12-01 12:08:30 -0700 |
commit | 9b46ed5f812b2a3bd5e5f0282011556d5dfa147a (patch) | |
tree | 2019d43a464924968b7315980a89af484e01572e /indra | |
parent | bdb74cc3bebdca0e7452bfe20abe09e5416392ee (diff) | |
parent | 8aa0ef2636b15e0e8a4e15df3169a17b2d15e8d2 (diff) |
Automated merge with https://bitbucket.org/VirLinden/viewer-development-shining-fixes
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llviewertexture.cpp | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 786e2b73b1..b0f5361a79 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -2269,6 +2269,7 @@ void LLViewerFetchedTexture::unpauseLoadedCallbacks(const LLLoadedCallbackEntry: } } mPauseLoadedCallBacks = FALSE ; + mLastCallBackActiveTime = sCurrentTime ; if(need_raw) { mSaveRawImage = TRUE ; @@ -2310,6 +2311,11 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() { static const F32 MAX_INACTIVE_TIME = 120.f ; //seconds + if(mPauseLoadedCallBacks) + { + destroyRawImage(); + return false; //paused + } if (mNeedsCreateTexture) { return false; @@ -2337,12 +2343,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks() // Remove ourself from the global list of textures with callbacks gTextureList.mCallbackList.erase(this); - } - if(mPauseLoadedCallBacks) - { - destroyRawImage(); - return res; //paused - } + } S32 gl_discard = getDiscardLevel(); @@ -2604,7 +2605,11 @@ bool LLViewerFetchedTexture::needsToSaveRawImage() void LLViewerFetchedTexture::destroyRawImage() { - if (mAuxRawImage.notNull()) sAuxCount--; + if (mAuxRawImage.notNull()) + { + sAuxCount--; + mAuxRawImage = NULL; + } if (mRawImage.notNull()) { @@ -2618,12 +2623,12 @@ void LLViewerFetchedTexture::destroyRawImage() } setCachedRawImage() ; } + + mRawImage = NULL; + + mIsRawImageValid = FALSE; + mRawDiscardLevel = INVALID_DISCARD_LEVEL; } - - mRawImage = NULL; - mAuxRawImage = NULL; - mIsRawImageValid = FALSE; - mRawDiscardLevel = INVALID_DISCARD_LEVEL; } //use the mCachedRawImage to (re)generate the gl texture. |