From bcc2547911fe6bd3ab433118dcdbfd84b3f024ec Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 9 Mar 2012 16:34:17 -0500 Subject: SH-2970 WIP - more phase tracking --- indra/newview/llvoavatar.cpp | 9 +++++++++ indra/newview/llvoavatar.h | 1 + indra/newview/llvoavatarself.cpp | 8 ++++++++ indra/newview/llvoavatarself.h | 1 + 4 files changed, 19 insertions(+) (limited to 'indra') diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 9cfc0f2fdd..2dbf3ac698 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -983,6 +983,15 @@ void LLVOAvatar::stopPhase(const std::string& phase_name) timer.pause(); } +void LLVOAvatar::stopAllPhases() +{ + for (phase_map_t::iterator iter = mPhases.begin(); + iter != mPhases.end(); ++iter) + { + iter->second.pause(); + } +} + void LLVOAvatar::clearPhases() { mPhases.clear(); diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 143b61b70b..df9d8143b1 100755 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -287,6 +287,7 @@ public: LLFrameTimer& getPhaseTimer(const std::string& phase_name); void startPhase(const std::string& phase_name); void stopPhase(const std::string& phase_name); + void stopAllPhases(); void clearPhases(); LLSD dumpPhases(); protected: diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index ed3295c43c..27d499b9c4 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -98,6 +98,14 @@ void selfClearPhases() } } +void selfStopAllPhases() +{ + if (isAgentAvatarValid()) + { + gAgentAvatarp->stopAllPhases(); + } +} + using namespace LLVOAvatarDefines; /********************************************************************************* diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 9ac4306419..c9098f174c 100755 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -390,6 +390,7 @@ BOOL isAgentAvatarValid(); void selfStartPhase(const std::string& phase_name); void selfStopPhase(const std::string& phase_name); +void selfStopAllPhases(); void selfClearPhases(); #endif // LL_VO_AVATARSELF_H -- cgit v1.2.3