summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp34
1 files changed, 20 insertions, 14 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 786e2b73b1..f4bbc2b067 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 ;
@@ -2308,13 +2309,18 @@ void LLViewerFetchedTexture::pauseLoadedCallbacks(const LLLoadedCallbackEntry::s
bool LLViewerFetchedTexture::doLoadedCallbacks()
{
- static const F32 MAX_INACTIVE_TIME = 120.f ; //seconds
+ static const F32 MAX_INACTIVE_TIME = 900.f ; //seconds
if (mNeedsCreateTexture)
{
return false;
}
- if(sCurrentTime - mLastCallBackActiveTime > MAX_INACTIVE_TIME)
+ if(mPauseLoadedCallBacks)
+ {
+ destroyRawImage();
+ return false; //paused
+ }
+ if(sCurrentTime - mLastCallBackActiveTime > MAX_INACTIVE_TIME && !mIsFetching)
{
clearCallbackEntryList() ; //remove all callbacks.
return false ;
@@ -2337,12 +2343,8 @@ bool LLViewerFetchedTexture::doLoadedCallbacks()
// Remove ourself from the global list of textures with callbacks
gTextureList.mCallbackList.erase(this);
- }
- if(mPauseLoadedCallBacks)
- {
- destroyRawImage();
- return res; //paused
- }
+ return false ;
+ }
S32 gl_discard = getDiscardLevel();
@@ -2604,7 +2606,11 @@ bool LLViewerFetchedTexture::needsToSaveRawImage()
void LLViewerFetchedTexture::destroyRawImage()
{
- if (mAuxRawImage.notNull()) sAuxCount--;
+ if (mAuxRawImage.notNull())
+ {
+ sAuxCount--;
+ mAuxRawImage = NULL;
+ }
if (mRawImage.notNull())
{
@@ -2618,12 +2624,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.