Import some changes from internal

This commit is contained in:
Drake Arconis
2013-03-12 06:03:06 -04:00
parent 9bce5d479a
commit 20cdb35172
5 changed files with 84 additions and 93 deletions

View File

@@ -484,8 +484,8 @@ void LLFastTimerView::draw()
sTimerColors[&LLFastTimer::NamedTimer::getRootNamedTimer()] = LLColor4::grey;
F32 hue = 0.f;
for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
// <ALCH:LL> Move color generation down to be in the next loop.
/*for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
it != timer_tree_iterator_t();
++it)
{
@@ -502,7 +502,8 @@ void LLFastTimerView::draw()
child_color.setHSL(hue, saturation, lightness);
sTimerColors[idp] = child_color;
}
}*/
// </ALCH:LL>
const S32 LEGEND_WIDTH = 220;
{
@@ -516,6 +517,20 @@ void LLFastTimerView::draw()
++it)
{
LLFastTimer::NamedTimer* idp = (*it);
// <ALCH:LL> Move color generation down to be in the next loop.
const F32 HUE_INCREMENT = 0.23f;
hue = fmodf(hue + HUE_INCREMENT, 1.f);
// saturation increases with depth
F32 saturation = clamp_rescale((F32)idp->getDepth(), 0.f, 3.f, 0.f, 1.f);
// lightness alternates with depth
F32 lightness = idp->getDepth() % 2 ? 0.5f : 0.6f;
LLColor4 child_color;
child_color.setHSL(hue, saturation, lightness);
sTimerColors[idp] = child_color;
// </ALCH:LL>
// <FS:LO> Making the ledgend part of fast timers scrollable
if(mScrollOffset_tmp)
{