diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llcharacter/llcharacter.cpp | 6 | ||||
-rw-r--r-- | indra/llcharacter/lleditingmotion.cpp | 3 | ||||
-rw-r--r-- | indra/llcharacter/llkeyframewalkmotion.cpp | 4 | ||||
-rw-r--r-- | indra/llcharacter/llmotioncontroller.cpp | 24 |
4 files changed, 32 insertions, 5 deletions
diff --git a/indra/llcharacter/llcharacter.cpp b/indra/llcharacter/llcharacter.cpp index c9fb8534f1..0a6a8f9fa6 100644 --- a/indra/llcharacter/llcharacter.cpp +++ b/indra/llcharacter/llcharacter.cpp @@ -189,6 +189,7 @@ void LLCharacter::requestStopMotion( LLMotion* motion) //----------------------------------------------------------------------------- static LLFastTimer::DeclareTimer FTM_UPDATE_ANIMATION("Update Animation"); static LLFastTimer::DeclareTimer FTM_UPDATE_HIDDEN_ANIMATION("Update Hidden Anim"); +static LLFastTimer::DeclareTimer FTM_UPDATE_MOTIONS("Update Motions"); void LLCharacter::updateMotions(e_update_t update_type) { @@ -206,7 +207,10 @@ void LLCharacter::updateMotions(e_update_t update_type) mMotionController.unpauseAllMotions(); } bool force_update = (update_type == FORCE_UPDATE); - mMotionController.updateMotions(force_update); + { + LLFastTimer t(FTM_UPDATE_MOTIONS); + mMotionController.updateMotions(force_update); + } } } diff --git a/indra/llcharacter/lleditingmotion.cpp b/indra/llcharacter/lleditingmotion.cpp index 66b3c2bd25..830e323476 100644 --- a/indra/llcharacter/lleditingmotion.cpp +++ b/indra/llcharacter/lleditingmotion.cpp @@ -158,11 +158,14 @@ BOOL LLEditingMotion::onActivate() return TRUE; } +static LLFastTimer::DeclareTimer FTM_EDITING_MOTION("Editing Motion"); + //----------------------------------------------------------------------------- // LLEditingMotion::onUpdate() //----------------------------------------------------------------------------- BOOL LLEditingMotion::onUpdate(F32 time, U8* joint_mask) { + LLFastTimer t(FTM_EDITING_MOTION); LLVector3 focus_pt; LLVector3* pointAtPt = (LLVector3*)mCharacter->getAnimationData("PointAtPoint"); diff --git a/indra/llcharacter/llkeyframewalkmotion.cpp b/indra/llcharacter/llkeyframewalkmotion.cpp index d52eb89a5c..ea63f9f8dc 100644 --- a/indra/llcharacter/llkeyframewalkmotion.cpp +++ b/indra/llcharacter/llkeyframewalkmotion.cpp @@ -196,11 +196,15 @@ BOOL LLWalkAdjustMotion::onActivate() return TRUE; } +static LLFastTimer::DeclareTimer FTM_WALK_ADJUST_MOTION("Walk Adjust"); + //----------------------------------------------------------------------------- // LLWalkAdjustMotion::onUpdate() //----------------------------------------------------------------------------- BOOL LLWalkAdjustMotion::onUpdate(F32 time, U8* joint_mask) { + LLFastTimer t(FTM_WALK_ADJUST_MOTION); + // delta_time is guaranteed to be non zero F32 delta_time = llclamp(time - mLastTime, TIME_EPSILON, MAX_TIME_DELTA); mLastTime = time; diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index bb892f4a7f..e7ec83efc0 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -539,11 +539,14 @@ void LLMotionController::updateIdleActiveMotions() } } +static LLFastTimer::DeclareTimer FTM_UPDATE_MOTIONS_BY_TYPE("Update Motions By Type"); + //----------------------------------------------------------------------------- // updateMotionsByType() //----------------------------------------------------------------------------- void LLMotionController::updateMotionsByType(LLMotion::LLMotionBlendType anim_type) { + LLFastTimer t(FTM_UPDATE_MOTIONS_BY_TYPE); BOOL update_result = TRUE; U8 last_joint_signature[LL_CHARACTER_MAX_JOINTS]; @@ -795,6 +798,9 @@ void LLMotionController::updateLoadingMotions() // call updateMotion() or updateMotionsMinimal() every frame //----------------------------------------------------------------------------- +static LLFastTimer::DeclareTimer FTM_UPDATE_MOTION_PURGE_EXCESS("Purge Excess Motions"); +static LLFastTimer::DeclareTimer FTM_UPDATE_LOADING_MOTIONS("Update Loading Motions"); + //----------------------------------------------------------------------------- // updateMotion() //----------------------------------------------------------------------------- @@ -808,8 +814,11 @@ void LLMotionController::updateMotions(bool force_update) mPrevTimerElapsed = cur_time; mLastTime = mAnimTime; - // Always cap the number of loaded motions - purgeExcessMotions(); + { + LLFastTimer t(FTM_UPDATE_MOTION_PURGE_EXCESS); + // Always cap the number of loaded motions + purgeExcessMotions(); + } // Update timing info for this time step. if (!mPaused) @@ -831,7 +840,11 @@ void LLMotionController::updateMotions(bool force_update) mLastInterp = interp; } - updateLoadingMotions(); + { + LLFastTimer t(FTM_UPDATE_LOADING_MOTIONS); + updateLoadingMotions(); + } + return; } @@ -849,7 +862,10 @@ void LLMotionController::updateMotions(bool force_update) } } - updateLoadingMotions(); + { + LLFastTimer t(FTM_UPDATE_LOADING_MOTIONS); + updateLoadingMotions(); + } resetJointSignatures(); |