aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfasttimerview.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:48 -0500
committerJacek Antonelli2008-08-15 23:44:48 -0500
commit9b4f54c826ffa4f94efa866068c9d6ecdfb4b424 (patch)
tree2f8ae193ab487088962e628f1ee9dee2f5901f01 /linden/indra/newview/llfasttimerview.cpp
parentSecond Life viewer sources 1.13.2.12 (diff)
downloadmeta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.zip
meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.gz
meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.bz2
meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.xz
Second Life viewer sources 1.13.2.15
Diffstat (limited to 'linden/indra/newview/llfasttimerview.cpp')
-rw-r--r--linden/indra/newview/llfasttimerview.cpp62
1 files changed, 22 insertions, 40 deletions
diff --git a/linden/indra/newview/llfasttimerview.cpp b/linden/indra/newview/llfasttimerview.cpp
index 3fddc4b..e147e3f 100644
--- a/linden/indra/newview/llfasttimerview.cpp
+++ b/linden/indra/newview/llfasttimerview.cpp
@@ -71,19 +71,21 @@ static LLColor4 green9(0.6f, 1.0f, 0.6f, 1.0f);
71// red (5) magenta (4) 71// red (5) magenta (4)
72static struct ft_display_info ft_display_table[] = 72static struct ft_display_info ft_display_table[] =
73{ 73{
74 { LLFastTimer::FTM_FRAME, "Frame", &LLColor4::white, 0 }, 74 { LLFastTimer::FTM_FRAME, "Frame", &LLColor4::white, 0 },
75 { LLFastTimer::FTM_MESSAGES, " Messages", &LLColor4::grey1, 0 }, 75 { LLFastTimer::FTM_MESSAGES, " Messages", &LLColor4::grey1, 0 },
76 { LLFastTimer::FTM_SLEEP, " Sleep", &LLColor4::grey2, 0 }, 76 { LLFastTimer::FTM_SLEEP, " Sleep", &LLColor4::grey2, 0 },
77 { LLFastTimer::FTM_IDLE, " Idle", &blue0, 0 }, 77 { LLFastTimer::FTM_IDLE, " Idle", &blue0, 0 },
78 { LLFastTimer::FTM_INVENTORY, " Inventory Update", &LLColor4::purple6, 1 }, 78 { LLFastTimer::FTM_PUMP, " Pump", &LLColor4::magenta2, 1 },
79 { LLFastTimer::FTM_AUTO_SELECT, " Open and Select", &LLColor4::red, 0 }, 79 { LLFastTimer::FTM_CURL, " Curl", &LLColor4::magenta3, 0 },
80 { LLFastTimer::FTM_INVENTORY, " Inventory Update", &LLColor4::purple6, 1 },
81 { LLFastTimer::FTM_AUTO_SELECT, " Open and Select", &LLColor4::red, 0 },
80 { LLFastTimer::FTM_FILTER, " Filter", &LLColor4::red2, 0 }, 82 { LLFastTimer::FTM_FILTER, " Filter", &LLColor4::red2, 0 },
81 { LLFastTimer::FTM_ARRANGE, " Arrange", &LLColor4::red3, 0 }, 83 { LLFastTimer::FTM_ARRANGE, " Arrange", &LLColor4::red3, 0 },
82 { LLFastTimer::FTM_REFRESH, " Refresh", &LLColor4::red4, 0 }, 84 { LLFastTimer::FTM_REFRESH, " Refresh", &LLColor4::red4, 0 },
83 { LLFastTimer::FTM_SORT, " Sort", &LLColor4::red5, 0 }, 85 { LLFastTimer::FTM_SORT, " Sort", &LLColor4::red5, 0 },
84 { LLFastTimer::FTM_RESET_DRAWORDER, " ResetDrawOrder", &LLColor4::pink1, 0 }, 86 { LLFastTimer::FTM_RESET_DRAWORDER, " ResetDrawOrder", &LLColor4::pink1, 0 },
85 { LLFastTimer::FTM_WORLD_UPDATE, " World Update", &LLColor4::blue1, 1 }, 87 { LLFastTimer::FTM_WORLD_UPDATE, " World Update", &LLColor4::blue1, 1 },
86 { LLFastTimer::FTM_UPDATE_MOVE, " Move Objects", &LLColor4::pink2, 0 }, 88 { LLFastTimer::FTM_UPDATE_MOVE, " Move Objects", &LLColor4::pink2, 0 },
87 { LLFastTimer::FTM_OCTREE_BALANCE, " Octree Balance", &LLColor4::red3, 0 }, 89 { LLFastTimer::FTM_OCTREE_BALANCE, " Octree Balance", &LLColor4::red3, 0 },
88 { LLFastTimer::FTM_CULL, " Object Cull", &LLColor4::blue2, 0 }, 90 { LLFastTimer::FTM_CULL, " Object Cull", &LLColor4::blue2, 0 },
89 { LLFastTimer::FTM_CULL_REBOUND, " Rebound", &LLColor4::blue3, 0 }, 91 { LLFastTimer::FTM_CULL_REBOUND, " Rebound", &LLColor4::blue3, 0 },
@@ -281,6 +283,13 @@ BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask)
281 } 283 }
282 } 284 }
283 } 285 }
286 else if (mask & MASK_ALT)
287 {
288 if (mask & MASK_SHIFT)
289 mSubtractHidden = !mSubtractHidden;
290 else
291 mDisplayCalls = !mDisplayCalls;
292 }
284 else if (mask & MASK_SHIFT) 293 else if (mask & MASK_SHIFT)
285 { 294 {
286 if (++mDisplayMode > 3) 295 if (++mDisplayMode > 3)
@@ -301,8 +310,8 @@ BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask)
301 mScrollIndex = 0; 310 mScrollIndex = 0;
302 } 311 }
303 } 312 }
304 // RN: for now, pass all mouse events through 313 // SJB: Don't pass mouse clicks through the display
305 return FALSE; 314 return TRUE;
306} 315}
307 316
308BOOL LLFastTimerView::handleMouseUp(S32 x, S32 y, MASK mask) 317BOOL LLFastTimerView::handleMouseUp(S32 x, S32 y, MASK mask)
@@ -359,33 +368,6 @@ BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks)
359 return FALSE; 368 return FALSE;
360} 369}
361 370
362BOOL LLFastTimerView::handleKey(KEY key, MASK mask, BOOL called_from_parent)
363{
364 // Otherwise space key gets eaten from the rest of the UI. JC
365 if (getVisible())
366 {
367 switch (key)
368 {
369 case '=':
370 mDisplayCalls = !mDisplayCalls;
371 return TRUE;
372 case '-':
373 mSubtractHidden = !mSubtractHidden;
374 return TRUE;
375 case ' ':
376 // pause/unpause
377 LLFastTimer::sPauseHistory = !LLFastTimer::sPauseHistory;
378 // reset scroll to bottom when unpausing
379 if (!LLFastTimer::sPauseHistory)
380 {
381 mScrollIndex = 0;
382 }
383 return TRUE;
384 }
385 }
386 return FALSE;
387}
388
389void LLFastTimerView::draw() 371void LLFastTimerView::draw()
390{ 372{
391 LLFastTimer t(LLFastTimer::FTM_RENDER_TIMER); 373 LLFastTimer t(LLFastTimer::FTM_RENDER_TIMER);
@@ -480,7 +462,7 @@ void LLFastTimerView::draw()
480 LLFontGL::sMonospace->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); 462 LLFontGL::sMonospace->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
481 y -= (texth + 2); 463 y -= (texth + 2);
482 464
483 LLFontGL::sMonospace->renderUTF8("[Right-click to log selected] [= to toggle counts] [- to subtract hidden]", 465 LLFontGL::sMonospace->renderUTF8("[Right-Click log selected] [ALT-Click toggle counts] [ALT-SHIFT-Click sub hidden]",
484 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); 466 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP);
485 y -= (texth + 2); 467 y -= (texth + 2);
486 } 468 }
@@ -566,7 +548,7 @@ void LLFastTimerView::draw()
566 } 548 }
567 else 549 else
568 { 550 {
569 U64 ticks = disabled >= 1 ? ticks_sum[0][i] : LLFastTimer::sCountAverage[tidx]; 551 U64 ticks = ticks_sum[0][i];
570 ms = (F32)((F64)ticks * iclock_freq); 552 ms = (F32)((F64)ticks * iclock_freq);
571 calls = (S32)LLFastTimer::sCallAverage[tidx]; 553 calls = (S32)LLFastTimer::sCallAverage[tidx];
572 } 554 }