aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfasttimerview.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llfasttimerview.cpp
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/newview/llfasttimerview.cpp')
-rw-r--r--linden/indra/newview/llfasttimerview.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/linden/indra/newview/llfasttimerview.cpp b/linden/indra/newview/llfasttimerview.cpp
index d594dc5..f1ca99f 100644
--- a/linden/indra/newview/llfasttimerview.cpp
+++ b/linden/indra/newview/llfasttimerview.cpp
@@ -208,7 +208,7 @@ static const int FTV_DISPLAY_NUM = (sizeof(ft_display_table)/sizeof(ft_display_
208S32 ft_display_idx[FTV_DISPLAY_NUM]; // line of table entry for display purposes (for collapse) 208S32 ft_display_idx[FTV_DISPLAY_NUM]; // line of table entry for display purposes (for collapse)
209 209
210LLFastTimerView::LLFastTimerView(const std::string& name, const LLRect& rect) 210LLFastTimerView::LLFastTimerView(const std::string& name, const LLRect& rect)
211 : LLFloater(name, rect, "Fast Timers") 211 : LLFloater(name, rect, std::string("Fast Timers"))
212{ 212{
213 setVisible(FALSE); 213 setVisible(FALSE);
214 mDisplayMode = 0; 214 mDisplayMode = 0;
@@ -499,7 +499,7 @@ void LLFastTimerView::draw()
499 LLFontGL::sMonospace->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); 499 LLFontGL::sMonospace->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
500 y -= (texth + 2); 500 y -= (texth + 2);
501 501
502 LLFontGL::sMonospace->renderUTF8("[Right-Click log selected] [ALT-Click toggle counts] [ALT-SHIFT-Click sub hidden]", 502 LLFontGL::sMonospace->renderUTF8(std::string("[Right-Click log selected] [ALT-Click toggle counts] [ALT-SHIFT-Click sub hidden]"),
503 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); 503 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
504 y -= (texth + 2); 504 y -= (texth + 2);
505 } 505 }
@@ -632,7 +632,7 @@ void LLFastTimerView::draw()
632 } 632 }
633 y -= (texth + 2); 633 y -= (texth + 2);
634 634
635 textw = dx + LLFontGL::sMonospace->getWidth(ft_display_table[i].desc) + 40; 635 textw = dx + LLFontGL::sMonospace->getWidth(std::string(ft_display_table[i].desc)) + 40;
636 if (textw > legendwidth) 636 if (textw > legendwidth)
637 legendwidth = textw; 637 legendwidth = textw;
638 } 638 }
@@ -946,11 +946,13 @@ void LLFastTimerView::draw()
946 F32 ms = (F32)((F64)max_ticks * iclock_freq); 946 F32 ms = (F32)((F64)max_ticks * iclock_freq);
947 947
948 //display y-axis range 948 //display y-axis range
949 LLString tdesc = mDisplayCalls ? 949 std::string tdesc;
950 llformat("%d calls", max_ticks) : 950 if (mDisplayCalls)
951 mDisplayHz ? 951 tdesc = llformat("%d calls", (int)max_ticks);
952 llformat("%d Hz", max_ticks) : 952 else if (mDisplayHz)
953 llformat("%4.2f ms", ms); 953 tdesc = llformat("%d Hz", (int)max_ticks);
954 else
955 tdesc = llformat("%4.2f ms", ms);
954 956
955 x = graph_rect.mRight - LLFontGL::sMonospace->getWidth(tdesc)-5; 957 x = graph_rect.mRight - LLFontGL::sMonospace->getWidth(tdesc)-5;
956 y = graph_rect.mTop - ((S32)LLFontGL::sMonospace->getLineHeight()); 958 y = graph_rect.mTop - ((S32)LLFontGL::sMonospace->getLineHeight());
@@ -1063,7 +1065,7 @@ void LLFastTimerView::draw()
1063 x = (graph_rect.mRight + graph_rect.mLeft)/2; 1065 x = (graph_rect.mRight + graph_rect.mLeft)/2;
1064 y = graph_rect.mBottom + 8; 1066 y = graph_rect.mBottom + 8;
1065 1067
1066 LLFontGL::sMonospace->renderUTF8(ft_display_table[mHoverIndex].desc, 0, x, y, LLColor4::white, 1068 LLFontGL::sMonospace->renderUTF8(std::string(ft_display_table[mHoverIndex].desc), 0, x, y, LLColor4::white,
1067 LLFontGL::LEFT, LLFontGL::BOTTOM); 1069 LLFontGL::LEFT, LLFontGL::BOTTOM);
1068 } 1070 }
1069 } 1071 }
@@ -1072,7 +1074,7 @@ void LLFastTimerView::draw()
1072 // Output stats for clicked bar to log 1074 // Output stats for clicked bar to log
1073 if (mPrintStats >= 0) 1075 if (mPrintStats >= 0)
1074 { 1076 {
1075 LLString legend_stat; 1077 std::string legend_stat;
1076 S32 stat_num; 1078 S32 stat_num;
1077 S32 first = 1; 1079 S32 first = 1;
1078 for (stat_num = 0; stat_num < FTV_DISPLAY_NUM; stat_num++) 1080 for (stat_num = 0; stat_num < FTV_DISPLAY_NUM; stat_num++)
@@ -1086,7 +1088,7 @@ void LLFastTimerView::draw()
1086 } 1088 }
1087 llinfos << legend_stat << llendl; 1089 llinfos << legend_stat << llendl;
1088 1090
1089 LLString timer_stat; 1091 std::string timer_stat;
1090 first = 1; 1092 first = 1;
1091 for (stat_num = 0; stat_num < FTV_DISPLAY_NUM; stat_num++) 1093 for (stat_num = 0; stat_num < FTV_DISPLAY_NUM; stat_num++)
1092 { 1094 {