diff options
author | Richard Linden <none@none> | 2013-03-22 00:44:59 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-03-22 00:44:59 -0700 |
commit | 68f9f656cd22332e46959a90347e38f79c19a66c (patch) | |
tree | 531d87287b69f500c5901f785e60483555b415f9 /indra/newview/llfasttimerview.h | |
parent | e87000ba0750e55d9d6b55feccc4124f5d2b4b74 (diff) | |
parent | 368dd542bec7c31e14673b83d3342c35717d2920 (diff) |
merge with viewer-release
Diffstat (limited to 'indra/newview/llfasttimerview.h')
-rw-r--r-- | indra/newview/llfasttimerview.h | 59 |
1 files changed, 48 insertions, 11 deletions
diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index 5766cfa0b0..8b9ad290bc 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -29,11 +29,14 @@ #include "llfloater.h" #include "llfasttimer.h" +#include "llunit.h" +#include "lltracerecording.h" class LLFastTimerView : public LLFloater { public: LLFastTimerView(const LLSD&); + ~LLFastTimerView(); BOOL postBuild(); static BOOL sAnalyzePerformance; @@ -46,7 +49,6 @@ private: static LLSD analyzePerformanceLogDefault(std::istream& is) ; static void exportCharts(const std::string& base, const std::string& target); void onPause(); - LLFastTimer::NamedTimer& getFrameTimer(); public: @@ -59,15 +61,48 @@ public: virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); virtual void draw(); - LLFastTimer::NamedTimer* getLegendID(S32 y); + LLTrace::TimeBlock* getLegendID(S32 y); F64 getTime(const std::string& name); protected: virtual void onClickCloseBtn(); + private: - typedef std::vector<std::vector<S32> > bar_positions_t; - bar_positions_t mBarStart; - bar_positions_t mBarEnd; + void drawTicks(); + void drawLineGraph(); + void drawLegend(S32 y); + S32 drawHelp(S32 y); + void drawBorders( S32 y, const S32 x_start, S32 barh, S32 dy); + void drawBars(); + + void printLineStats(); + void generateUniqueColors(); + void updateTotalTime(); + + struct TimerBar + { + TimerBar() + : mWidth(0), + mSelfWidth(0), + mVisible(true), + mStartFraction(0.f), + mEndFraction(1.f) + {} + S32 mWidth; + S32 mSelfWidth; + LLRect mVisibleRect, + mChildrenRect; + LLColor4 mColor; + bool mVisible; + 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); + void setPauseState(bool pause_state); + + std::vector<TimerBar>* mTimerBars; S32 mDisplayMode; typedef enum child_alignment @@ -79,19 +114,21 @@ private: } ChildAlignment; ChildAlignment mDisplayCenter; - S32 mDisplayCalls; - S32 mDisplayHz; - U64 mAvgCountTotal; - U64 mMaxCountTotal; + bool mDisplayCalls, + mDisplayHz; + LLUnit<LLUnits::Seconds, F64> mAllTimeMax, + mTotalTimeDisplay; LLRect mBarRect; S32 mScrollIndex; - LLFastTimer::NamedTimer* mHoverID; - LLFastTimer::NamedTimer* mHoverTimer; + LLTrace::TimeBlock* mHoverID; + LLTrace::TimeBlock* mHoverTimer; LLRect mToolTipRect; S32 mHoverBarIndex; LLFrameTimer mHighlightTimer; S32 mPrintStats; LLRect mGraphRect; + LLTrace::PeriodicRecording* mRecording; + bool mPauseHistory; }; #endif |