summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llvoavatar.cpp15
-rw-r--r--indra/newview/llwearable.cpp3
-rw-r--r--indra/newview/llwearable.h3
3 files changed, 10 insertions, 11 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 86e07c3126..1954a573d4 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -4228,21 +4228,21 @@ void LLVOAvatar::checkTextureLoading()
static const F32 MAX_INVISIBLE_WAITING_TIME = 30.f ; //seconds
BOOL pause = !isVisible() ;
+ if(!pause)
+ {
+ mInvisibleTimer.reset() ;
+ }
if(mLoadedCallbacksPaused == pause)
{
return ;
}
- if(mCallbackTextureList.empty())
+ if(mCallbackTextureList.empty()) //when is self or no callbacks. Note: this list for self is always empty.
{
mLoadedCallbacksPaused = pause ;
return ; //nothing to check.
}
-
- if(!pause)
- {
- mInvisibleTimer.reset() ;
- }
+
if(pause && mInvisibleTimer.getElapsedTimeF32() < MAX_INVISIBLE_WAITING_TIME)
{
return ;
@@ -4263,7 +4263,7 @@ void LLVOAvatar::checkTextureLoading()
static const F32 START_AREA = 100.f ;
tex->unpauseLoadedCallbacks(this) ;
- tex->addTextureStats(START_AREA); //jump satrt the fetching again
+ tex->addTextureStats(START_AREA); //jump start the fetching again
}
}
}
@@ -4274,6 +4274,7 @@ void LLVOAvatar::checkTextureLoading()
void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel_area, F32 texel_area_ratio, S32 boost_level)
{
+ //if this function is not called for the last 512 frames, the texture pipeline will stop fetching this texture.
static const S32 MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL = 512 ; //frames
imagep->resetTextureStats();
diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp
index c74782162b..ec9c78ee53 100644
--- a/indra/newview/llwearable.cpp
+++ b/indra/newview/llwearable.cpp
@@ -106,7 +106,6 @@ LLWearable::LLWearable(const LLAssetID& asset_id) :
LLWearable::~LLWearable()
{
- LLLoadedCallbackEntry::cleanUpCallbackList(&mCallbackTextureList, this) ;
}
const std::string& LLWearable::getTypeLabel() const
@@ -446,7 +445,7 @@ BOOL LLWearable::importFile( LLFILE* file )
}
image->setBoostLevel(LLViewerTexture::BOOST_AVATAR_SELF) ;
- image->setLoadedCallback(LLVOAvatarSelf::debugOnTimingLocalTexLoaded,0,TRUE,FALSE, new LLVOAvatarSelf::LLAvatarTexData(id, (LLVOAvatarDefines::ETextureIndex)te), this, &mCallbackTextureList);
+ image->setLoadedCallback(LLVOAvatarSelf::debugOnTimingLocalTexLoaded,0,TRUE,FALSE, new LLVOAvatarSelf::LLAvatarTexData(id, (LLVOAvatarDefines::ETextureIndex)te), NULL, NULL);
LLUUID textureid(text_buffer);
mTEMap[te] = new LLLocalTextureObject(image, textureid);
diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h
index 34a231c4bb..9ca8a9c3f9 100644
--- a/indra/newview/llwearable.h
+++ b/indra/newview/llwearable.h
@@ -164,8 +164,7 @@ private:
te_map_t mTEMap; // maps TE to LocalTextureObject
te_map_t mSavedTEMap; // last saved version of TEMap
- LLUUID mItemID; // ID of the inventory item in the agent's inventory
- LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ;
+ LLUUID mItemID; // ID of the inventory item in the agent's inventory
};
#endif // LL_LLWEARABLE_H