summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2011-12-01 12:06:47 -0700
committerXiaohong Bao <bao@lindenlab.com>2011-12-01 12:06:47 -0700
commit8aa0ef2636b15e0e8a4e15df3169a17b2d15e8d2 (patch)
tree6345179fcb8d4a8d328ff6486f592d2b2f8c96ac /indra
parent6c34646aa91bdd55c39de25653710a89a7f01070 (diff)
fix for SH-2560: Nearby avatar textures fail to load
and SH-2671: sometimes other avatar textures don't load
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llviewertexture.cpp29
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.