Merge remote-tracking branch 'origin/master'

This commit is contained in:
Aleric Inglewood
2012-02-01 03:35:10 +01:00
78 changed files with 6130 additions and 5026 deletions

View File

@@ -315,11 +315,11 @@ std::string LLFastTimer::NamedTimer::getToolTip(S32 history_idx)
if (history_idx < 0)
{
// by default, show average number of call
return llformat("%s (%d ms, %d calls)", getName().c_str(), (S32)(getCountAverage() * ms_multiplier), (S32)getCallAverage());
return llformat("%s (%.2f ms, %d calls)", getName().c_str(), (F32)((F32)getCountAverage() * ms_multiplier), (S32)getCallAverage());
}
else
{
return llformat("%s (%d ms, %d calls)", getName().c_str(), (S32)(getHistoricalCount(history_idx) * ms_multiplier), (S32)getHistoricalCalls(history_idx));
return llformat("%s (%.2f ms, %d calls)", getName().c_str(), (F32)((F32)getHistoricalCount(history_idx) * ms_multiplier), (S32)getHistoricalCalls(history_idx));
}
}
@@ -506,6 +506,15 @@ void LLFastTimer::NamedTimer::accumulateTimings()
}
}
U32 LLFastTimer::NamedTimer::getCountAverage() const
{
return mCountAverage;// (sCurFrameIndex <= 0 || mCountAverage <= 0) ? 0 : mCountAverage / llmin(sCurFrameIndex,(S32)HISTORY_NUM);
}
U32 LLFastTimer::NamedTimer::getCallAverage() const
{
return mCallAverage;// (sCurFrameIndex <= 0 || mCallAverage <= 0) ? 0 : mCallAverage / llmin(sCurFrameIndex,(S32)HISTORY_NUM);
}
// static
void LLFastTimer::NamedTimer::resetFrame()
{