summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-xindra/newview/llvoavatar.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 47f7ce0f62..9cfc0f2fdd 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -875,6 +875,8 @@ LLVOAvatar::~LLVOAvatar()
mAnimationSources.clear();
LLLoadedCallbackEntry::cleanUpCallbackList(&mCallbackTextureList) ;
+ clearPhases();
+
lldebugs << "LLVOAvatar Destructor end" << llendl;
}
@@ -957,6 +959,46 @@ S32 LLVOAvatar::getRezzedStatus() const
return 1; // gray
}
+LLFrameTimer& LLVOAvatar::getPhaseTimer(const std::string& phase_name)
+{
+ phase_map_t::iterator iter = mPhases.find(phase_name);
+ if (iter == mPhases.end())
+ {
+ LLFrameTimer timer;
+ mPhases[phase_name] = timer;
+ }
+ LLFrameTimer& timer = mPhases[phase_name];
+ return timer;
+}
+
+void LLVOAvatar::startPhase(const std::string& phase_name)
+{
+ LLFrameTimer& timer = getPhaseTimer(phase_name);
+ timer.unpause();
+}
+
+void LLVOAvatar::stopPhase(const std::string& phase_name)
+{
+ LLFrameTimer& timer = getPhaseTimer(phase_name);
+ timer.pause();
+}
+
+void LLVOAvatar::clearPhases()
+{
+ mPhases.clear();
+}
+
+LLSD LLVOAvatar::dumpPhases()
+{
+ LLSD result;
+ for (phase_map_t::iterator iter = mPhases.begin(); iter != mPhases.end(); ++iter)
+ {
+ result[iter->first]["completed"] = !(iter->second.getStarted());
+ result[iter->first]["elapsed"] = iter->second.getElapsedTimeF32();
+ }
+ return result;
+}
+
void LLVOAvatar::deleteLayerSetCaches(bool clearAll)
{
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)