From 0897a291d16dc4002765c5eb4ed9e310ee1ba4a4 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 7 Feb 2013 11:14:37 -0500 Subject: SH-3852 WIP - small tweaks --- indra/newview/llagent.cpp | 3 ++- indra/newview/llviewerstats.cpp | 14 +++++++------- indra/newview/llviewerstats.h | 4 ++-- indra/newview/llvoavatarself.cpp | 15 +++++---------- 4 files changed, 16 insertions(+), 20 deletions(-) mode change 100644 => 100755 indra/newview/llviewerstats.cpp (limited to 'indra') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 60873cf41f..abd83485af 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -4341,7 +4341,7 @@ void LLAgent::sendAgentSetAppearance() gAgentAvatarp->getPhases().stopPhase("process_initial_wearables_update"); gAgentAvatarp->getPhases().stopPhase("wear_inventory_category"); } - + gAgentAvatarp->sendAppearanceChangeMetrics(); if (!isAgentAvatarValid() || (getRegion() && getRegion()->getCentralBakeVersion())) return; @@ -4409,6 +4409,7 @@ void LLAgent::sendAgentSetAppearance() // IMG_DEFAULT_AVATAR means not baked. 0 index should be ignored for baked textures if (!gAgentAvatarp->isTextureDefined(texture_index, 0)) { + LL_DEBUGS("Avatar") << "texture not current for baked " << (S32)baked_index << " local " << (S32)texture_index << llendl; textures_current = FALSE; break; } diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp old mode 100644 new mode 100755 index 1627870262..bccd4c1a60 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -733,23 +733,23 @@ void send_stats() LLHTTPClient::post(url, body, new ViewerStatsResponder()); } -LLFrameTimer& LLViewerStats::PhaseMap::getPhaseTimer(const std::string& phase_name) +LLTimer& LLViewerStats::PhaseMap::getPhaseTimer(const std::string& phase_name) { phase_map_t::iterator iter = mPhaseMap.find(phase_name); if (iter == mPhaseMap.end()) { - LLFrameTimer timer; + LLTimer timer; mPhaseMap[phase_name] = timer; } - LLFrameTimer& timer = mPhaseMap[phase_name]; + LLTimer& timer = mPhaseMap[phase_name]; return timer; } void LLViewerStats::PhaseMap::startPhase(const std::string& phase_name) { - LLFrameTimer& timer = getPhaseTimer(phase_name); + LLTimer& timer = getPhaseTimer(phase_name); lldebugs << "startPhase " << phase_name << llendl; - timer.unpause(); + timer.start(); } void LLViewerStats::PhaseMap::stopPhase(const std::string& phase_name) @@ -763,7 +763,7 @@ void LLViewerStats::PhaseMap::stopPhase(const std::string& phase_name) recordPhaseStat(phase_name,iter->second.getElapsedTimeF32()); } lldebugs << "stopPhase " << phase_name << llendl; - iter->second.pause(); + iter->second.stop(); } else { @@ -783,7 +783,7 @@ void LLViewerStats::PhaseMap::stopAllPhases() recordPhaseStat(phase_name,iter->second.getElapsedTimeF32()); } lldebugs << "stopPhase (all) " << phase_name << llendl; - iter->second.pause(); + iter->second.stop(); } } diff --git a/indra/newview/llviewerstats.h b/indra/newview/llviewerstats.h index e02a4ccdc7..bb11e8c5be 100755 --- a/indra/newview/llviewerstats.h +++ b/indra/newview/llviewerstats.h @@ -279,7 +279,7 @@ public: // Phase tracking (originally put in for avatar rezzing), tracking // progress of active/completed phases for activities like outfit changing. - typedef std::map phase_map_t; + typedef std::map phase_map_t; typedef std::map phase_stats_t; class PhaseMap { @@ -288,7 +288,7 @@ public: static phase_stats_t sStats; public: PhaseMap(); - LLFrameTimer& getPhaseTimer(const std::string& phase_name); + LLTimer& getPhaseTimer(const std::string& phase_name); void startPhase(const std::string& phase_name); void stopPhase(const std::string& phase_name); void stopAllPhases(); diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index aeac478d4e..a1c7cf97ff 100755 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1462,7 +1462,9 @@ BOOL LLVOAvatarSelf::isAllLocalTextureDataFinal() const const U32 wearable_count = gAgentWearables.getWearableCount(wearable_type); for (U32 wearable_index = 0; wearable_index < wearable_count; wearable_index++) { - if (getLocalDiscardLevel(*local_tex_iter, wearable_index) > (S32)(desired_tex_discard_level)) + S32 local_discard_level = getLocalDiscardLevel(*local_tex_iter, wearable_index); + if ((local_discard_level > (S32)(desired_tex_discard_level)) || + (local_discard_level < 0 )) { return FALSE; } @@ -2177,20 +2179,13 @@ LLSD LLVOAvatarSelf::metricsData() // runway - add region info LLSD result; result["rez_status"] = LLVOAvatar::rezStatusToString(getRezzedStatus()); - std::vector rez_counts; - LLVOAvatar::getNearbyRezzedStats(rez_counts); - result["nearby"] = LLSD::emptyMap(); - for (S32 i=0; i