aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfasttimerview.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:42 -0500
committerJacek Antonelli2008-08-15 23:45:42 -0500
commitce28e056c20bf2723f565bbf464b87781ec248a2 (patch)
treeef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/newview/llfasttimerview.cpp
parentSecond Life viewer sources 1.19.1.4b (diff)
downloadmeta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz
Second Life viewer sources 1.20.2
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfasttimerview.cpp36
1 files changed, 11 insertions, 25 deletions
diff --git a/linden/indra/newview/llfasttimerview.cpp b/linden/indra/newview/llfasttimerview.cpp
index d2e04de..372d8fa 100644
--- a/linden/indra/newview/llfasttimerview.cpp
+++ b/linden/indra/newview/llfasttimerview.cpp
@@ -113,10 +113,6 @@ static struct ft_display_info ft_display_table[] =
113 { LLFastTimer::FTM_PIPELINE, " Pipeline", &LLColor4::magenta4, 0 }, 113 { LLFastTimer::FTM_PIPELINE, " Pipeline", &LLColor4::magenta4, 0 },
114 { LLFastTimer::FTM_CLEANUP, " Cleanup", &LLColor4::cyan3, 0 }, 114 { LLFastTimer::FTM_CLEANUP, " Cleanup", &LLColor4::cyan3, 0 },
115 { LLFastTimer::FTM_AUDIO_UPDATE, " Audio Update", &LLColor4::yellow3, 0 }, 115 { LLFastTimer::FTM_AUDIO_UPDATE, " Audio Update", &LLColor4::yellow3, 0 },
116 { LLFastTimer::FTM_IMAGE_UPDATE, " Image Update", &LLColor4::yellow4, 1 },
117 { LLFastTimer::FTM_IMAGE_CREATE, " Image CreateGL",&LLColor4::yellow5, 0 },
118 { LLFastTimer::FTM_IMAGE_DECODE, " Image Decode", &LLColor4::yellow6, 0 },
119 { LLFastTimer::FTM_IMAGE_MARK_DIRTY, " Dirty Textures",&LLColor4::red1, 0 },
120 { LLFastTimer::FTM_VFILE_WAIT, " VFile Wait", &LLColor4::cyan6, 0 }, 116 { LLFastTimer::FTM_VFILE_WAIT, " VFile Wait", &LLColor4::cyan6, 0 },
121// { LLFastTimer::FTM_IDLE_CB, " Callbacks", &LLColor4::pink1, 0 }, 117// { LLFastTimer::FTM_IDLE_CB, " Callbacks", &LLColor4::pink1, 0 },
122 { LLFastTimer::FTM_RENDER, " Render", &green0, 1 }, 118 { LLFastTimer::FTM_RENDER, " Render", &green0, 1 },
@@ -146,6 +142,10 @@ static struct ft_display_info ft_display_table[] =
146 { LLFastTimer::FTM_CULL_REBOUND, " Rebound", &LLColor4::blue3, 0 }, 142 { LLFastTimer::FTM_CULL_REBOUND, " Rebound", &LLColor4::blue3, 0 },
147 { LLFastTimer::FTM_FRUSTUM_CULL, " Frustum Cull", &LLColor4::blue4, 0 }, 143 { LLFastTimer::FTM_FRUSTUM_CULL, " Frustum Cull", &LLColor4::blue4, 0 },
148 { LLFastTimer::FTM_OCCLUSION_READBACK, " Occlusion Read", &LLColor4::red2, 0 }, 144 { LLFastTimer::FTM_OCCLUSION_READBACK, " Occlusion Read", &LLColor4::red2, 0 },
145 { LLFastTimer::FTM_IMAGE_UPDATE, " Image Update", &LLColor4::yellow4, 1 },
146 { LLFastTimer::FTM_IMAGE_CREATE, " Image CreateGL",&LLColor4::yellow5, 0 },
147 { LLFastTimer::FTM_IMAGE_DECODE, " Image Decode", &LLColor4::yellow6, 0 },
148 { LLFastTimer::FTM_IMAGE_MARK_DIRTY, " Dirty Textures",&LLColor4::red1, 0 },
149 { LLFastTimer::FTM_STATESORT, " State Sort", &LLColor4::orange1, 1 }, 149 { LLFastTimer::FTM_STATESORT, " State Sort", &LLColor4::orange1, 1 },
150 { LLFastTimer::FTM_STATESORT_DRAWABLE, " Drawable", &LLColor4::orange2, 0 }, 150 { LLFastTimer::FTM_STATESORT_DRAWABLE, " Drawable", &LLColor4::orange2, 0 },
151 { LLFastTimer::FTM_STATESORT_POSTSORT, " Post Sort", &LLColor4::orange3, 0 }, 151 { LLFastTimer::FTM_STATESORT_POSTSORT, " Post Sort", &LLColor4::orange3, 0 },
@@ -270,16 +270,6 @@ LLFastTimerView::~LLFastTimerView()
270 delete[] mBarEnd; 270 delete[] mBarEnd;
271} 271}
272 272
273EWidgetType LLFastTimerView::getWidgetType() const
274{
275 return WIDGET_TYPE_FAST_TIMER_VIEW;
276}
277
278LLString LLFastTimerView::getWidgetTag() const
279{
280 return LL_FAST_TIMER_VIEW_TAG;
281}
282
283BOOL LLFastTimerView::handleRightMouseDown(S32 x, S32 y, MASK mask) 273BOOL LLFastTimerView::handleRightMouseDown(S32 x, S32 y, MASK mask)
284{ 274{
285 if (mBarRect.pointInRect(x, y)) 275 if (mBarRect.pointInRect(x, y))
@@ -408,14 +398,10 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
408 398
409BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks) 399BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks)
410{ 400{
411 if (getVisible() && pointInView(x, y)) 401 LLFastTimer::sPauseHistory = TRUE;
412 { 402 mScrollIndex = llclamp(mScrollIndex - clicks,
413 LLFastTimer::sPauseHistory = TRUE; 403 0, llmin(LLFastTimer::sLastFrameIndex, (S32)LLFastTimer::FTM_HISTORY_NUM-MAX_VISIBLE_HISTORY));
414 mScrollIndex = llclamp(mScrollIndex - clicks, 404 return TRUE;
415 0, llmin(LLFastTimer::sLastFrameIndex, (S32)LLFastTimer::FTM_HISTORY_NUM-MAX_VISIBLE_HISTORY));
416 return TRUE;
417 }
418 return FALSE;
419} 405}
420 406
421void LLFastTimerView::draw() 407void LLFastTimerView::draw()
@@ -437,7 +423,7 @@ void LLFastTimerView::draw()
437 S32 left, top, right, bottom; 423 S32 left, top, right, bottom;
438 S32 x, y, barw, barh, dx, dy; 424 S32 x, y, barw, barh, dx, dy;
439 S32 texth, textw; 425 S32 texth, textw;
440 LLViewerImage* box_imagep = gImageList.getImage(LLUUID(gViewerArt.getString("rounded_square.tga")), MIPMAP_FALSE, TRUE); 426 LLPointer<LLUIImage> box_imagep = LLUI::getUIImage("rounded_square.tga");
441 427
442 // Make sure all timers are accounted for 428 // Make sure all timers are accounted for
443 // Set 'FTM_OTHER' to unaccounted ticks last frame 429 // Set 'FTM_OTHER' to unaccounted ticks last frame
@@ -806,7 +792,7 @@ void LLFastTimerView::draw()
806 792
807 // Draw bars for each history entry 793 // Draw bars for each history entry
808 // Special: -1 = show running average 794 // Special: -1 = show running average
809 LLViewerImage::bindTexture(box_imagep); 795 LLViewerImage::bindTexture(box_imagep->getImage());
810 for (S32 j=-1; j<histmax && y > LINE_GRAPH_HEIGHT; j++) 796 for (S32 j=-1; j<histmax && y > LINE_GRAPH_HEIGHT; j++)
811 { 797 {
812 int sublevel_dx[FTV_DISPLAY_NUM+1]; 798 int sublevel_dx[FTV_DISPLAY_NUM+1];
@@ -938,7 +924,7 @@ void LLFastTimerView::draw()
938 gGL.color4fv(color.mV); 924 gGL.color4fv(color.mV);
939 F32 start_fragment = llclamp((F32)(left - sublevel_left[level]) / (F32)sublevel_dx[level], 0.f, 1.f); 925 F32 start_fragment = llclamp((F32)(left - sublevel_left[level]) / (F32)sublevel_dx[level], 0.f, 1.f);
940 F32 end_fragment = llclamp((F32)(right - sublevel_left[level]) / (F32)sublevel_dx[level], 0.f, 1.f); 926 F32 end_fragment = llclamp((F32)(right - sublevel_left[level]) / (F32)sublevel_dx[level], 0.f, 1.f);
941 gl_segmented_rect_2d_fragment_tex(sublevel_left[level], top - level + scale_offset, sublevel_right[level], bottom + level - scale_offset, box_imagep->getWidth(), box_imagep->getHeight(), 16, start_fragment, end_fragment); 927 gl_segmented_rect_2d_fragment_tex(sublevel_left[level], top - level + scale_offset, sublevel_right[level], bottom + level - scale_offset, box_imagep->getTextureWidth(), box_imagep->getTextureHeight(), 16, start_fragment, end_fragment);
942 928
943 } 929 }
944 930