summaryrefslogtreecommitdiff
path: root/indra/newview/llfasttimerview.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfasttimerview.h')
-rwxr-xr-xindra/newview/llfasttimerview.h101
1 files changed, 55 insertions, 46 deletions
diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h
index 341adacd65..d931f25a7e 100755
--- a/indra/newview/llfasttimerview.h
+++ b/indra/newview/llfasttimerview.h
@@ -31,6 +31,7 @@
#include "llfasttimer.h"
#include "llunit.h"
#include "lltracerecording.h"
+#include <deque>
class LLFastTimerView : public LLFloater
{
@@ -60,17 +61,15 @@ public:
virtual BOOL handleToolTip(S32 x, S32 y, MASK mask);
virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks);
virtual void draw();
-
+ virtual void onOpen(const LLSD& key);
LLTrace::TimeBlock* getLegendID(S32 y);
-protected:
- virtual void onClickCloseBtn();
-
private:
+ virtual void onClickCloseBtn();
void drawTicks();
void drawLineGraph();
- void drawLegend(S32 y);
- S32 drawHelp(S32 y);
+ void drawLegend();
+ void drawHelp(S32 y);
void drawBorders( S32 y, const S32 x_start, S32 barh, S32 dy);
void drawBars();
@@ -81,53 +80,63 @@ private:
struct TimerBar
{
TimerBar()
- : mWidth(0),
- mSelfWidth(0),
- mVisible(true),
+ : mTotalTime(0),
+ mSelfTime(0),
mStartFraction(0.f),
- mEndFraction(1.f)
+ mEndFraction(1.f),
+ mFirstChild(false),
+ mLastChild(false)
{}
- S32 mWidth;
- S32 mSelfWidth;
- LLRect mVisibleRect,
- mChildrenRect;
- LLColor4 mColor;
- bool mVisible;
- F32 mStartFraction,
- mEndFraction;
+ LLUnit<F32, LLUnits::Seconds> mTotalTime,
+ mSelfTime,
+ mChildrenStart,
+ mChildrenEnd,
+ mSelfStart,
+ mSelfEnd;
+ LLTrace::TimeBlock* mTimeBlock;
+ bool mVisible,
+ mFirstChild,
+ mLastChild;
+ F32 mStartFraction,
+ mEndFraction;
};
- S32 updateTimerBarWidths(LLTrace::TimeBlock* time_block, std::vector<TimerBar>& bars, S32 history_index, bool visible);
- S32 updateTimerBarFractions(LLTrace::TimeBlock* time_block, S32 timer_bar_index, std::vector<TimerBar>& bars);
- S32 drawBar(LLTrace::TimeBlock* time_block, LLRect bar_rect, std::vector<TimerBar>& bars, S32 bar_index, LLPointer<LLUIImage>& bar_image);
+
+ struct TimerBarRow
+ {
+ S32 mBottom,
+ mTop;
+ TimerBar* mBars;
+ };
+
+ LLUnit<F32, LLUnits::Seconds> updateTimerBarWidths(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 history_index, U32& bar_index);
+ S32 updateTimerBarOffsets(LLTrace::TimeBlock* time_block, TimerBarRow& row, S32 timer_bar_index = 0);
+ S32 drawBar(LLRect bar_rect, TimerBarRow& row, S32 image_width, S32 image_height, bool hovered = false, bool visible = true, S32 bar_index = 0);
void setPauseState(bool pause_state);
- std::vector<TimerBar>* mTimerBars;
- S32 mDisplayMode;
+ std::deque<TimerBarRow> mTimerBarRows;
+ TimerBarRow mAverageTimerRow;
- typedef enum child_alignment
+ enum EDisplayType
{
- ALIGN_LEFT,
- ALIGN_CENTER,
- ALIGN_RIGHT,
- ALIGN_COUNT
- } ChildAlignment;
-
- ChildAlignment mDisplayCenter;
- bool mDisplayCalls,
- mDisplayHz;
- LLUnit<LLUnits::Seconds, F64> mAllTimeMax,
- mTotalTimeDisplay;
- LLRect mBarRect;
- S32 mScrollIndex;
- LLTrace::TimeBlock* mHoverID;
- LLTrace::TimeBlock* mHoverTimer;
- LLRect mToolTipRect;
- S32 mHoverBarIndex;
- LLFrameTimer mHighlightTimer;
- S32 mPrintStats;
- LLRect mGraphRect;
- LLTrace::PeriodicRecording* mRecording;
- bool mPauseHistory;
+ TIME,
+ CALLS,
+ HZ
+ } mDisplayType;
+ bool mPauseHistory;
+ LLUnit<F64, LLUnits::Seconds> mAllTimeMax,
+ mTotalTimeDisplay;
+ S32 mScrollIndex,
+ mHoverBarIndex,
+ mStatsIndex;
+ S32 mDisplayMode;
+ LLTrace::TimeBlock* mHoverID;
+ LLTrace::TimeBlock* mHoverTimer;
+ LLRect mToolTipRect,
+ mGraphRect,
+ mBarRect,
+ mLegendRect;
+ LLFrameTimer mHighlightTimer;
+ LLTrace::PeriodicRecording mRecording;
};
#endif