summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llvoavatar.cpp42
-rwxr-xr-xindra/newview/llvoavatar.h12
-rwxr-xr-xindra/newview/llvoavatarself.cpp1
3 files changed, 55 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++)
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index d4166a66b2..279ddcbe86 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -282,6 +282,13 @@ public:
BOOL isFullyTextured() const;
BOOL hasGray() const;
S32 getRezzedStatus() const; // 0 = cloud, 1 = gray, 2 = fully textured.
+
+ // Tracking progress of active/completed phases for activities like outfit changing.
+ LLFrameTimer& getPhaseTimer(const std::string& phase_name);
+ void startPhase(const std::string& phase_name);
+ void stopPhase(const std::string& phase_name);
+ void clearPhases();
+ LLSD dumpPhases();
protected:
BOOL updateIsFullyLoaded();
BOOL processFullyLoadedChange(bool loading);
@@ -296,6 +303,11 @@ private:
S32 mVisualComplexity;
LLFrameTimer mFullyLoadedTimer;
LLFrameTimer mRuthTimer;
+ typedef std::deque<LLMaskedMorph *> morph_list_t;
+
+ typedef std::map<std::string,LLFrameTimer> phase_map_t;
+ phase_map_t mPhases;
+
protected:
LLFrameTimer mInvisibleTimer;
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index f14b3c2b6b..2c206347bc 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2072,6 +2072,7 @@ LLSD LLVOAvatarSelf::metricsData()
result["timers"]["ruth"] = mRuthTimer.getElapsedTimeF32();
result["timers"]["invisible"] = mInvisibleTimer.getElapsedTimeF32();
result["timers"]["fully_loaded"] = mFullyLoadedTimer.getElapsedTimeF32();
+ result["phases"] = dumpPhases();
return result;
}