Added some fasttimers to LLVOAvatar::idleUpdate
This commit is contained in:
@@ -2425,6 +2425,10 @@ S32 LLVOAvatar::setTETexture(const U8 te, const LLUUID& uuid)
|
||||
|
||||
static LLFastTimer::DeclareTimer FTM_AVATAR_UPDATE("Avatar Update");
|
||||
static LLFastTimer::DeclareTimer FTM_JOINT_UPDATE("Update Joints");
|
||||
static LLFastTimer::DeclareTimer FTM_CHARACTER_UPDATE("Character Update");
|
||||
static LLFastTimer::DeclareTimer FTM_BASE_UPDATE("Base Update");
|
||||
static LLFastTimer::DeclareTimer FTM_MISC_UPDATE("Misc Update");
|
||||
static LLFastTimer::DeclareTimer FTM_DETAIL_UPDATE("Detail Update");
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// LLVOAvatar::dumpAnimationState()
|
||||
@@ -2510,7 +2514,10 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
|
||||
|
||||
if (isSelf())
|
||||
{
|
||||
LLViewerObject::idleUpdate(agent, world, time);
|
||||
{
|
||||
LLFastTimer t(FTM_BASE_UPDATE);
|
||||
LLViewerObject::idleUpdate(agent, world, time);
|
||||
}
|
||||
|
||||
// trigger fidget anims
|
||||
if (isAnyAnimationSignaled(AGENT_STAND_ANIMS, NUM_AGENT_STAND_ANIMS))
|
||||
@@ -2522,7 +2529,10 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
|
||||
{
|
||||
// Should override the idleUpdate stuff and leave out the angular update part.
|
||||
LLQuaternion rotation = getRotation();
|
||||
LLViewerObject::idleUpdate(agent, world, time);
|
||||
{
|
||||
LLFastTimer t(FTM_BASE_UPDATE);
|
||||
LLViewerObject::idleUpdate(agent, world, time);
|
||||
}
|
||||
setRotation(rotation);
|
||||
}
|
||||
|
||||
@@ -2532,8 +2542,11 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
|
||||
// animate the character
|
||||
// store off last frame's root position to be consistent with camera position
|
||||
LLVector3 root_pos_last = mRoot->getWorldPosition();
|
||||
bool detailed_update = updateCharacter(agent);
|
||||
|
||||
bool detailed_update;
|
||||
{
|
||||
LLFastTimer t(FTM_CHARACTER_UPDATE);
|
||||
detailed_update = updateCharacter(agent);
|
||||
}
|
||||
if (gNoRender)
|
||||
{
|
||||
return;
|
||||
@@ -2543,19 +2556,23 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
|
||||
bool voice_enabled = (visualizers_in_calls || LLVoiceClient::getInstance()->inProximalChannel()) &&
|
||||
LLVoiceClient::getInstance()->getVoiceEnabled(mID);
|
||||
|
||||
idleUpdateVoiceVisualizer( voice_enabled );
|
||||
idleUpdateMisc( detailed_update );
|
||||
idleUpdateAppearanceAnimation();
|
||||
if (detailed_update)
|
||||
{
|
||||
idleUpdateLipSync( voice_enabled );
|
||||
idleUpdateLoadingEffect();
|
||||
idleUpdateBelowWater(); // wind effect uses this
|
||||
idleUpdateWindEffect();
|
||||
}
|
||||
LLFastTimer t(FTM_MISC_UPDATE);
|
||||
idleUpdateVoiceVisualizer(voice_enabled);
|
||||
idleUpdateMisc(detailed_update);
|
||||
idleUpdateAppearanceAnimation();
|
||||
if (detailed_update)
|
||||
{
|
||||
LLFastTimer t(FTM_DETAIL_UPDATE);
|
||||
idleUpdateLipSync(voice_enabled);
|
||||
idleUpdateLoadingEffect();
|
||||
idleUpdateBelowWater(); // wind effect uses this
|
||||
idleUpdateWindEffect();
|
||||
}
|
||||
|
||||
idleUpdateNameTag( root_pos_last );
|
||||
idleUpdateRenderCost();
|
||||
idleUpdateNameTag(root_pos_last);
|
||||
idleUpdateRenderCost();
|
||||
}
|
||||
}
|
||||
|
||||
void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
|
||||
@@ -5171,8 +5188,10 @@ void LLVOAvatar::releaseOldTextures()
|
||||
mTextureIDs = new_texture_ids;
|
||||
}
|
||||
|
||||
static LLFastTimer::DeclareTimer FTM_TEXTURE_UPDATE("Update Textures");
|
||||
void LLVOAvatar::updateTextures()
|
||||
{
|
||||
LLFastTimer t(FTM_TEXTURE_UPDATE);
|
||||
releaseOldTextures();
|
||||
|
||||
BOOL render_avatar = TRUE;
|
||||
@@ -6167,8 +6186,10 @@ BOOL LLVOAvatar::isActive() const
|
||||
//-----------------------------------------------------------------------------
|
||||
// setPixelAreaAndAngle()
|
||||
//-----------------------------------------------------------------------------
|
||||
static LLFastTimer::DeclareTimer FTM_PIXEL_AREA("Pixel Area");
|
||||
void LLVOAvatar::setPixelAreaAndAngle(LLAgent &agent)
|
||||
{
|
||||
LLFastTimer t(FTM_PIXEL_AREA);
|
||||
if (mDrawable.isNull())
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user