diff options
-rwxr-xr-x[-rw-r--r--] | indra/newview/llagentwearables.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llagentwearablesfetch.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/llappearancemgr.cpp | 32 | ||||
-rwxr-xr-x | indra/newview/llvoavatarself.cpp | 24 | ||||
-rwxr-xr-x | indra/newview/llvoavatarself.h | 4 |
5 files changed, 55 insertions, 10 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 53ca0a214a..bb6b98096b 100644..100755 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -952,6 +952,8 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs if (isAgentAvatarValid()) { + gAgentAvatarp->clearPhases(); // reset phase timers for outfit loading. + gAgentAvatarp->startPhase("process_initial_wearables_update"); gAgentAvatarp->outputRezTiming("Received initial wearables update"); } @@ -1627,6 +1629,7 @@ void LLAgentWearables::queryWearableCache() { if (isAgentAvatarValid()) { + selfStartPhase("fetch_texture_cache_entries"); gAgentAvatarp->outputRezTiming("Fetching textures from cache"); } diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp index 8cba54347e..2735c7ef39 100644 --- a/indra/newview/llagentwearablesfetch.cpp +++ b/indra/newview/llagentwearablesfetch.cpp @@ -89,6 +89,7 @@ LLInitialWearablesFetch::LLInitialWearablesFetch(const LLUUID& cof_id) : { if (isAgentAvatarValid()) { + gAgentAvatarp->startPhase("initial_wearables_fetch"); gAgentAvatarp->outputRezTiming("Initial wearables fetch started"); } } @@ -107,6 +108,7 @@ void LLInitialWearablesFetch::done() doOnIdleOneTime(boost::bind(&LLInitialWearablesFetch::processContents,this)); if (isAgentAvatarValid()) { + gAgentAvatarp->stopPhase("initial_wearables_fetch"); gAgentAvatarp->outputRezTiming("Initial wearables fetch done"); } } diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index c7da1f7b8c..13f76c0593 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -161,6 +161,8 @@ public: { mCatID = cat_id; mAppend = append; + + selfStartPhase("wear_inventory_category_callback"); } void fire(const LLUUID& item_id) { @@ -172,6 +174,7 @@ public: * after the last item has fired the event and dereferenced it -- if all * the events actually fire! */ + selfStopPhase("wear_inventory_category_callback"); } protected: @@ -217,11 +220,14 @@ LLUpdateAppearanceOnDestroy::LLUpdateAppearanceOnDestroy(bool update_base_outfit mFireCount(0), mUpdateBaseOrder(update_base_outfit_ordering) { + selfStartPhase("update_appearance_on_destroy"); } LLUpdateAppearanceOnDestroy::~LLUpdateAppearanceOnDestroy() { llinfos << self_av_string() << "done update appearance on destroy" << llendl; + + selfStopPhase("update_appearance_on_destroy"); if (!LLApp::isExiting()) { @@ -344,14 +350,16 @@ LLWearableHoldingPattern::LLWearableHoldingPattern(): } sActiveHoldingPatterns.insert(this); - gAgentAvatarp->clearPhases(); - gAgentAvatarp->startPhase("holding_pattern"); + selfStartPhase("holding_pattern"); } LLWearableHoldingPattern::~LLWearableHoldingPattern() { sActiveHoldingPatterns.erase(this); - gAgentAvatarp->stopPhase("holding_pattern"); + if (isMostRecent()) + { + selfStopPhase("holding_pattern"); + } } bool LLWearableHoldingPattern::isMostRecent() @@ -439,10 +447,8 @@ void LLWearableHoldingPattern::checkMissingWearables() } resetTime(60.0F); - if (!isMissingCompleted()) - { - gAgentAvatarp->startPhase("get_missing_wearables"); - } + + selfStartPhase("get_missing_wearables"); if (!pollMissingWearables()) { doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollMissingWearables,this)); @@ -506,7 +512,7 @@ void LLWearableHoldingPattern::onAllComplete() void LLWearableHoldingPattern::onFetchCompletion() { - gAgentAvatarp->stopPhase("get_wearables"); + selfStopPhase("get_wearables"); if (!isMostRecent()) { @@ -715,7 +721,8 @@ bool LLWearableHoldingPattern::pollMissingWearables() if (done) { - gAgentAvatarp->stopPhase("get_missing_wearables"); + selfStopPhase("get_missing_wearables"); + gAgentAvatarp->debugWearablesLoaded(); // BAP - if we don't call clearCOFLinksForMissingWearables() @@ -1701,6 +1708,8 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) return; } + selfStartPhase("update_appearance_from_cof"); + BoolSetter setIsInUpdateAppearanceFromCOF(mIsInUpdateAppearanceFromCOF); llinfos << self_av_string() << "starting" << llendl; @@ -1795,7 +1804,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering) } } - gAgentAvatarp->startPhase("get_wearables"); + selfStartPhase("get_wearables"); for (LLWearableHoldingPattern::found_list_t::iterator it = holder->getFoundList().begin(); it != holder->getFoundList().end(); ++it) @@ -1874,6 +1883,9 @@ void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool { if(!category) return; + selfClearPhases(); + selfStartPhase("wear_inventory_category"); + gAgentWearables.notifyLoadingStarted(); llinfos << self_av_string() << "wearInventoryCategory( " << category->getName() diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 2c206347bc..ed3295c43c 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -74,6 +74,30 @@ BOOL isAgentAvatarValid() (!gAgentAvatarp->isDead())); } +void selfStartPhase(const std::string& phase_name) +{ + if (isAgentAvatarValid()) + { + gAgentAvatarp->startPhase(phase_name); + } +} + +void selfStopPhase(const std::string& phase_name) +{ + if (isAgentAvatarValid()) + { + gAgentAvatarp->stopPhase(phase_name); + } +} + +void selfClearPhases() +{ + if (isAgentAvatarValid()) + { + gAgentAvatarp->clearPhases(); + } +} + using namespace LLVOAvatarDefines; /********************************************************************************* diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index aaceff933a..9ac4306419 100755 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -388,4 +388,8 @@ extern LLVOAvatarSelf *gAgentAvatarp; BOOL isAgentAvatarValid(); +void selfStartPhase(const std::string& phase_name); +void selfStopPhase(const std::string& phase_name); +void selfClearPhases(); + #endif // LL_VO_AVATARSELF_H |