From eb228dcf3af8db371fd452e595396d8694c869fe Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 8 Jan 2010 16:41:39 -0800 Subject: fast timer performance tuning --- indra/newview/llappviewer.cpp | 58 +++++++------- indra/newview/lldrawable.cpp | 2 +- indra/newview/lldrawpoolavatar.cpp | 2 +- indra/newview/lldrawpoolsimple.cpp | 4 +- indra/newview/lldrawpoolterrain.cpp | 2 +- indra/newview/lldrawpooltree.cpp | 2 +- indra/newview/llfasttimerview.cpp | 118 ++++++++++++++-------------- indra/newview/llfasttimerview.h | 6 +- indra/newview/llflexibleobject.cpp | 2 +- indra/newview/llfolderview.cpp | 10 +-- indra/newview/llhudmanager.cpp | 2 +- indra/newview/llhudobject.cpp | 2 +- indra/newview/llinventorypanel.cpp | 2 +- indra/newview/llmetricperformancetester.cpp | 4 +- indra/newview/llspatialpartition.cpp | 8 +- indra/newview/llstartup.cpp | 2 +- indra/newview/llviewerdisplay.cpp | 12 +-- indra/newview/llviewermenu.cpp | 2 +- indra/newview/llviewermessage.cpp | 2 +- indra/newview/llviewerobject.cpp | 2 +- indra/newview/llviewerobjectlist.cpp | 4 +- indra/newview/llviewerpartsim.cpp | 2 +- indra/newview/llviewertexture.cpp | 2 +- indra/newview/llviewertexturelist.cpp | 6 +- indra/newview/llviewerwindow.cpp | 2 +- indra/newview/llvoavatar.cpp | 10 +-- indra/newview/llvoclouds.cpp | 2 +- indra/newview/llvograss.cpp | 2 +- indra/newview/llvopartgroup.cpp | 6 +- indra/newview/llvosky.cpp | 4 +- indra/newview/llvosurfacepatch.cpp | 4 +- indra/newview/llvotree.cpp | 2 +- indra/newview/llvovolume.cpp | 14 ++-- indra/newview/llvowater.cpp | 2 +- indra/newview/llvowlsky.cpp | 2 +- indra/newview/llwaterparammanager.cpp | 2 +- indra/newview/llwlparammanager.cpp | 2 +- indra/newview/pipeline.cpp | 94 +++++++++++----------- indra/newview/pipeline.h | 38 ++++----- 39 files changed, 222 insertions(+), 222 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e0356bc091..8ac2f0966f 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -480,11 +480,11 @@ public: LLFastTimerLogThread() : LLThread("fast timer log") { - if(LLFastTimer::sLog) + if(LLFastTimerUtil::sLog) { mFile = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "performance.slp"); } - if(LLFastTimer::sMetricLog) + if(LLFastTimerUtil::sMetricLog) { mFile = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "metric.slp"); } @@ -496,7 +496,7 @@ public: while (!LLAppViewer::instance()->isQuitting()) { - LLFastTimer::writeLog(os); + LLFastTimerUtil::writeLog(os); os.flush(); ms_sleep(32); } @@ -606,7 +606,7 @@ bool LLAppViewer::init() // into the log files during normal startup until AFTER // we run the "program crashed last time" error handler below. // - LLFastTimer::reset(); + LLFastTimerUtil::reset(); // Need to do this initialization before we do anything else, since anything // that touches files should really go through the lldir API @@ -911,15 +911,15 @@ bool LLAppViewer::init() return true; } -static LLFastTimer::DeclareTimer FTM_MESSAGES("System Messages"); -static LLFastTimer::DeclareTimer FTM_SLEEP("Sleep"); -static LLFastTimer::DeclareTimer FTM_TEXTURE_CACHE("Texture Cache"); -static LLFastTimer::DeclareTimer FTM_DECODE("Image Decode"); -static LLFastTimer::DeclareTimer FTM_VFS("VFS Thread"); -static LLFastTimer::DeclareTimer FTM_LFS("LFS Thread"); -static LLFastTimer::DeclareTimer FTM_PAUSE_THREADS("Pause Threads"); -static LLFastTimer::DeclareTimer FTM_IDLE("Idle"); -static LLFastTimer::DeclareTimer FTM_PUMP("Pump"); +static LLFastTimerUtil::DeclareTimer FTM_MESSAGES("System Messages"); +static LLFastTimerUtil::DeclareTimer FTM_SLEEP("Sleep"); +static LLFastTimerUtil::DeclareTimer FTM_TEXTURE_CACHE("Texture Cache"); +static LLFastTimerUtil::DeclareTimer FTM_DECODE("Image Decode"); +static LLFastTimerUtil::DeclareTimer FTM_VFS("VFS Thread"); +static LLFastTimerUtil::DeclareTimer FTM_LFS("LFS Thread"); +static LLFastTimerUtil::DeclareTimer FTM_PAUSE_THREADS("Pause Threads"); +static LLFastTimerUtil::DeclareTimer FTM_IDLE("Idle"); +static LLFastTimerUtil::DeclareTimer FTM_PUMP("Pump"); bool LLAppViewer::mainLoop() { @@ -956,7 +956,7 @@ bool LLAppViewer::mainLoop() // Handle messages while (!LLApp::isExiting()) { - LLFastTimer::nextFrame(); // Should be outside of any timer instances + LLFastTimerUtil::nextFrame(); // Should be outside of any timer instances try { @@ -1551,14 +1551,14 @@ bool LLAppViewer::cleanup() { llinfos << "Analyzing performance" << llendl; - if(LLFastTimer::sLog) + if(LLFastTimerUtil::sLog) { LLFastTimerView::doAnalysis( gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "performance_baseline.slp"), gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "performance.slp"), gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "performance_report.csv")); } - if(LLFastTimer::sMetricLog) + if(LLFastTimerUtil::sMetricLog) { LLFastTimerView::doAnalysis( gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "metric_baseline.slp"), @@ -1678,9 +1678,9 @@ bool LLAppViewer::initThreads() LLAppViewer::sTextureFetch = new LLTextureFetch(LLAppViewer::getTextureCache(), sImageDecodeThread, enable_threads && false); LLImage::initClass(); - if (LLFastTimer::sLog || LLFastTimer::sMetricLog) + if (LLFastTimerUtil::sLog || LLFastTimerUtil::sMetricLog) { - LLFastTimer::sLogLock = new LLMutex(NULL); + LLFastTimerUtil::sLogLock = new LLMutex(NULL); mFastTimerLogThread = new LLFastTimerLogThread(); mFastTimerLogThread->start(); } @@ -2031,12 +2031,12 @@ bool LLAppViewer::initConfiguration() if (clp.hasOption("logperformance")) { - LLFastTimer::sLog = TRUE; + LLFastTimerUtil::sLog = TRUE; } if(clp.hasOption("logmetrics")) { - LLFastTimer::sMetricLog = TRUE ; + LLFastTimerUtil::sMetricLog = TRUE ; } if (clp.hasOption("graphicslevel")) @@ -3370,14 +3370,14 @@ public: } }; -static LLFastTimer::DeclareTimer FTM_AUDIO_UPDATE("Update Audio"); -static LLFastTimer::DeclareTimer FTM_CLEANUP("Cleanup"); -static LLFastTimer::DeclareTimer FTM_IDLE_CB("Idle Callbacks"); -static LLFastTimer::DeclareTimer FTM_LOD_UPDATE("Update LOD"); -static LLFastTimer::DeclareTimer FTM_OBJECTLIST_UPDATE("Update Objectlist"); -static LLFastTimer::DeclareTimer FTM_REGION_UPDATE("Update Region"); -static LLFastTimer::DeclareTimer FTM_WORLD_UPDATE("Update World"); -static LLFastTimer::DeclareTimer FTM_NETWORK("Network"); +static LLFastTimerUtil::DeclareTimer FTM_AUDIO_UPDATE("Update Audio"); +static LLFastTimerUtil::DeclareTimer FTM_CLEANUP("Cleanup"); +static LLFastTimerUtil::DeclareTimer FTM_IDLE_CB("Idle Callbacks"); +static LLFastTimerUtil::DeclareTimer FTM_LOD_UPDATE("Update LOD"); +static LLFastTimerUtil::DeclareTimer FTM_OBJECTLIST_UPDATE("Update Objectlist"); +static LLFastTimerUtil::DeclareTimer FTM_REGION_UPDATE("Update Region"); +static LLFastTimerUtil::DeclareTimer FTM_WORLD_UPDATE("Update World"); +static LLFastTimerUtil::DeclareTimer FTM_NETWORK("Network"); /////////////////////////////////////////////////////// // idle() @@ -3882,7 +3882,7 @@ void LLAppViewer::sendLogoutRequest() static F32 CheckMessagesMaxTime = CHECK_MESSAGES_DEFAULT_MAX_TIME; #endif -static LLFastTimer::DeclareTimer FTM_IDLE_NETWORK("Network"); +static LLFastTimerUtil::DeclareTimer FTM_IDLE_NETWORK("Network"); void LLAppViewer::idleNetwork() { diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index d60330024a..02e5f9c653 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -60,7 +60,7 @@ const F32 MAX_INTERPOLATE_DISTANCE_SQUARED = 10.f * 10.f; const F32 OBJECT_DAMPING_TIME_CONSTANT = 0.06f; const F32 MIN_SHADOW_CASTER_RADIUS = 2.0f; -static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound"); +static LLFastTimerUtil::DeclareTimer FTM_CULL_REBOUND("Cull Rebound"); //////////////////////// diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 546b60f286..605095f24a 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -94,7 +94,7 @@ S32 normal_channel = -1; S32 specular_channel = -1; S32 diffuse_channel = -1; -static LLFastTimer::DeclareTimer FTM_SHADOW_AVATAR("Avatar Shadow"); +static LLFastTimerUtil::DeclareTimer FTM_SHADOW_AVATAR("Avatar Shadow"); LLDrawPoolAvatar::LLDrawPoolAvatar() : LLFacePool(POOL_AVATAR) diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp index ca7a1b47c2..04f411e345 100644 --- a/indra/newview/lldrawpoolsimple.cpp +++ b/indra/newview/lldrawpoolsimple.cpp @@ -47,8 +47,8 @@ static LLGLSLShader* simple_shader = NULL; static LLGLSLShader* fullbright_shader = NULL; -static LLFastTimer::DeclareTimer FTM_RENDER_SIMPLE_DEFERRED("Deferred Simple"); -static LLFastTimer::DeclareTimer FTM_RENDER_GRASS_DEFERRED("Deferred Grass"); +static LLFastTimerUtil::DeclareTimer FTM_RENDER_SIMPLE_DEFERRED("Deferred Simple"); +static LLFastTimerUtil::DeclareTimer FTM_RENDER_GRASS_DEFERRED("Deferred Grass"); void LLDrawPoolGlow::render(S32 pass) { diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp index 9dc22cddcd..0e36e9e6d2 100644 --- a/indra/newview/lldrawpoolterrain.cpp +++ b/indra/newview/lldrawpoolterrain.cpp @@ -61,7 +61,7 @@ int DebugDetailMap = 0; S32 LLDrawPoolTerrain::sDetailMode = 1; F32 LLDrawPoolTerrain::sDetailScale = DETAIL_SCALE; static LLGLSLShader* sShader = NULL; -static LLFastTimer::DeclareTimer FTM_SHADOW_TERRAIN("Terrain Shadow"); +static LLFastTimerUtil::DeclareTimer FTM_SHADOW_TERRAIN("Terrain Shadow"); LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) : diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp index 5521fb05a8..192b0a13d3 100644 --- a/indra/newview/lldrawpooltree.cpp +++ b/indra/newview/lldrawpooltree.cpp @@ -46,7 +46,7 @@ S32 LLDrawPoolTree::sDiffTex = 0; static LLGLSLShader* shader = NULL; -static LLFastTimer::DeclareTimer FTM_SHADOW_TREE("Tree Shadow"); +static LLFastTimerUtil::DeclareTimer FTM_SHADOW_TREE("Tree Shadow"); LLDrawPoolTree::LLDrawPoolTree(LLViewerTexture *texturep) : LLFacePool(POOL_TREE), diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 7d8bb6e104..b36909f3ac 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -63,17 +63,17 @@ static const S32 LINE_GRAPH_HEIGHT = 240; static S32 FTV_NUM_TIMERS; const S32 FTV_MAX_DEPTH = 8; -std::vector ft_display_idx; // line of table entry for display purposes (for collapse) +std::vector ft_display_idx; // line of table entry for display purposes (for collapse) -typedef LLTreeDFSIter timer_tree_iterator_t; +typedef LLTreeDFSIter timer_tree_iterator_t; BOOL LLFastTimerView::sAnalyzePerformance = FALSE; -static timer_tree_iterator_t begin_timer_tree(LLFastTimer::NamedTimer& id) +static timer_tree_iterator_t begin_timer_tree(LLFastTimerUtil::NamedTimer& id) { return timer_tree_iterator_t(&id, - boost::bind(boost::mem_fn(&LLFastTimer::NamedTimer::beginChildren), _1), - boost::bind(boost::mem_fn(&LLFastTimer::NamedTimer::endChildren), _1)); + boost::bind(boost::mem_fn(&LLFastTimerUtil::NamedTimer::beginChildren), _1), + boost::bind(boost::mem_fn(&LLFastTimerUtil::NamedTimer::endChildren), _1)); } static timer_tree_iterator_t end_timer_tree() @@ -96,7 +96,7 @@ LLFastTimerView::LLFastTimerView(const LLRect& rect) mScrollIndex = 0; mHoverID = NULL; mHoverBarIndex = -1; - FTV_NUM_TIMERS = LLFastTimer::NamedTimer::instanceCount(); + FTV_NUM_TIMERS = LLFastTimerUtil::NamedTimer::instanceCount(); mPrintStats = -1; mAverageCyclesPerTimer = 0; } @@ -125,7 +125,7 @@ BOOL LLFastTimerView::handleRightMouseDown(S32 x, S32 y, MASK mask) return FALSE; } -LLFastTimer::NamedTimer* LLFastTimerView::getLegendID(S32 y) +LLFastTimerUtil::NamedTimer* LLFastTimerView::getLegendID(S32 y) { S32 idx = (getRect().getHeight() - y) / ((S32) LLFontGL::getFontMonospace()->getLineHeight()+2) - 5; @@ -141,7 +141,7 @@ BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask) { if (x < mBarRect.mLeft) { - LLFastTimer::NamedTimer* idp = getLegendID(y); + LLFastTimerUtil::NamedTimer* idp = getLegendID(y); if (idp) { idp->setCollapsed(!idp->getCollapsed()); @@ -175,9 +175,9 @@ BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask) else { // pause/unpause - LLFastTimer::sPauseHistory = !LLFastTimer::sPauseHistory; + LLFastTimerUtil::sPauseHistory = !LLFastTimerUtil::sPauseHistory; // reset scroll to bottom when unpausing - if (!LLFastTimer::sPauseHistory) + if (!LLFastTimerUtil::sPauseHistory) { mScrollIndex = 0; } @@ -196,9 +196,9 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) mHoverTimer = NULL; mHoverID = NULL; - if(LLFastTimer::sPauseHistory && mBarRect.pointInRect(x, y)) + if(LLFastTimerUtil::sPauseHistory && mBarRect.pointInRect(x, y)) { - mHoverBarIndex = llmin(LLFastTimer::getCurFrameIndex() - 1, + mHoverBarIndex = llmin(LLFastTimerUtil::getCurFrameIndex() - 1, MAX_VISIBLE_HISTORY - ((y - mBarRect.mBottom) * (MAX_VISIBLE_HISTORY + 2) / mBarRect.getHeight())); if (mHoverBarIndex == 0) { @@ -210,7 +210,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) } S32 i = 0; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimerUtil::NamedTimer::getRootNamedTimer()); it != end_timer_tree(); ++it, ++i) { @@ -234,7 +234,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) } else if (x < mBarRect.mLeft) { - LLFastTimer::NamedTimer* timer_id = getLegendID(y); + LLFastTimerUtil::NamedTimer* timer_id = getLegendID(y); if (timer_id) { mHoverID = timer_id; @@ -247,7 +247,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask) { - if(LLFastTimer::sPauseHistory && mBarRect.pointInRect(x, y)) + if(LLFastTimerUtil::sPauseHistory && mBarRect.pointInRect(x, y)) { // tooltips for timer bars if (mHoverTimer) @@ -256,7 +256,7 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask) localRectToScreen(mToolTipRect, &screen_rect); LLToolTipMgr::instance().show(LLToolTip::Params() - .message(mHoverTimer->getToolTip(LLFastTimer::NamedTimer::HISTORY_NUM - mScrollIndex - mHoverBarIndex)) + .message(mHoverTimer->getToolTip(LLFastTimerUtil::NamedTimer::HISTORY_NUM - mScrollIndex - mHoverBarIndex)) .sticky_rect(screen_rect) .delay_time(0.f)); @@ -268,7 +268,7 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask) // tooltips for timer legend if (x < mBarRect.mLeft) { - LLFastTimer::NamedTimer* idp = getLegendID(y); + LLFastTimerUtil::NamedTimer* idp = getLegendID(y); if (idp) { LLToolTipMgr::instance().show(idp->getToolTip()); @@ -283,16 +283,16 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask) BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks) { - LLFastTimer::sPauseHistory = TRUE; + LLFastTimerUtil::sPauseHistory = TRUE; mScrollIndex = llclamp(mScrollIndex - clicks, 0, - llmin(LLFastTimer::getLastFrameIndex(), (S32)LLFastTimer::NamedTimer::HISTORY_NUM - MAX_VISIBLE_HISTORY)); + llmin(LLFastTimerUtil::getLastFrameIndex(), (S32)LLFastTimerUtil::NamedTimer::HISTORY_NUM - MAX_VISIBLE_HISTORY)); return TRUE; } -static LLFastTimer::DeclareTimer FTM_RENDER_TIMER("Timers", true); +static LLFastTimerUtil::DeclareTimer FTM_RENDER_TIMER("Timers", true); -static std::map sTimerColors; +static std::map sTimerColors; void LLFastTimerView::draw() { @@ -300,7 +300,7 @@ void LLFastTimerView::draw() std::string tdesc; - F64 clock_freq = (F64)LLFastTimer::countsPerSecond(); + F64 clock_freq = (F64)LLFastTimerUtil::countsPerSecond(); F64 iclock_freq = 1000.0 / clock_freq; S32 margin = 10; @@ -367,7 +367,7 @@ void LLFastTimerView::draw() y -= (texth + 2); } - S32 histmax = llmin(LLFastTimer::getLastFrameIndex()+1, MAX_VISIBLE_HISTORY); + S32 histmax = llmin(LLFastTimerUtil::getLastFrameIndex()+1, MAX_VISIBLE_HISTORY); // Draw the legend xleft = margin; @@ -375,15 +375,15 @@ void LLFastTimerView::draw() y -= (texth + 2); - sTimerColors[&LLFastTimer::NamedTimer::getRootNamedTimer()] = LLColor4::grey; + sTimerColors[&LLFastTimerUtil::NamedTimer::getRootNamedTimer()] = LLColor4::grey; F32 hue = 0.f; - for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimerUtil::NamedTimer::getRootNamedTimer()); it != timer_tree_iterator_t(); ++it) { - LLFastTimer::NamedTimer* idp = (*it); + LLFastTimerUtil::NamedTimer* idp = (*it); const F32 HUE_INCREMENT = 0.23f; hue = fmodf(hue + HUE_INCREMENT, 1.f); @@ -403,12 +403,12 @@ void LLFastTimerView::draw() LLLocalClipRect clip(LLRect(margin, y, LEGEND_WIDTH, margin)); S32 cur_line = 0; ft_display_idx.clear(); - std::map display_line; - for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + std::map display_line; + for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimerUtil::NamedTimer::getRootNamedTimer()); it != timer_tree_iterator_t(); ++it) { - LLFastTimer::NamedTimer* idp = (*it); + LLFastTimerUtil::NamedTimer* idp = (*it); display_line[idp] = cur_line; ft_display_idx.push_back(idp); cur_line++; @@ -428,7 +428,7 @@ void LLFastTimerView::draw() S32 calls = 0; if (mHoverBarIndex > 0 && mHoverID) { - S32 hidx = LLFastTimer::NamedTimer::HISTORY_NUM - mScrollIndex - mHoverBarIndex; + S32 hidx = LLFastTimerUtil::NamedTimer::HISTORY_NUM - mScrollIndex - mHoverBarIndex; U64 ticks = idp->getHistoricalCount(hidx); ms = (F32)((F64)ticks * iclock_freq); calls = (S32)idp->getHistoricalCalls(hidx); @@ -466,7 +466,7 @@ void LLFastTimerView::draw() x += dx; BOOL is_child_of_hover_item = (idp == mHoverID); - LLFastTimer::NamedTimer* next_parent = idp->getParent(); + LLFastTimerUtil::NamedTimer* next_parent = idp->getParent(); while(!is_child_of_hover_item && next_parent) { is_child_of_hover_item = (mHoverID == next_parent); @@ -507,18 +507,18 @@ void LLFastTimerView::draw() barw = width - xleft - margin; // Draw the history bars - if (LLFastTimer::getLastFrameIndex() >= 0) + if (LLFastTimerUtil::getLastFrameIndex() >= 0) { LLLocalClipRect clip(LLRect(xleft, ytop, getRect().getWidth() - margin, margin)); U64 totalticks; - if (!LLFastTimer::sPauseHistory) + if (!LLFastTimerUtil::sPauseHistory) { - U64 ticks = LLFastTimer::NamedTimer::getRootNamedTimer().getHistoricalCount(mScrollIndex); + U64 ticks = LLFastTimerUtil::NamedTimer::getRootNamedTimer().getHistoricalCount(mScrollIndex); - if (LLFastTimer::getCurFrameIndex() >= 10) + if (LLFastTimerUtil::getCurFrameIndex() >= 10) { - U64 framec = LLFastTimer::getCurFrameIndex(); + U64 framec = LLFastTimerUtil::getCurFrameIndex(); U64 avg = (U64)mAvgCountTotal; mAvgCountTotal = (avg*framec + ticks) / (framec + 1); if (ticks > mMaxCountTotal) @@ -529,10 +529,10 @@ void LLFastTimerView::draw() if (ticks < mAvgCountTotal/100 || ticks > mAvgCountTotal*100) { - LLFastTimer::sResetHistory = true; + LLFastTimerUtil::sResetHistory = true; } - if (LLFastTimer::getCurFrameIndex() < 10 || LLFastTimer::sResetHistory) + if (LLFastTimerUtil::getCurFrameIndex() < 10 || LLFastTimerUtil::sResetHistory) { mAvgCountTotal = ticks; mMaxCountTotal = ticks; @@ -553,7 +553,7 @@ void LLFastTimerView::draw() totalticks = 0; for (S32 j=0; j totalticks) totalticks = ticks; @@ -643,7 +643,7 @@ void LLFastTimerView::draw() S32 tidx; if (j >= 0) { - tidx = LLFastTimer::NamedTimer::HISTORY_NUM - j - 1 - mScrollIndex; + tidx = LLFastTimerUtil::NamedTimer::HISTORY_NUM - j - 1 - mScrollIndex; } else { @@ -657,14 +657,14 @@ void LLFastTimerView::draw() std::vector deltax; xpos.push_back(xleft); - LLFastTimer::NamedTimer* prev_id = NULL; + LLFastTimerUtil::NamedTimer* prev_id = NULL; S32 i = 0; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimerUtil::NamedTimer::getRootNamedTimer()); it != end_timer_tree(); ++it, ++i) { - LLFastTimer::NamedTimer* idp = (*it); + LLFastTimerUtil::NamedTimer* idp = (*it); F32 frac = tidx == -1 ? (F32)idp->getCountAverage() / (F32)totalticks : (F32)idp->getHistoricalCount(tidx) / (F32)totalticks; @@ -691,7 +691,7 @@ void LLFastTimerView::draw() { U64 sublevelticks = 0; - for (LLFastTimer::NamedTimer::child_const_iter it = prev_id->beginChildren(); + for (LLFastTimerUtil::NamedTimer::child_const_iter it = prev_id->beginChildren(); it != prev_id->endChildren(); ++it) { @@ -733,7 +733,7 @@ void LLFastTimerView::draw() S32 scale_offset = 0; BOOL is_child_of_hover_item = (idp == mHoverID); - LLFastTimer::NamedTimer* next_parent = idp->getParent(); + LLFastTimerUtil::NamedTimer* next_parent = idp->getParent(); while(!is_child_of_hover_item && next_parent) { is_child_of_hover_item = (mHoverID == next_parent); @@ -797,10 +797,10 @@ void LLFastTimerView::draw() //highlight visible range { - S32 first_frame = LLFastTimer::NamedTimer::HISTORY_NUM - mScrollIndex; + S32 first_frame = LLFastTimerUtil::NamedTimer::HISTORY_NUM - mScrollIndex; S32 last_frame = first_frame - MAX_VISIBLE_HISTORY; - F32 frame_delta = ((F32) (graph_rect.getWidth()))/(LLFastTimer::NamedTimer::HISTORY_NUM-1); + F32 frame_delta = ((F32) (graph_rect.getWidth()))/(LLFastTimerUtil::NamedTimer::HISTORY_NUM-1); F32 right = (F32) graph_rect.mLeft + frame_delta*first_frame; F32 left = (F32) graph_rect.mLeft + frame_delta*last_frame; @@ -823,11 +823,11 @@ void LLFastTimerView::draw() } U64 cur_max = 0; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimerUtil::NamedTimer::getRootNamedTimer()); it != end_timer_tree(); ++it) { - LLFastTimer::NamedTimer* idp = (*it); + LLFastTimerUtil::NamedTimer* idp = (*it); //fatten highlighted timer if (mHoverID == idp) @@ -851,7 +851,7 @@ void LLFastTimerView::draw() gGL.color4f(col[0], col[1], col[2], alpha); gGL.begin(LLRender::LINE_STRIP); - for (U32 j = 0; j < LLFastTimer::NamedTimer::HISTORY_NUM; j++) + for (U32 j = 0; j < LLFastTimerUtil::NamedTimer::HISTORY_NUM; j++) { U64 ticks = idp->getHistoricalCount(j); @@ -871,7 +871,7 @@ void LLFastTimerView::draw() //normalize to highlighted timer cur_max = llmax(cur_max, ticks); } - F32 x = graph_rect.mLeft + ((F32) (graph_rect.getWidth()))/(LLFastTimer::NamedTimer::HISTORY_NUM-1)*j; + F32 x = graph_rect.mLeft + ((F32) (graph_rect.getWidth()))/(LLFastTimerUtil::NamedTimer::HISTORY_NUM-1)*j; F32 y = graph_rect.mBottom + (F32) graph_rect.getHeight()/max_ticks*ticks; gGL.vertex2f(x,y); } @@ -919,11 +919,11 @@ void LLFastTimerView::draw() { std::string legend_stat; bool first = true; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimerUtil::NamedTimer::getRootNamedTimer()); it != end_timer_tree(); ++it) { - LLFastTimer::NamedTimer* idp = (*it); + LLFastTimerUtil::NamedTimer* idp = (*it); if (!first) { @@ -941,11 +941,11 @@ void LLFastTimerView::draw() std::string timer_stat; first = true; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimerUtil::NamedTimer::getRootNamedTimer()); it != end_timer_tree(); ++it) { - LLFastTimer::NamedTimer* idp = (*it); + LLFastTimerUtil::NamedTimer* idp = (*it); if (!first) { @@ -984,10 +984,10 @@ void LLFastTimerView::draw() F64 LLFastTimerView::getTime(const std::string& name) { - const LLFastTimer::NamedTimer* timerp = LLFastTimer::getTimerByName(name); + const LLFastTimerUtil::NamedTimer* timerp = LLFastTimerUtil::getTimerByName(name); if (timerp) { - return (F64)timerp->getCountAverage() / (F64)LLFastTimer::countsPerSecond(); + return (F64)timerp->getCountAverage() / (F64)LLFastTimerUtil::countsPerSecond(); } return 0.0; } @@ -1179,13 +1179,13 @@ void LLFastTimerView::doAnalysisMetrics(std::string baseline, std::string target //static void LLFastTimerView::doAnalysis(std::string baseline, std::string target, std::string output) { - if(LLFastTimer::sLog) + if(LLFastTimerUtil::sLog) { doAnalysisDefault(baseline, target, output) ; return ; } - if(LLFastTimer::sMetricLog) + if(LLFastTimerUtil::sMetricLog) { doAnalysisMetrics(baseline, target, output) ; return ; diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index f5c8f23818..d03d83576e 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -61,7 +61,7 @@ public: virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); virtual void draw(); - LLFastTimer::NamedTimer* getLegendID(S32 y); + LLFastTimerUtil::NamedTimer* getLegendID(S32 y); F64 getTime(const std::string& name); private: @@ -85,8 +85,8 @@ private: U64 mMaxCountTotal; LLRect mBarRect; S32 mScrollIndex; - LLFastTimer::NamedTimer* mHoverID; - LLFastTimer::NamedTimer* mHoverTimer; + LLFastTimerUtil::NamedTimer* mHoverID; + LLFastTimerUtil::NamedTimer* mHoverTimer; LLRect mToolTipRect; S32 mHoverBarIndex; LLFrameTimer mHighlightTimer; diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index fc8790c172..769bc2e9e1 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -261,7 +261,7 @@ void LLVolumeImplFlexible::onSetVolume(const LLVolumeParams &volume_params, cons // updated every time step. In the future, perhaps there could be an // optimization similar to what Havok does for objects that are stationary. //--------------------------------------------------------------------------------- -static LLFastTimer::DeclareTimer FTM_FLEXIBLE_UPDATE("Update Flexies"); +static LLFastTimerUtil::DeclareTimer FTM_FLEXIBLE_UPDATE("Update Flexies"); BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { if (mVO->mDrawable.isNull()) diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 41f4d1a663..26cf88a840 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -295,7 +295,7 @@ void LLFolderView::checkTreeResortForModelChanged() } } -static LLFastTimer::DeclareTimer FTM_SORT("Sort Inventory"); +static LLFastTimerUtil::DeclareTimer FTM_SORT("Sort Inventory"); void LLFolderView::setSortOrder(U32 order) { @@ -377,7 +377,7 @@ void LLFolderView::setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse mIsOpen = TRUE; } -static LLFastTimer::DeclareTimer FTM_ARRANGE("Arrange"); +static LLFastTimerUtil::DeclareTimer FTM_ARRANGE("Arrange"); // This view grows and shinks to enclose all of its children items and folders. S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_generation ) @@ -477,7 +477,7 @@ const std::string LLFolderView::getFilterSubString(BOOL trim) return mFilter->getFilterSubString(trim); } -static LLFastTimer::DeclareTimer FTM_FILTER("Filter Inventory"); +static LLFastTimerUtil::DeclareTimer FTM_FILTER("Filter Inventory"); void LLFolderView::filter( LLInventoryFilter& filter ) { @@ -2056,8 +2056,8 @@ bool LLFolderView::doToSelected(LLInventoryModel* model, const LLSD& userdata) return true; } -static LLFastTimer::DeclareTimer FTM_AUTO_SELECT("Open and Select"); -static LLFastTimer::DeclareTimer FTM_INVENTORY("Inventory"); +static LLFastTimerUtil::DeclareTimer FTM_AUTO_SELECT("Open and Select"); +static LLFastTimerUtil::DeclareTimer FTM_INVENTORY("Inventory"); // Main idle routine void LLFolderView::doIdle() diff --git a/indra/newview/llhudmanager.cpp b/indra/newview/llhudmanager.cpp index bdb8dadfb4..8251c2ad8d 100644 --- a/indra/newview/llhudmanager.cpp +++ b/indra/newview/llhudmanager.cpp @@ -62,7 +62,7 @@ LLHUDManager::~LLHUDManager() { } -static LLFastTimer::DeclareTimer FTM_HUD_EFFECTS("Hud Effects"); +static LLFastTimerUtil::DeclareTimer FTM_HUD_EFFECTS("Hud Effects"); void LLHUDManager::updateEffects() { diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index dc55aba0db..4008719bd4 100644 --- a/indra/newview/llhudobject.cpp +++ b/indra/newview/llhudobject.cpp @@ -254,7 +254,7 @@ LLHUDEffect *LLHUDObject::addHUDEffect(const U8 type) return hud_objectp; } -static LLFastTimer::DeclareTimer FTM_HUD_UPDATE("Update Hud"); +static LLFastTimerUtil::DeclareTimer FTM_HUD_UPDATE("Update Hud"); // static void LLHUDObject::updateAll() diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 498a29728c..eb2dc630b0 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -258,7 +258,7 @@ LLInventoryFilter::EFolderShow LLInventoryPanel::getShowFolderState() void LLInventoryPanel::modelChanged(U32 mask) { - static LLFastTimer::DeclareTimer FTM_REFRESH("Inventory Refresh"); + static LLFastTimerUtil::DeclareTimer FTM_REFRESH("Inventory Refresh"); LLFastTimer t2(FTM_REFRESH); bool handled = false; diff --git a/indra/newview/llmetricperformancetester.cpp b/indra/newview/llmetricperformancetester.cpp index 93288c98d7..f3cdafa795 100644 --- a/indra/newview/llmetricperformancetester.cpp +++ b/indra/newview/llmetricperformancetester.cpp @@ -131,8 +131,8 @@ void LLMetricPerformanceTester::preOutputTestResults(LLSD* sd) } void LLMetricPerformanceTester::postOutputTestResults(LLSD* sd) { - LLMutexLock lock(LLFastTimer::sLogLock); - LLFastTimer::sLogQueue.push((*sd)); + LLMutexLock lock(LLFastTimerUtil::sLogLock); + LLFastTimerUtil::sLogQueue.push((*sd)); } void LLMetricPerformanceTester::outputTestResults() diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 6ca6734598..d33578ba1c 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -49,8 +49,8 @@ #include "llvoavatar.h" #include "lltextureatlas.h" -static LLFastTimer::DeclareTimer FTM_FRUSTUM_CULL("Frustum Culling"); -static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound"); +static LLFastTimerUtil::DeclareTimer FTM_FRUSTUM_CULL("Frustum Culling"); +static LLFastTimerUtil::DeclareTimer FTM_CULL_REBOUND("Cull Rebound"); const F32 SG_OCCLUSION_FUDGE = 0.25f; #define SG_DISCARD_TOLERANCE 0.01f @@ -641,7 +641,7 @@ void LLSpatialGroup::rebuildMesh() } } -static LLFastTimer::DeclareTimer FTM_REBUILD_VBO("VBO Rebuilt"); +static LLFastTimerUtil::DeclareTimer FTM_REBUILD_VBO("VBO Rebuilt"); void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group) { @@ -1508,7 +1508,7 @@ BOOL LLSpatialGroup::rebound() return TRUE; } -static LLFastTimer::DeclareTimer FTM_OCCLUSION_READBACK("Readback Occlusion"); +static LLFastTimerUtil::DeclareTimer FTM_OCCLUSION_READBACK("Readback Occlusion"); void LLSpatialGroup::checkOcclusion() { if (LLPipeline::sUseOcclusion > 1) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 99fa271b78..2c456d7df0 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2087,7 +2087,7 @@ bool idle_startup() LLAppViewer::instance()->handleLoginComplete(); // reset timers now that we are running "logged in" logic - LLFastTimer::reset(); + LLFastTimerUtil::reset(); LLAgentPicksInfo::getInstance()->requestNumberOfPicks(); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 3dac0ee452..352de5be7e 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -212,11 +212,11 @@ void display_stats() } } -static LLFastTimer::DeclareTimer FTM_PICK("Picking"); -static LLFastTimer::DeclareTimer FTM_RENDER("Render", true); -static LLFastTimer::DeclareTimer FTM_UPDATE_SKY("Update Sky"); -static LLFastTimer::DeclareTimer FTM_UPDATE_TEXTURES("Update Textures"); -static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE("Update Images"); +static LLFastTimerUtil::DeclareTimer FTM_PICK("Picking"); +static LLFastTimerUtil::DeclareTimer FTM_RENDER("Render", true); +static LLFastTimerUtil::DeclareTimer FTM_UPDATE_SKY("Update Sky"); +static LLFastTimerUtil::DeclareTimer FTM_UPDATE_TEXTURES("Update Textures"); +static LLFastTimerUtil::DeclareTimer FTM_IMAGE_UPDATE("Update Images"); // Paint the display! void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) @@ -1098,7 +1098,7 @@ BOOL setup_hud_matrices(const LLRect& screen_region) return TRUE; } -static LLFastTimer::DeclareTimer FTM_SWAP("Swap"); +static LLFastTimerUtil::DeclareTimer FTM_SWAP("Swap"); void render_ui(F32 zoom_factor, int subfield) { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 1bff04352c..ff0d4c511a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6841,7 +6841,7 @@ void handle_dump_avatar_local_textures(void*) void handle_dump_timers() { - LLFastTimer::dumpCurTimes(); + LLFastTimerUtil::dumpCurTimes(); } void handle_debug_avatar_textures(void*) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 3362142807..594c910d1b 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3485,7 +3485,7 @@ void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_ gObjectList.processCompressedObjectUpdate(mesgsys, user_data, OUT_TERSE_IMPROVED); } -static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Objects"); +static LLFastTimerUtil::DeclareTimer FTM_PROCESS_OBJECTS("Process Objects"); void process_kill_object(LLMessageSystem *mesgsys, void **user_data) diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 3c79045cc5..4479b991c7 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -117,7 +117,7 @@ S32 LLViewerObject::sAxisArrowLength(50); BOOL LLViewerObject::sPulseEnabled(FALSE); BOOL LLViewerObject::sUseSharedDrawables(FALSE); // TRUE -static LLFastTimer::DeclareTimer FTM_CREATE_OBJECT("Create Object"); +static LLFastTimerUtil::DeclareTimer FTM_CREATE_OBJECT("Create Object"); // static LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 96828ee1b6..71c42f1649 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -278,7 +278,7 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, } } -static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Objects"); +static LLFastTimerUtil::DeclareTimer FTM_PROCESS_OBJECTS("Process Objects"); void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, void **user_data, @@ -1357,7 +1357,7 @@ LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLVi } -static LLFastTimer::DeclareTimer FTM_CREATE_OBJECT("Create Object"); +static LLFastTimerUtil::DeclareTimer FTM_CREATE_OBJECT("Create Object"); LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRegion *regionp, const LLUUID &uuid, const U32 local_id, const LLHost &sender) diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 841a7ccc5e..2454ccaa48 100644 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -633,7 +633,7 @@ void LLViewerPartSim::shift(const LLVector3 &offset) } } -static LLFastTimer::DeclareTimer FTM_SIMULATE_PARTICLES("Simulate Particles"); +static LLFastTimerUtil::DeclareTimer FTM_SIMULATE_PARTICLES("Simulate Particles"); void LLViewerPartSim::updateSimulation() { diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index f825eaa8ab..0997359de1 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -305,7 +305,7 @@ void LLViewerTextureManager::init() LLViewerTexture::initClass() ; - if(LLFastTimer::sMetricLog) + if(LLFastTimerUtil::sMetricLog) { LLViewerTextureManager::sTesterp = new LLTexturePipelineTester() ; } diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 8252b7df00..a5b2bfb781 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -80,7 +80,7 @@ LLStat LLViewerTextureList::sRawMemStat(32, TRUE); LLStat LLViewerTextureList::sFormattedMemStat(32, TRUE); LLViewerTextureList gTextureList; -static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images"); +static LLFastTimerUtil::DeclareTimer FTM_PROCESS_IMAGES("Process Images"); /////////////////////////////////////////////////////////////////////////////// @@ -570,7 +570,7 @@ void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image) } //////////////////////////////////////////////////////////////////////////// -static LLFastTimer::DeclareTimer FTM_IMAGE_MARK_DIRTY("Dirty Images"); +static LLFastTimerUtil::DeclareTimer FTM_IMAGE_MARK_DIRTY("Dirty Images"); void LLViewerTextureList::updateImages(F32 max_time) { @@ -735,7 +735,7 @@ void LLViewerTextureList::updateImagesDecodePriorities() return type_from_host; } */ -static LLFastTimer::DeclareTimer FTM_IMAGE_CREATE("Create Images"); +static LLFastTimerUtil::DeclareTimer FTM_IMAGE_CREATE("Create Images"); F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time) { diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 83cbc8a1f9..d2827ee537 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2844,7 +2844,7 @@ void LLViewerWindow::updateKeyboardFocus() LLSideTray::getInstance()->highlightFocused(); } -static LLFastTimer::DeclareTimer FTM_UPDATE_WORLD_VIEW("Update World View"); +static LLFastTimerUtil::DeclareTimer FTM_UPDATE_WORLD_VIEW("Update World View"); void LLViewerWindow::updateWorldViewRect(bool use_full_window) { LLFastTimer ft(FTM_UPDATE_WORLD_VIEW); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 6e93bf1bf2..7e73bf4133 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2110,8 +2110,8 @@ S32 LLVOAvatar::setTETexture(const U8 te, const LLUUID& uuid) } } -static LLFastTimer::DeclareTimer FTM_AVATAR_UPDATE("Update Avatar"); -static LLFastTimer::DeclareTimer FTM_JOINT_UPDATE("Update Joints"); +static LLFastTimerUtil::DeclareTimer FTM_AVATAR_UPDATE("Update Avatar"); +static LLFastTimerUtil::DeclareTimer FTM_JOINT_UPDATE("Update Joints"); //------------------------------------------------------------------------ // idleUpdate() @@ -2304,7 +2304,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) }//if ( voiceEnabled ) } -static LLFastTimer::DeclareTimer FTM_ATTACHMENT_UPDATE("Update Attachments"); +static LLFastTimerUtil::DeclareTimer FTM_ATTACHMENT_UPDATE("Update Attachments"); void LLVOAvatar::idleUpdateMisc(bool detailed_update) { @@ -4675,7 +4675,7 @@ void LLVOAvatar::requestStopMotion( LLMotion* motion ) //----------------------------------------------------------------------------- // loadAvatar() //----------------------------------------------------------------------------- -static LLFastTimer::DeclareTimer FTM_LOAD_AVATAR("Load Avatar"); +static LLFastTimerUtil::DeclareTimer FTM_LOAD_AVATAR("Load Avatar"); BOOL LLVOAvatar::loadAvatar() { @@ -5263,7 +5263,7 @@ void LLVOAvatar::updateGL() //----------------------------------------------------------------------------- // updateGeometry() //----------------------------------------------------------------------------- -static LLFastTimer::DeclareTimer FTM_UPDATE_AVATAR("Update Avatar"); +static LLFastTimerUtil::DeclareTimer FTM_UPDATE_AVATAR("Update Avatar"); BOOL LLVOAvatar::updateGeometry(LLDrawable *drawable) { LLFastTimer ftm(FTM_UPDATE_AVATAR); diff --git a/indra/newview/llvoclouds.cpp b/indra/newview/llvoclouds.cpp index 177cb16c50..5d01163e08 100644 --- a/indra/newview/llvoclouds.cpp +++ b/indra/newview/llvoclouds.cpp @@ -115,7 +115,7 @@ LLDrawable* LLVOClouds::createDrawable(LLPipeline *pipeline) return mDrawable; } -static LLFastTimer::DeclareTimer FTM_UPDATE_CLOUDS("Update Clouds"); +static LLFastTimerUtil::DeclareTimer FTM_UPDATE_CLOUDS("Update Clouds"); BOOL LLVOClouds::updateGeometry(LLDrawable *drawable) { diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index e311f07912..9b0be69a7e 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -382,7 +382,7 @@ LLDrawable* LLVOGrass::createDrawable(LLPipeline *pipeline) return mDrawable; } -static LLFastTimer::DeclareTimer FTM_UPDATE_GRASS("Update Grass"); +static LLFastTimerUtil::DeclareTimer FTM_UPDATE_GRASS("Update Grass"); BOOL LLVOGrass::updateGeometry(LLDrawable *drawable) { diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 139d2fbd88..ac6030ccae 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -139,7 +139,7 @@ LLVector3 LLVOPartGroup::getCameraPosition() const return gAgent.getCameraPositionAgent(); } -static LLFastTimer::DeclareTimer FTM_UPDATE_PARTICLES("Update Particles"); +static LLFastTimerUtil::DeclareTimer FTM_UPDATE_PARTICLES("Update Particles"); BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) { LLFastTimer ftm(FTM_UPDATE_PARTICLES); @@ -428,8 +428,8 @@ void LLParticlePartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_co } } -static LLFastTimer::DeclareTimer FTM_REBUILD_GRASS_VB("Grass VB"); -static LLFastTimer::DeclareTimer FTM_REBUILD_PARTICLE_VB("Particle VB"); +static LLFastTimerUtil::DeclareTimer FTM_REBUILD_GRASS_VB("Grass VB"); +static LLFastTimerUtil::DeclareTimer FTM_REBUILD_PARTICLE_VB("Particle VB"); void LLParticlePartition::getGeometry(LLSpatialGroup* group) { diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 5ff8f0d267..a489142cf9 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -1231,7 +1231,7 @@ void LLVOSky::createDummyVertexBuffer() } } -static LLFastTimer::DeclareTimer FTM_RENDER_FAKE_VBO_UPDATE("Fake VBO Update"); +static LLFastTimerUtil::DeclareTimer FTM_RENDER_FAKE_VBO_UPDATE("Fake VBO Update"); void LLVOSky::updateDummyVertexBuffer() { @@ -1257,7 +1257,7 @@ void LLVOSky::updateDummyVertexBuffer() //---------------------------------- //end of fake vertex buffer updating //---------------------------------- -static LLFastTimer::DeclareTimer FTM_GEO_SKY("Sky Geometry"); +static LLFastTimerUtil::DeclareTimer FTM_GEO_SKY("Sky Geometry"); BOOL LLVOSky::updateGeometry(LLDrawable *drawable) { diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index ef7b161003..52ed8328b8 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -176,7 +176,7 @@ LLDrawable *LLVOSurfacePatch::createDrawable(LLPipeline *pipeline) return mDrawable; } -static LLFastTimer::DeclareTimer FTM_UPDATE_TERRAIN("Update Terrain"); +static LLFastTimerUtil::DeclareTimer FTM_UPDATE_TERRAIN("Update Terrain"); void LLVOSurfacePatch::updateGL() { @@ -1035,7 +1035,7 @@ LLVertexBuffer* LLTerrainPartition::createVertexBuffer(U32 type_mask, U32 usage) return new LLVertexBufferTerrain(); } -static LLFastTimer::DeclareTimer FTM_REBUILD_TERRAIN_VB("Terrain VB"); +static LLFastTimerUtil::DeclareTimer FTM_REBUILD_TERRAIN_VB("Terrain VB"); void LLTerrainPartition::getGeometry(LLSpatialGroup* group) { LLFastTimer ftm(FTM_REBUILD_TERRAIN_VB); diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 24f1c4bd24..98e12ad6ea 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -500,7 +500,7 @@ LLDrawable* LLVOTree::createDrawable(LLPipeline *pipeline) const S32 LEAF_INDICES = 24; const S32 LEAF_VERTICES = 16; -static LLFastTimer::DeclareTimer FTM_UPDATE_TREE("Update Tree"); +static LLFastTimerUtil::DeclareTimer FTM_UPDATE_TREE("Update Tree"); BOOL LLVOTree::updateGeometry(LLDrawable *drawable) { diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 55609621b3..6973633581 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -86,8 +86,8 @@ S32 LLVOVolume::sNumLODChanges = 0; LLPointer LLVOVolume::sObjectMediaClient = NULL; LLPointer LLVOVolume::sObjectMediaNavigateClient = NULL; -static LLFastTimer::DeclareTimer FTM_GEN_TRIANGLES("Generate Triangles"); -static LLFastTimer::DeclareTimer FTM_GEN_VOLUME("Generate Volumes"); +static LLFastTimerUtil::DeclareTimer FTM_GEN_TRIANGLES("Generate Triangles"); +static LLFastTimerUtil::DeclareTimer FTM_GEN_VOLUME("Generate Volumes"); // Implementation class of LLMediaDataClientObject. See llmediadataclient.h class LLMediaDataClientObjectImpl : public LLMediaDataClientObject @@ -1339,8 +1339,8 @@ void LLVOVolume::updateRelativeXform() } } -static LLFastTimer::DeclareTimer FTM_GEN_FLEX("Generate Flexies"); -static LLFastTimer::DeclareTimer FTM_UPDATE_PRIMITIVES("Update Primitives"); +static LLFastTimerUtil::DeclareTimer FTM_GEN_FLEX("Generate Flexies"); +static LLFastTimerUtil::DeclareTimer FTM_UPDATE_PRIMITIVES("Update Primitives"); BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) { @@ -3190,8 +3190,8 @@ void LLVolumeGeometryManager::getGeometry(LLSpatialGroup* group) } -static LLFastTimer::DeclareTimer FTM_REBUILD_VOLUME_VB("Volume"); -static LLFastTimer::DeclareTimer FTM_REBUILD_VBO("VBO Rebuilt"); +static LLFastTimerUtil::DeclareTimer FTM_REBUILD_VOLUME_VB("Volume"); +static LLFastTimerUtil::DeclareTimer FTM_REBUILD_VBO("VBO Rebuilt"); void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) { @@ -3423,7 +3423,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) mFaceList.clear(); } -static LLFastTimer::DeclareTimer FTM_VOLUME_GEOM("Volume Geometry"); +static LLFastTimerUtil::DeclareTimer FTM_VOLUME_GEOM("Volume Geometry"); void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) { llpushcallstacks ; diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp index a8c4625f6e..86cdde3f2e 100644 --- a/indra/newview/llvowater.cpp +++ b/indra/newview/llvowater.cpp @@ -136,7 +136,7 @@ LLDrawable *LLVOWater::createDrawable(LLPipeline *pipeline) return mDrawable; } -static LLFastTimer::DeclareTimer FTM_UPDATE_WATER("Update Water"); +static LLFastTimerUtil::DeclareTimer FTM_UPDATE_WATER("Update Water"); BOOL LLVOWater::updateGeometry(LLDrawable *drawable) { diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index d3238f16a8..77b07e0ccf 100644 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -307,7 +307,7 @@ void LLVOWLSky::restoreGL() gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); } -static LLFastTimer::DeclareTimer FTM_GEO_SKY("Sky Geometry"); +static LLFastTimerUtil::DeclareTimer FTM_GEO_SKY("Sky Geometry"); BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) { diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index 8be8f494da..5d03596a44 100644 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -261,7 +261,7 @@ void LLWaterParamManager::updateShaderUniforms(LLGLSLShader * shader) } } -static LLFastTimer::DeclareTimer FTM_UPDATE_WLPARAM("Update Windlight Params"); +static LLFastTimerUtil::DeclareTimer FTM_UPDATE_WLPARAM("Update Windlight Params"); void LLWaterParamManager::update(LLViewerCamera * cam) { diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index 7cac564619..9a0b2dfba8 100644 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -58,7 +58,7 @@ #include "curl/curl.h" LLWLParamManager * LLWLParamManager::sInstance = NULL; -static LLFastTimer::DeclareTimer FTM_UPDATE_WLPARAM("Update Windlight Params"); +static LLFastTimerUtil::DeclareTimer FTM_UPDATE_WLPARAM("Update Windlight Params"); LLWLParamManager::LLWLParamManager() : diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 4f4fc83819..f361767f68 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -140,34 +140,34 @@ BOOL gDebugPipeline = FALSE; LLPipeline gPipeline; const LLMatrix4* gGLLastMatrix = NULL; -LLFastTimer::DeclareTimer FTM_RENDER_GEOMETRY("Geometry"); -LLFastTimer::DeclareTimer FTM_RENDER_GRASS("Grass"); -LLFastTimer::DeclareTimer FTM_RENDER_INVISIBLE("Invisible"); -LLFastTimer::DeclareTimer FTM_RENDER_OCCLUSION("Occlusion"); -LLFastTimer::DeclareTimer FTM_RENDER_SHINY("Shiny"); -LLFastTimer::DeclareTimer FTM_RENDER_SIMPLE("Simple"); -LLFastTimer::DeclareTimer FTM_RENDER_TERRAIN("Terrain"); -LLFastTimer::DeclareTimer FTM_RENDER_TREES("Trees"); -LLFastTimer::DeclareTimer FTM_RENDER_UI("UI"); -LLFastTimer::DeclareTimer FTM_RENDER_WATER("Water"); -LLFastTimer::DeclareTimer FTM_RENDER_WL_SKY("Windlight Sky"); -LLFastTimer::DeclareTimer FTM_RENDER_ALPHA("Alpha Objects"); -LLFastTimer::DeclareTimer FTM_RENDER_CHARACTERS("Avatars"); -LLFastTimer::DeclareTimer FTM_RENDER_BUMP("Bump"); -LLFastTimer::DeclareTimer FTM_RENDER_FULLBRIGHT("Fullbright"); -LLFastTimer::DeclareTimer FTM_RENDER_GLOW("Glow"); -LLFastTimer::DeclareTimer FTM_GEO_UPDATE("Geo Update"); -LLFastTimer::DeclareTimer FTM_POOLRENDER("RenderPool"); -LLFastTimer::DeclareTimer FTM_POOLS("Pools"); -LLFastTimer::DeclareTimer FTM_RENDER_BLOOM_FBO("First FBO"); -LLFastTimer::DeclareTimer FTM_STATESORT("Sort Draw State"); -LLFastTimer::DeclareTimer FTM_PIPELINE("Pipeline"); -LLFastTimer::DeclareTimer FTM_CLIENT_COPY("Client Copy"); -LLFastTimer::DeclareTimer FTM_RENDER_DEFERRED("Deferred Shading"); - - -static LLFastTimer::DeclareTimer FTM_STATESORT_DRAWABLE("Sort Drawables"); -static LLFastTimer::DeclareTimer FTM_STATESORT_POSTSORT("Post Sort"); +LLFastTimerUtil::DeclareTimer FTM_RENDER_GEOMETRY("Geometry"); +LLFastTimerUtil::DeclareTimer FTM_RENDER_GRASS("Grass"); +LLFastTimerUtil::DeclareTimer FTM_RENDER_INVISIBLE("Invisible"); +LLFastTimerUtil::DeclareTimer FTM_RENDER_OCCLUSION("Occlusion"); +LLFastTimerUtil::DeclareTimer FTM_RENDER_SHINY("Shiny"); +LLFastTimerUtil::DeclareTimer FTM_RENDER_SIMPLE("Simple"); +LLFastTimerUtil::DeclareTimer FTM_RENDER_TERRAIN("Terrain"); +LLFastTimerUtil::DeclareTimer FTM_RENDER_TREES("Trees"); +LLFastTimerUtil::DeclareTimer FTM_RENDER_UI("UI"); +LLFastTimerUtil::DeclareTimer FTM_RENDER_WATER("Water"); +LLFastTimerUtil::DeclareTimer FTM_RENDER_WL_SKY("Windlight Sky"); +LLFastTimerUtil::DeclareTimer FTM_RENDER_ALPHA("Alpha Objects"); +LLFastTimerUtil::DeclareTimer FTM_RENDER_CHARACTERS("Avatars"); +LLFastTimerUtil::DeclareTimer FTM_RENDER_BUMP("Bump"); +LLFastTimerUtil::DeclareTimer FTM_RENDER_FULLBRIGHT("Fullbright"); +LLFastTimerUtil::DeclareTimer FTM_RENDER_GLOW("Glow"); +LLFastTimerUtil::DeclareTimer FTM_GEO_UPDATE("Geo Update"); +LLFastTimerUtil::DeclareTimer FTM_POOLRENDER("RenderPool"); +LLFastTimerUtil::DeclareTimer FTM_POOLS("Pools"); +LLFastTimerUtil::DeclareTimer FTM_RENDER_BLOOM_FBO("First FBO"); +LLFastTimerUtil::DeclareTimer FTM_STATESORT("Sort Draw State"); +LLFastTimerUtil::DeclareTimer FTM_PIPELINE("Pipeline"); +LLFastTimerUtil::DeclareTimer FTM_CLIENT_COPY("Client Copy"); +LLFastTimerUtil::DeclareTimer FTM_RENDER_DEFERRED("Deferred Shading"); + + +static LLFastTimerUtil::DeclareTimer FTM_STATESORT_DRAWABLE("Sort Drawables"); +static LLFastTimerUtil::DeclareTimer FTM_STATESORT_POSTSORT("Post Sort"); //---------------------------------------- std::string gPoolNames[] = @@ -508,7 +508,7 @@ void LLPipeline::destroyGL() } } -static LLFastTimer::DeclareTimer FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture"); +static LLFastTimerUtil::DeclareTimer FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture"); void LLPipeline::resizeScreenTexture() { LLFastTimer ft(FTM_RESIZE_SCREEN_TEXTURE); @@ -1396,8 +1396,8 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list) } } -static LLFastTimer::DeclareTimer FTM_OCTREE_BALANCE("Balance Octree"); -static LLFastTimer::DeclareTimer FTM_UPDATE_MOVE("Update Move"); +static LLFastTimerUtil::DeclareTimer FTM_OCTREE_BALANCE("Balance Octree"); +static LLFastTimerUtil::DeclareTimer FTM_UPDATE_MOVE("Update Move"); void LLPipeline::updateMove() { @@ -1557,7 +1557,7 @@ BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3& return res; } -static LLFastTimer::DeclareTimer FTM_CULL("Object Culling"); +static LLFastTimerUtil::DeclareTimer FTM_CULL("Object Culling"); void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip) { @@ -2188,7 +2188,7 @@ void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags f } } -static LLFastTimer::DeclareTimer FTM_RESET_DRAWORDER("Reset Draw Order"); +static LLFastTimerUtil::DeclareTimer FTM_RESET_DRAWORDER("Reset Draw Order"); void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) { @@ -5519,7 +5519,7 @@ void LLPipeline::bindScreenToTexture() } -static LLFastTimer::DeclareTimer FTM_RENDER_BLOOM("Bloom"); +static LLFastTimerUtil::DeclareTimer FTM_RENDER_BLOOM("Bloom"); void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) { LLMemType mt_ru(LLMemType::MTYPE_PIPELINE_RENDER_BLOOM); @@ -6227,16 +6227,16 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen } } -static LLFastTimer::DeclareTimer FTM_GI_TRACE("Trace"); -static LLFastTimer::DeclareTimer FTM_GI_GATHER("Gather"); -static LLFastTimer::DeclareTimer FTM_SUN_SHADOW("Shadow Map"); -static LLFastTimer::DeclareTimer FTM_SOFTEN_SHADOW("Shadow Soften"); -static LLFastTimer::DeclareTimer FTM_EDGE_DETECTION("Find Edges"); -static LLFastTimer::DeclareTimer FTM_LOCAL_LIGHTS("Local Lights"); -static LLFastTimer::DeclareTimer FTM_ATMOSPHERICS("Atmospherics"); -static LLFastTimer::DeclareTimer FTM_FULLSCREEN_LIGHTS("Fullscreen Lights"); -static LLFastTimer::DeclareTimer FTM_PROJECTORS("Projectors"); -static LLFastTimer::DeclareTimer FTM_POST("Post"); +static LLFastTimerUtil::DeclareTimer FTM_GI_TRACE("Trace"); +static LLFastTimerUtil::DeclareTimer FTM_GI_GATHER("Gather"); +static LLFastTimerUtil::DeclareTimer FTM_SUN_SHADOW("Shadow Map"); +static LLFastTimerUtil::DeclareTimer FTM_SOFTEN_SHADOW("Shadow Soften"); +static LLFastTimerUtil::DeclareTimer FTM_EDGE_DETECTION("Find Edges"); +static LLFastTimerUtil::DeclareTimer FTM_LOCAL_LIGHTS("Local Lights"); +static LLFastTimerUtil::DeclareTimer FTM_ATMOSPHERICS("Atmospherics"); +static LLFastTimerUtil::DeclareTimer FTM_FULLSCREEN_LIGHTS("Fullscreen Lights"); +static LLFastTimerUtil::DeclareTimer FTM_PROJECTORS("Projectors"); +static LLFastTimerUtil::DeclareTimer FTM_POST("Post"); void LLPipeline::renderDeferredLighting() @@ -7433,9 +7433,9 @@ glh::matrix4f scale_translate_to_fit(const LLVector3 min, const LLVector3 max) return ret; } -static LLFastTimer::DeclareTimer FTM_SHADOW_RENDER("Render Shadows"); -static LLFastTimer::DeclareTimer FTM_SHADOW_ALPHA("Alpha Shadow"); -static LLFastTimer::DeclareTimer FTM_SHADOW_SIMPLE("Simple Shadow"); +static LLFastTimerUtil::DeclareTimer FTM_SHADOW_RENDER("Render Shadows"); +static LLFastTimerUtil::DeclareTimer FTM_SHADOW_ALPHA("Alpha Shadow"); +static LLFastTimerUtil::DeclareTimer FTM_SHADOW_SIMPLE("Simple Shadow"); void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& shadow_cam, LLCullResult &result, BOOL use_shader, BOOL use_occlusion) { diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 67004a5f2d..13b6270bd6 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -78,25 +78,25 @@ glh::matrix4f gl_ortho(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, glh::matrix4f gl_perspective(GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar); glh::matrix4f gl_lookat(LLVector3 eye, LLVector3 center, LLVector3 up); -extern LLFastTimer::DeclareTimer FTM_RENDER_GEOMETRY; -extern LLFastTimer::DeclareTimer FTM_RENDER_GRASS; -extern LLFastTimer::DeclareTimer FTM_RENDER_INVISIBLE; -extern LLFastTimer::DeclareTimer FTM_RENDER_OCCLUSION; -extern LLFastTimer::DeclareTimer FTM_RENDER_SHINY; -extern LLFastTimer::DeclareTimer FTM_RENDER_SIMPLE; -extern LLFastTimer::DeclareTimer FTM_RENDER_TERRAIN; -extern LLFastTimer::DeclareTimer FTM_RENDER_TREES; -extern LLFastTimer::DeclareTimer FTM_RENDER_UI; -extern LLFastTimer::DeclareTimer FTM_RENDER_WATER; -extern LLFastTimer::DeclareTimer FTM_RENDER_WL_SKY; -extern LLFastTimer::DeclareTimer FTM_RENDER_ALPHA; -extern LLFastTimer::DeclareTimer FTM_RENDER_CHARACTERS; -extern LLFastTimer::DeclareTimer FTM_RENDER_BUMP; -extern LLFastTimer::DeclareTimer FTM_RENDER_FULLBRIGHT; -extern LLFastTimer::DeclareTimer FTM_RENDER_GLOW; -extern LLFastTimer::DeclareTimer FTM_STATESORT; -extern LLFastTimer::DeclareTimer FTM_PIPELINE; -extern LLFastTimer::DeclareTimer FTM_CLIENT_COPY; +extern LLFastTimerUtil::DeclareTimer FTM_RENDER_GEOMETRY; +extern LLFastTimerUtil::DeclareTimer FTM_RENDER_GRASS; +extern LLFastTimerUtil::DeclareTimer FTM_RENDER_INVISIBLE; +extern LLFastTimerUtil::DeclareTimer FTM_RENDER_OCCLUSION; +extern LLFastTimerUtil::DeclareTimer FTM_RENDER_SHINY; +extern LLFastTimerUtil::DeclareTimer FTM_RENDER_SIMPLE; +extern LLFastTimerUtil::DeclareTimer FTM_RENDER_TERRAIN; +extern LLFastTimerUtil::DeclareTimer FTM_RENDER_TREES; +extern LLFastTimerUtil::DeclareTimer FTM_RENDER_UI; +extern LLFastTimerUtil::DeclareTimer FTM_RENDER_WATER; +extern LLFastTimerUtil::DeclareTimer FTM_RENDER_WL_SKY; +extern LLFastTimerUtil::DeclareTimer FTM_RENDER_ALPHA; +extern LLFastTimerUtil::DeclareTimer FTM_RENDER_CHARACTERS; +extern LLFastTimerUtil::DeclareTimer FTM_RENDER_BUMP; +extern LLFastTimerUtil::DeclareTimer FTM_RENDER_FULLBRIGHT; +extern LLFastTimerUtil::DeclareTimer FTM_RENDER_GLOW; +extern LLFastTimerUtil::DeclareTimer FTM_STATESORT; +extern LLFastTimerUtil::DeclareTimer FTM_PIPELINE; +extern LLFastTimerUtil::DeclareTimer FTM_CLIENT_COPY; class LLPipeline -- cgit v1.2.3 From daa4965fe053dbd1af1f9665b29a4a10ac31cfea Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 11 Jan 2010 12:05:13 -0800 Subject: renamed LLFastTimerUtil to LLFastTimer --- indra/newview/llappviewer.cpp | 58 +++++++------- indra/newview/lldrawable.cpp | 2 +- indra/newview/lldrawpoolavatar.cpp | 2 +- indra/newview/lldrawpoolsimple.cpp | 4 +- indra/newview/lldrawpoolterrain.cpp | 2 +- indra/newview/lldrawpooltree.cpp | 2 +- indra/newview/llfasttimerview.cpp | 118 ++++++++++++++-------------- indra/newview/llfasttimerview.h | 6 +- indra/newview/llflexibleobject.cpp | 2 +- indra/newview/llfolderview.cpp | 10 +-- indra/newview/llhudmanager.cpp | 2 +- indra/newview/llhudobject.cpp | 2 +- indra/newview/llinventorypanel.cpp | 2 +- indra/newview/llmetricperformancetester.cpp | 4 +- indra/newview/llspatialpartition.cpp | 8 +- indra/newview/llstartup.cpp | 2 +- indra/newview/llviewerdisplay.cpp | 12 +-- indra/newview/llviewermenu.cpp | 2 +- indra/newview/llviewermessage.cpp | 2 +- indra/newview/llviewerobject.cpp | 2 +- indra/newview/llviewerobjectlist.cpp | 4 +- indra/newview/llviewerpartsim.cpp | 2 +- indra/newview/llviewertexture.cpp | 2 +- indra/newview/llviewertexturelist.cpp | 6 +- indra/newview/llviewerwindow.cpp | 2 +- indra/newview/llvoavatar.cpp | 10 +-- indra/newview/llvoclouds.cpp | 2 +- indra/newview/llvograss.cpp | 2 +- indra/newview/llvopartgroup.cpp | 6 +- indra/newview/llvosky.cpp | 4 +- indra/newview/llvosurfacepatch.cpp | 4 +- indra/newview/llvotree.cpp | 2 +- indra/newview/llvovolume.cpp | 14 ++-- indra/newview/llvowater.cpp | 2 +- indra/newview/llvowlsky.cpp | 2 +- indra/newview/llwaterparammanager.cpp | 2 +- indra/newview/llwlparammanager.cpp | 2 +- indra/newview/pipeline.cpp | 94 +++++++++++----------- indra/newview/pipeline.h | 38 ++++----- 39 files changed, 222 insertions(+), 222 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8ac2f0966f..e0356bc091 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -480,11 +480,11 @@ public: LLFastTimerLogThread() : LLThread("fast timer log") { - if(LLFastTimerUtil::sLog) + if(LLFastTimer::sLog) { mFile = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "performance.slp"); } - if(LLFastTimerUtil::sMetricLog) + if(LLFastTimer::sMetricLog) { mFile = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "metric.slp"); } @@ -496,7 +496,7 @@ public: while (!LLAppViewer::instance()->isQuitting()) { - LLFastTimerUtil::writeLog(os); + LLFastTimer::writeLog(os); os.flush(); ms_sleep(32); } @@ -606,7 +606,7 @@ bool LLAppViewer::init() // into the log files during normal startup until AFTER // we run the "program crashed last time" error handler below. // - LLFastTimerUtil::reset(); + LLFastTimer::reset(); // Need to do this initialization before we do anything else, since anything // that touches files should really go through the lldir API @@ -911,15 +911,15 @@ bool LLAppViewer::init() return true; } -static LLFastTimerUtil::DeclareTimer FTM_MESSAGES("System Messages"); -static LLFastTimerUtil::DeclareTimer FTM_SLEEP("Sleep"); -static LLFastTimerUtil::DeclareTimer FTM_TEXTURE_CACHE("Texture Cache"); -static LLFastTimerUtil::DeclareTimer FTM_DECODE("Image Decode"); -static LLFastTimerUtil::DeclareTimer FTM_VFS("VFS Thread"); -static LLFastTimerUtil::DeclareTimer FTM_LFS("LFS Thread"); -static LLFastTimerUtil::DeclareTimer FTM_PAUSE_THREADS("Pause Threads"); -static LLFastTimerUtil::DeclareTimer FTM_IDLE("Idle"); -static LLFastTimerUtil::DeclareTimer FTM_PUMP("Pump"); +static LLFastTimer::DeclareTimer FTM_MESSAGES("System Messages"); +static LLFastTimer::DeclareTimer FTM_SLEEP("Sleep"); +static LLFastTimer::DeclareTimer FTM_TEXTURE_CACHE("Texture Cache"); +static LLFastTimer::DeclareTimer FTM_DECODE("Image Decode"); +static LLFastTimer::DeclareTimer FTM_VFS("VFS Thread"); +static LLFastTimer::DeclareTimer FTM_LFS("LFS Thread"); +static LLFastTimer::DeclareTimer FTM_PAUSE_THREADS("Pause Threads"); +static LLFastTimer::DeclareTimer FTM_IDLE("Idle"); +static LLFastTimer::DeclareTimer FTM_PUMP("Pump"); bool LLAppViewer::mainLoop() { @@ -956,7 +956,7 @@ bool LLAppViewer::mainLoop() // Handle messages while (!LLApp::isExiting()) { - LLFastTimerUtil::nextFrame(); // Should be outside of any timer instances + LLFastTimer::nextFrame(); // Should be outside of any timer instances try { @@ -1551,14 +1551,14 @@ bool LLAppViewer::cleanup() { llinfos << "Analyzing performance" << llendl; - if(LLFastTimerUtil::sLog) + if(LLFastTimer::sLog) { LLFastTimerView::doAnalysis( gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "performance_baseline.slp"), gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "performance.slp"), gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "performance_report.csv")); } - if(LLFastTimerUtil::sMetricLog) + if(LLFastTimer::sMetricLog) { LLFastTimerView::doAnalysis( gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "metric_baseline.slp"), @@ -1678,9 +1678,9 @@ bool LLAppViewer::initThreads() LLAppViewer::sTextureFetch = new LLTextureFetch(LLAppViewer::getTextureCache(), sImageDecodeThread, enable_threads && false); LLImage::initClass(); - if (LLFastTimerUtil::sLog || LLFastTimerUtil::sMetricLog) + if (LLFastTimer::sLog || LLFastTimer::sMetricLog) { - LLFastTimerUtil::sLogLock = new LLMutex(NULL); + LLFastTimer::sLogLock = new LLMutex(NULL); mFastTimerLogThread = new LLFastTimerLogThread(); mFastTimerLogThread->start(); } @@ -2031,12 +2031,12 @@ bool LLAppViewer::initConfiguration() if (clp.hasOption("logperformance")) { - LLFastTimerUtil::sLog = TRUE; + LLFastTimer::sLog = TRUE; } if(clp.hasOption("logmetrics")) { - LLFastTimerUtil::sMetricLog = TRUE ; + LLFastTimer::sMetricLog = TRUE ; } if (clp.hasOption("graphicslevel")) @@ -3370,14 +3370,14 @@ public: } }; -static LLFastTimerUtil::DeclareTimer FTM_AUDIO_UPDATE("Update Audio"); -static LLFastTimerUtil::DeclareTimer FTM_CLEANUP("Cleanup"); -static LLFastTimerUtil::DeclareTimer FTM_IDLE_CB("Idle Callbacks"); -static LLFastTimerUtil::DeclareTimer FTM_LOD_UPDATE("Update LOD"); -static LLFastTimerUtil::DeclareTimer FTM_OBJECTLIST_UPDATE("Update Objectlist"); -static LLFastTimerUtil::DeclareTimer FTM_REGION_UPDATE("Update Region"); -static LLFastTimerUtil::DeclareTimer FTM_WORLD_UPDATE("Update World"); -static LLFastTimerUtil::DeclareTimer FTM_NETWORK("Network"); +static LLFastTimer::DeclareTimer FTM_AUDIO_UPDATE("Update Audio"); +static LLFastTimer::DeclareTimer FTM_CLEANUP("Cleanup"); +static LLFastTimer::DeclareTimer FTM_IDLE_CB("Idle Callbacks"); +static LLFastTimer::DeclareTimer FTM_LOD_UPDATE("Update LOD"); +static LLFastTimer::DeclareTimer FTM_OBJECTLIST_UPDATE("Update Objectlist"); +static LLFastTimer::DeclareTimer FTM_REGION_UPDATE("Update Region"); +static LLFastTimer::DeclareTimer FTM_WORLD_UPDATE("Update World"); +static LLFastTimer::DeclareTimer FTM_NETWORK("Network"); /////////////////////////////////////////////////////// // idle() @@ -3882,7 +3882,7 @@ void LLAppViewer::sendLogoutRequest() static F32 CheckMessagesMaxTime = CHECK_MESSAGES_DEFAULT_MAX_TIME; #endif -static LLFastTimerUtil::DeclareTimer FTM_IDLE_NETWORK("Network"); +static LLFastTimer::DeclareTimer FTM_IDLE_NETWORK("Network"); void LLAppViewer::idleNetwork() { diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 02e5f9c653..d60330024a 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -60,7 +60,7 @@ const F32 MAX_INTERPOLATE_DISTANCE_SQUARED = 10.f * 10.f; const F32 OBJECT_DAMPING_TIME_CONSTANT = 0.06f; const F32 MIN_SHADOW_CASTER_RADIUS = 2.0f; -static LLFastTimerUtil::DeclareTimer FTM_CULL_REBOUND("Cull Rebound"); +static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound"); //////////////////////// diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 605095f24a..546b60f286 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -94,7 +94,7 @@ S32 normal_channel = -1; S32 specular_channel = -1; S32 diffuse_channel = -1; -static LLFastTimerUtil::DeclareTimer FTM_SHADOW_AVATAR("Avatar Shadow"); +static LLFastTimer::DeclareTimer FTM_SHADOW_AVATAR("Avatar Shadow"); LLDrawPoolAvatar::LLDrawPoolAvatar() : LLFacePool(POOL_AVATAR) diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp index 04f411e345..ca7a1b47c2 100644 --- a/indra/newview/lldrawpoolsimple.cpp +++ b/indra/newview/lldrawpoolsimple.cpp @@ -47,8 +47,8 @@ static LLGLSLShader* simple_shader = NULL; static LLGLSLShader* fullbright_shader = NULL; -static LLFastTimerUtil::DeclareTimer FTM_RENDER_SIMPLE_DEFERRED("Deferred Simple"); -static LLFastTimerUtil::DeclareTimer FTM_RENDER_GRASS_DEFERRED("Deferred Grass"); +static LLFastTimer::DeclareTimer FTM_RENDER_SIMPLE_DEFERRED("Deferred Simple"); +static LLFastTimer::DeclareTimer FTM_RENDER_GRASS_DEFERRED("Deferred Grass"); void LLDrawPoolGlow::render(S32 pass) { diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp index 0e36e9e6d2..9dc22cddcd 100644 --- a/indra/newview/lldrawpoolterrain.cpp +++ b/indra/newview/lldrawpoolterrain.cpp @@ -61,7 +61,7 @@ int DebugDetailMap = 0; S32 LLDrawPoolTerrain::sDetailMode = 1; F32 LLDrawPoolTerrain::sDetailScale = DETAIL_SCALE; static LLGLSLShader* sShader = NULL; -static LLFastTimerUtil::DeclareTimer FTM_SHADOW_TERRAIN("Terrain Shadow"); +static LLFastTimer::DeclareTimer FTM_SHADOW_TERRAIN("Terrain Shadow"); LLDrawPoolTerrain::LLDrawPoolTerrain(LLViewerTexture *texturep) : diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp index 192b0a13d3..5521fb05a8 100644 --- a/indra/newview/lldrawpooltree.cpp +++ b/indra/newview/lldrawpooltree.cpp @@ -46,7 +46,7 @@ S32 LLDrawPoolTree::sDiffTex = 0; static LLGLSLShader* shader = NULL; -static LLFastTimerUtil::DeclareTimer FTM_SHADOW_TREE("Tree Shadow"); +static LLFastTimer::DeclareTimer FTM_SHADOW_TREE("Tree Shadow"); LLDrawPoolTree::LLDrawPoolTree(LLViewerTexture *texturep) : LLFacePool(POOL_TREE), diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index b36909f3ac..7d8bb6e104 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -63,17 +63,17 @@ static const S32 LINE_GRAPH_HEIGHT = 240; static S32 FTV_NUM_TIMERS; const S32 FTV_MAX_DEPTH = 8; -std::vector ft_display_idx; // line of table entry for display purposes (for collapse) +std::vector ft_display_idx; // line of table entry for display purposes (for collapse) -typedef LLTreeDFSIter timer_tree_iterator_t; +typedef LLTreeDFSIter timer_tree_iterator_t; BOOL LLFastTimerView::sAnalyzePerformance = FALSE; -static timer_tree_iterator_t begin_timer_tree(LLFastTimerUtil::NamedTimer& id) +static timer_tree_iterator_t begin_timer_tree(LLFastTimer::NamedTimer& id) { return timer_tree_iterator_t(&id, - boost::bind(boost::mem_fn(&LLFastTimerUtil::NamedTimer::beginChildren), _1), - boost::bind(boost::mem_fn(&LLFastTimerUtil::NamedTimer::endChildren), _1)); + boost::bind(boost::mem_fn(&LLFastTimer::NamedTimer::beginChildren), _1), + boost::bind(boost::mem_fn(&LLFastTimer::NamedTimer::endChildren), _1)); } static timer_tree_iterator_t end_timer_tree() @@ -96,7 +96,7 @@ LLFastTimerView::LLFastTimerView(const LLRect& rect) mScrollIndex = 0; mHoverID = NULL; mHoverBarIndex = -1; - FTV_NUM_TIMERS = LLFastTimerUtil::NamedTimer::instanceCount(); + FTV_NUM_TIMERS = LLFastTimer::NamedTimer::instanceCount(); mPrintStats = -1; mAverageCyclesPerTimer = 0; } @@ -125,7 +125,7 @@ BOOL LLFastTimerView::handleRightMouseDown(S32 x, S32 y, MASK mask) return FALSE; } -LLFastTimerUtil::NamedTimer* LLFastTimerView::getLegendID(S32 y) +LLFastTimer::NamedTimer* LLFastTimerView::getLegendID(S32 y) { S32 idx = (getRect().getHeight() - y) / ((S32) LLFontGL::getFontMonospace()->getLineHeight()+2) - 5; @@ -141,7 +141,7 @@ BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask) { if (x < mBarRect.mLeft) { - LLFastTimerUtil::NamedTimer* idp = getLegendID(y); + LLFastTimer::NamedTimer* idp = getLegendID(y); if (idp) { idp->setCollapsed(!idp->getCollapsed()); @@ -175,9 +175,9 @@ BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask) else { // pause/unpause - LLFastTimerUtil::sPauseHistory = !LLFastTimerUtil::sPauseHistory; + LLFastTimer::sPauseHistory = !LLFastTimer::sPauseHistory; // reset scroll to bottom when unpausing - if (!LLFastTimerUtil::sPauseHistory) + if (!LLFastTimer::sPauseHistory) { mScrollIndex = 0; } @@ -196,9 +196,9 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) mHoverTimer = NULL; mHoverID = NULL; - if(LLFastTimerUtil::sPauseHistory && mBarRect.pointInRect(x, y)) + if(LLFastTimer::sPauseHistory && mBarRect.pointInRect(x, y)) { - mHoverBarIndex = llmin(LLFastTimerUtil::getCurFrameIndex() - 1, + mHoverBarIndex = llmin(LLFastTimer::getCurFrameIndex() - 1, MAX_VISIBLE_HISTORY - ((y - mBarRect.mBottom) * (MAX_VISIBLE_HISTORY + 2) / mBarRect.getHeight())); if (mHoverBarIndex == 0) { @@ -210,7 +210,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) } S32 i = 0; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimerUtil::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); it != end_timer_tree(); ++it, ++i) { @@ -234,7 +234,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) } else if (x < mBarRect.mLeft) { - LLFastTimerUtil::NamedTimer* timer_id = getLegendID(y); + LLFastTimer::NamedTimer* timer_id = getLegendID(y); if (timer_id) { mHoverID = timer_id; @@ -247,7 +247,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask) BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask) { - if(LLFastTimerUtil::sPauseHistory && mBarRect.pointInRect(x, y)) + if(LLFastTimer::sPauseHistory && mBarRect.pointInRect(x, y)) { // tooltips for timer bars if (mHoverTimer) @@ -256,7 +256,7 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask) localRectToScreen(mToolTipRect, &screen_rect); LLToolTipMgr::instance().show(LLToolTip::Params() - .message(mHoverTimer->getToolTip(LLFastTimerUtil::NamedTimer::HISTORY_NUM - mScrollIndex - mHoverBarIndex)) + .message(mHoverTimer->getToolTip(LLFastTimer::NamedTimer::HISTORY_NUM - mScrollIndex - mHoverBarIndex)) .sticky_rect(screen_rect) .delay_time(0.f)); @@ -268,7 +268,7 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask) // tooltips for timer legend if (x < mBarRect.mLeft) { - LLFastTimerUtil::NamedTimer* idp = getLegendID(y); + LLFastTimer::NamedTimer* idp = getLegendID(y); if (idp) { LLToolTipMgr::instance().show(idp->getToolTip()); @@ -283,16 +283,16 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask) BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks) { - LLFastTimerUtil::sPauseHistory = TRUE; + LLFastTimer::sPauseHistory = TRUE; mScrollIndex = llclamp(mScrollIndex - clicks, 0, - llmin(LLFastTimerUtil::getLastFrameIndex(), (S32)LLFastTimerUtil::NamedTimer::HISTORY_NUM - MAX_VISIBLE_HISTORY)); + llmin(LLFastTimer::getLastFrameIndex(), (S32)LLFastTimer::NamedTimer::HISTORY_NUM - MAX_VISIBLE_HISTORY)); return TRUE; } -static LLFastTimerUtil::DeclareTimer FTM_RENDER_TIMER("Timers", true); +static LLFastTimer::DeclareTimer FTM_RENDER_TIMER("Timers", true); -static std::map sTimerColors; +static std::map sTimerColors; void LLFastTimerView::draw() { @@ -300,7 +300,7 @@ void LLFastTimerView::draw() std::string tdesc; - F64 clock_freq = (F64)LLFastTimerUtil::countsPerSecond(); + F64 clock_freq = (F64)LLFastTimer::countsPerSecond(); F64 iclock_freq = 1000.0 / clock_freq; S32 margin = 10; @@ -367,7 +367,7 @@ void LLFastTimerView::draw() y -= (texth + 2); } - S32 histmax = llmin(LLFastTimerUtil::getLastFrameIndex()+1, MAX_VISIBLE_HISTORY); + S32 histmax = llmin(LLFastTimer::getLastFrameIndex()+1, MAX_VISIBLE_HISTORY); // Draw the legend xleft = margin; @@ -375,15 +375,15 @@ void LLFastTimerView::draw() y -= (texth + 2); - sTimerColors[&LLFastTimerUtil::NamedTimer::getRootNamedTimer()] = LLColor4::grey; + sTimerColors[&LLFastTimer::NamedTimer::getRootNamedTimer()] = LLColor4::grey; F32 hue = 0.f; - for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimerUtil::NamedTimer::getRootNamedTimer()); + for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); it != timer_tree_iterator_t(); ++it) { - LLFastTimerUtil::NamedTimer* idp = (*it); + LLFastTimer::NamedTimer* idp = (*it); const F32 HUE_INCREMENT = 0.23f; hue = fmodf(hue + HUE_INCREMENT, 1.f); @@ -403,12 +403,12 @@ void LLFastTimerView::draw() LLLocalClipRect clip(LLRect(margin, y, LEGEND_WIDTH, margin)); S32 cur_line = 0; ft_display_idx.clear(); - std::map display_line; - for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimerUtil::NamedTimer::getRootNamedTimer()); + std::map display_line; + for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); it != timer_tree_iterator_t(); ++it) { - LLFastTimerUtil::NamedTimer* idp = (*it); + LLFastTimer::NamedTimer* idp = (*it); display_line[idp] = cur_line; ft_display_idx.push_back(idp); cur_line++; @@ -428,7 +428,7 @@ void LLFastTimerView::draw() S32 calls = 0; if (mHoverBarIndex > 0 && mHoverID) { - S32 hidx = LLFastTimerUtil::NamedTimer::HISTORY_NUM - mScrollIndex - mHoverBarIndex; + S32 hidx = LLFastTimer::NamedTimer::HISTORY_NUM - mScrollIndex - mHoverBarIndex; U64 ticks = idp->getHistoricalCount(hidx); ms = (F32)((F64)ticks * iclock_freq); calls = (S32)idp->getHistoricalCalls(hidx); @@ -466,7 +466,7 @@ void LLFastTimerView::draw() x += dx; BOOL is_child_of_hover_item = (idp == mHoverID); - LLFastTimerUtil::NamedTimer* next_parent = idp->getParent(); + LLFastTimer::NamedTimer* next_parent = idp->getParent(); while(!is_child_of_hover_item && next_parent) { is_child_of_hover_item = (mHoverID == next_parent); @@ -507,18 +507,18 @@ void LLFastTimerView::draw() barw = width - xleft - margin; // Draw the history bars - if (LLFastTimerUtil::getLastFrameIndex() >= 0) + if (LLFastTimer::getLastFrameIndex() >= 0) { LLLocalClipRect clip(LLRect(xleft, ytop, getRect().getWidth() - margin, margin)); U64 totalticks; - if (!LLFastTimerUtil::sPauseHistory) + if (!LLFastTimer::sPauseHistory) { - U64 ticks = LLFastTimerUtil::NamedTimer::getRootNamedTimer().getHistoricalCount(mScrollIndex); + U64 ticks = LLFastTimer::NamedTimer::getRootNamedTimer().getHistoricalCount(mScrollIndex); - if (LLFastTimerUtil::getCurFrameIndex() >= 10) + if (LLFastTimer::getCurFrameIndex() >= 10) { - U64 framec = LLFastTimerUtil::getCurFrameIndex(); + U64 framec = LLFastTimer::getCurFrameIndex(); U64 avg = (U64)mAvgCountTotal; mAvgCountTotal = (avg*framec + ticks) / (framec + 1); if (ticks > mMaxCountTotal) @@ -529,10 +529,10 @@ void LLFastTimerView::draw() if (ticks < mAvgCountTotal/100 || ticks > mAvgCountTotal*100) { - LLFastTimerUtil::sResetHistory = true; + LLFastTimer::sResetHistory = true; } - if (LLFastTimerUtil::getCurFrameIndex() < 10 || LLFastTimerUtil::sResetHistory) + if (LLFastTimer::getCurFrameIndex() < 10 || LLFastTimer::sResetHistory) { mAvgCountTotal = ticks; mMaxCountTotal = ticks; @@ -553,7 +553,7 @@ void LLFastTimerView::draw() totalticks = 0; for (S32 j=0; j totalticks) totalticks = ticks; @@ -643,7 +643,7 @@ void LLFastTimerView::draw() S32 tidx; if (j >= 0) { - tidx = LLFastTimerUtil::NamedTimer::HISTORY_NUM - j - 1 - mScrollIndex; + tidx = LLFastTimer::NamedTimer::HISTORY_NUM - j - 1 - mScrollIndex; } else { @@ -657,14 +657,14 @@ void LLFastTimerView::draw() std::vector deltax; xpos.push_back(xleft); - LLFastTimerUtil::NamedTimer* prev_id = NULL; + LLFastTimer::NamedTimer* prev_id = NULL; S32 i = 0; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimerUtil::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); it != end_timer_tree(); ++it, ++i) { - LLFastTimerUtil::NamedTimer* idp = (*it); + LLFastTimer::NamedTimer* idp = (*it); F32 frac = tidx == -1 ? (F32)idp->getCountAverage() / (F32)totalticks : (F32)idp->getHistoricalCount(tidx) / (F32)totalticks; @@ -691,7 +691,7 @@ void LLFastTimerView::draw() { U64 sublevelticks = 0; - for (LLFastTimerUtil::NamedTimer::child_const_iter it = prev_id->beginChildren(); + for (LLFastTimer::NamedTimer::child_const_iter it = prev_id->beginChildren(); it != prev_id->endChildren(); ++it) { @@ -733,7 +733,7 @@ void LLFastTimerView::draw() S32 scale_offset = 0; BOOL is_child_of_hover_item = (idp == mHoverID); - LLFastTimerUtil::NamedTimer* next_parent = idp->getParent(); + LLFastTimer::NamedTimer* next_parent = idp->getParent(); while(!is_child_of_hover_item && next_parent) { is_child_of_hover_item = (mHoverID == next_parent); @@ -797,10 +797,10 @@ void LLFastTimerView::draw() //highlight visible range { - S32 first_frame = LLFastTimerUtil::NamedTimer::HISTORY_NUM - mScrollIndex; + S32 first_frame = LLFastTimer::NamedTimer::HISTORY_NUM - mScrollIndex; S32 last_frame = first_frame - MAX_VISIBLE_HISTORY; - F32 frame_delta = ((F32) (graph_rect.getWidth()))/(LLFastTimerUtil::NamedTimer::HISTORY_NUM-1); + F32 frame_delta = ((F32) (graph_rect.getWidth()))/(LLFastTimer::NamedTimer::HISTORY_NUM-1); F32 right = (F32) graph_rect.mLeft + frame_delta*first_frame; F32 left = (F32) graph_rect.mLeft + frame_delta*last_frame; @@ -823,11 +823,11 @@ void LLFastTimerView::draw() } U64 cur_max = 0; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimerUtil::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); it != end_timer_tree(); ++it) { - LLFastTimerUtil::NamedTimer* idp = (*it); + LLFastTimer::NamedTimer* idp = (*it); //fatten highlighted timer if (mHoverID == idp) @@ -851,7 +851,7 @@ void LLFastTimerView::draw() gGL.color4f(col[0], col[1], col[2], alpha); gGL.begin(LLRender::LINE_STRIP); - for (U32 j = 0; j < LLFastTimerUtil::NamedTimer::HISTORY_NUM; j++) + for (U32 j = 0; j < LLFastTimer::NamedTimer::HISTORY_NUM; j++) { U64 ticks = idp->getHistoricalCount(j); @@ -871,7 +871,7 @@ void LLFastTimerView::draw() //normalize to highlighted timer cur_max = llmax(cur_max, ticks); } - F32 x = graph_rect.mLeft + ((F32) (graph_rect.getWidth()))/(LLFastTimerUtil::NamedTimer::HISTORY_NUM-1)*j; + F32 x = graph_rect.mLeft + ((F32) (graph_rect.getWidth()))/(LLFastTimer::NamedTimer::HISTORY_NUM-1)*j; F32 y = graph_rect.mBottom + (F32) graph_rect.getHeight()/max_ticks*ticks; gGL.vertex2f(x,y); } @@ -919,11 +919,11 @@ void LLFastTimerView::draw() { std::string legend_stat; bool first = true; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimerUtil::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); it != end_timer_tree(); ++it) { - LLFastTimerUtil::NamedTimer* idp = (*it); + LLFastTimer::NamedTimer* idp = (*it); if (!first) { @@ -941,11 +941,11 @@ void LLFastTimerView::draw() std::string timer_stat; first = true; - for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimerUtil::NamedTimer::getRootNamedTimer()); + for(timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); it != end_timer_tree(); ++it) { - LLFastTimerUtil::NamedTimer* idp = (*it); + LLFastTimer::NamedTimer* idp = (*it); if (!first) { @@ -984,10 +984,10 @@ void LLFastTimerView::draw() F64 LLFastTimerView::getTime(const std::string& name) { - const LLFastTimerUtil::NamedTimer* timerp = LLFastTimerUtil::getTimerByName(name); + const LLFastTimer::NamedTimer* timerp = LLFastTimer::getTimerByName(name); if (timerp) { - return (F64)timerp->getCountAverage() / (F64)LLFastTimerUtil::countsPerSecond(); + return (F64)timerp->getCountAverage() / (F64)LLFastTimer::countsPerSecond(); } return 0.0; } @@ -1179,13 +1179,13 @@ void LLFastTimerView::doAnalysisMetrics(std::string baseline, std::string target //static void LLFastTimerView::doAnalysis(std::string baseline, std::string target, std::string output) { - if(LLFastTimerUtil::sLog) + if(LLFastTimer::sLog) { doAnalysisDefault(baseline, target, output) ; return ; } - if(LLFastTimerUtil::sMetricLog) + if(LLFastTimer::sMetricLog) { doAnalysisMetrics(baseline, target, output) ; return ; diff --git a/indra/newview/llfasttimerview.h b/indra/newview/llfasttimerview.h index d03d83576e..f5c8f23818 100644 --- a/indra/newview/llfasttimerview.h +++ b/indra/newview/llfasttimerview.h @@ -61,7 +61,7 @@ public: virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); virtual void draw(); - LLFastTimerUtil::NamedTimer* getLegendID(S32 y); + LLFastTimer::NamedTimer* getLegendID(S32 y); F64 getTime(const std::string& name); private: @@ -85,8 +85,8 @@ private: U64 mMaxCountTotal; LLRect mBarRect; S32 mScrollIndex; - LLFastTimerUtil::NamedTimer* mHoverID; - LLFastTimerUtil::NamedTimer* mHoverTimer; + LLFastTimer::NamedTimer* mHoverID; + LLFastTimer::NamedTimer* mHoverTimer; LLRect mToolTipRect; S32 mHoverBarIndex; LLFrameTimer mHighlightTimer; diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index 769bc2e9e1..fc8790c172 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -261,7 +261,7 @@ void LLVolumeImplFlexible::onSetVolume(const LLVolumeParams &volume_params, cons // updated every time step. In the future, perhaps there could be an // optimization similar to what Havok does for objects that are stationary. //--------------------------------------------------------------------------------- -static LLFastTimerUtil::DeclareTimer FTM_FLEXIBLE_UPDATE("Update Flexies"); +static LLFastTimer::DeclareTimer FTM_FLEXIBLE_UPDATE("Update Flexies"); BOOL LLVolumeImplFlexible::doIdleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { if (mVO->mDrawable.isNull()) diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 26cf88a840..41f4d1a663 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -295,7 +295,7 @@ void LLFolderView::checkTreeResortForModelChanged() } } -static LLFastTimerUtil::DeclareTimer FTM_SORT("Sort Inventory"); +static LLFastTimer::DeclareTimer FTM_SORT("Sort Inventory"); void LLFolderView::setSortOrder(U32 order) { @@ -377,7 +377,7 @@ void LLFolderView::setOpenArrangeRecursively(BOOL openitem, ERecurseType recurse mIsOpen = TRUE; } -static LLFastTimerUtil::DeclareTimer FTM_ARRANGE("Arrange"); +static LLFastTimer::DeclareTimer FTM_ARRANGE("Arrange"); // This view grows and shinks to enclose all of its children items and folders. S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_generation ) @@ -477,7 +477,7 @@ const std::string LLFolderView::getFilterSubString(BOOL trim) return mFilter->getFilterSubString(trim); } -static LLFastTimerUtil::DeclareTimer FTM_FILTER("Filter Inventory"); +static LLFastTimer::DeclareTimer FTM_FILTER("Filter Inventory"); void LLFolderView::filter( LLInventoryFilter& filter ) { @@ -2056,8 +2056,8 @@ bool LLFolderView::doToSelected(LLInventoryModel* model, const LLSD& userdata) return true; } -static LLFastTimerUtil::DeclareTimer FTM_AUTO_SELECT("Open and Select"); -static LLFastTimerUtil::DeclareTimer FTM_INVENTORY("Inventory"); +static LLFastTimer::DeclareTimer FTM_AUTO_SELECT("Open and Select"); +static LLFastTimer::DeclareTimer FTM_INVENTORY("Inventory"); // Main idle routine void LLFolderView::doIdle() diff --git a/indra/newview/llhudmanager.cpp b/indra/newview/llhudmanager.cpp index 8251c2ad8d..bdb8dadfb4 100644 --- a/indra/newview/llhudmanager.cpp +++ b/indra/newview/llhudmanager.cpp @@ -62,7 +62,7 @@ LLHUDManager::~LLHUDManager() { } -static LLFastTimerUtil::DeclareTimer FTM_HUD_EFFECTS("Hud Effects"); +static LLFastTimer::DeclareTimer FTM_HUD_EFFECTS("Hud Effects"); void LLHUDManager::updateEffects() { diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index 4008719bd4..dc55aba0db 100644 --- a/indra/newview/llhudobject.cpp +++ b/indra/newview/llhudobject.cpp @@ -254,7 +254,7 @@ LLHUDEffect *LLHUDObject::addHUDEffect(const U8 type) return hud_objectp; } -static LLFastTimerUtil::DeclareTimer FTM_HUD_UPDATE("Update Hud"); +static LLFastTimer::DeclareTimer FTM_HUD_UPDATE("Update Hud"); // static void LLHUDObject::updateAll() diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index eb2dc630b0..498a29728c 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -258,7 +258,7 @@ LLInventoryFilter::EFolderShow LLInventoryPanel::getShowFolderState() void LLInventoryPanel::modelChanged(U32 mask) { - static LLFastTimerUtil::DeclareTimer FTM_REFRESH("Inventory Refresh"); + static LLFastTimer::DeclareTimer FTM_REFRESH("Inventory Refresh"); LLFastTimer t2(FTM_REFRESH); bool handled = false; diff --git a/indra/newview/llmetricperformancetester.cpp b/indra/newview/llmetricperformancetester.cpp index f3cdafa795..93288c98d7 100644 --- a/indra/newview/llmetricperformancetester.cpp +++ b/indra/newview/llmetricperformancetester.cpp @@ -131,8 +131,8 @@ void LLMetricPerformanceTester::preOutputTestResults(LLSD* sd) } void LLMetricPerformanceTester::postOutputTestResults(LLSD* sd) { - LLMutexLock lock(LLFastTimerUtil::sLogLock); - LLFastTimerUtil::sLogQueue.push((*sd)); + LLMutexLock lock(LLFastTimer::sLogLock); + LLFastTimer::sLogQueue.push((*sd)); } void LLMetricPerformanceTester::outputTestResults() diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index d33578ba1c..6ca6734598 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -49,8 +49,8 @@ #include "llvoavatar.h" #include "lltextureatlas.h" -static LLFastTimerUtil::DeclareTimer FTM_FRUSTUM_CULL("Frustum Culling"); -static LLFastTimerUtil::DeclareTimer FTM_CULL_REBOUND("Cull Rebound"); +static LLFastTimer::DeclareTimer FTM_FRUSTUM_CULL("Frustum Culling"); +static LLFastTimer::DeclareTimer FTM_CULL_REBOUND("Cull Rebound"); const F32 SG_OCCLUSION_FUDGE = 0.25f; #define SG_DISCARD_TOLERANCE 0.01f @@ -641,7 +641,7 @@ void LLSpatialGroup::rebuildMesh() } } -static LLFastTimerUtil::DeclareTimer FTM_REBUILD_VBO("VBO Rebuilt"); +static LLFastTimer::DeclareTimer FTM_REBUILD_VBO("VBO Rebuilt"); void LLSpatialPartition::rebuildGeom(LLSpatialGroup* group) { @@ -1508,7 +1508,7 @@ BOOL LLSpatialGroup::rebound() return TRUE; } -static LLFastTimerUtil::DeclareTimer FTM_OCCLUSION_READBACK("Readback Occlusion"); +static LLFastTimer::DeclareTimer FTM_OCCLUSION_READBACK("Readback Occlusion"); void LLSpatialGroup::checkOcclusion() { if (LLPipeline::sUseOcclusion > 1) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 2c456d7df0..99fa271b78 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2087,7 +2087,7 @@ bool idle_startup() LLAppViewer::instance()->handleLoginComplete(); // reset timers now that we are running "logged in" logic - LLFastTimerUtil::reset(); + LLFastTimer::reset(); LLAgentPicksInfo::getInstance()->requestNumberOfPicks(); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 352de5be7e..3dac0ee452 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -212,11 +212,11 @@ void display_stats() } } -static LLFastTimerUtil::DeclareTimer FTM_PICK("Picking"); -static LLFastTimerUtil::DeclareTimer FTM_RENDER("Render", true); -static LLFastTimerUtil::DeclareTimer FTM_UPDATE_SKY("Update Sky"); -static LLFastTimerUtil::DeclareTimer FTM_UPDATE_TEXTURES("Update Textures"); -static LLFastTimerUtil::DeclareTimer FTM_IMAGE_UPDATE("Update Images"); +static LLFastTimer::DeclareTimer FTM_PICK("Picking"); +static LLFastTimer::DeclareTimer FTM_RENDER("Render", true); +static LLFastTimer::DeclareTimer FTM_UPDATE_SKY("Update Sky"); +static LLFastTimer::DeclareTimer FTM_UPDATE_TEXTURES("Update Textures"); +static LLFastTimer::DeclareTimer FTM_IMAGE_UPDATE("Update Images"); // Paint the display! void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) @@ -1098,7 +1098,7 @@ BOOL setup_hud_matrices(const LLRect& screen_region) return TRUE; } -static LLFastTimerUtil::DeclareTimer FTM_SWAP("Swap"); +static LLFastTimer::DeclareTimer FTM_SWAP("Swap"); void render_ui(F32 zoom_factor, int subfield) { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ff0d4c511a..1bff04352c 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6841,7 +6841,7 @@ void handle_dump_avatar_local_textures(void*) void handle_dump_timers() { - LLFastTimerUtil::dumpCurTimes(); + LLFastTimer::dumpCurTimes(); } void handle_debug_avatar_textures(void*) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 594c910d1b..3362142807 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3485,7 +3485,7 @@ void process_terse_object_update_improved(LLMessageSystem *mesgsys, void **user_ gObjectList.processCompressedObjectUpdate(mesgsys, user_data, OUT_TERSE_IMPROVED); } -static LLFastTimerUtil::DeclareTimer FTM_PROCESS_OBJECTS("Process Objects"); +static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Objects"); void process_kill_object(LLMessageSystem *mesgsys, void **user_data) diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 4479b991c7..3c79045cc5 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -117,7 +117,7 @@ S32 LLViewerObject::sAxisArrowLength(50); BOOL LLViewerObject::sPulseEnabled(FALSE); BOOL LLViewerObject::sUseSharedDrawables(FALSE); // TRUE -static LLFastTimerUtil::DeclareTimer FTM_CREATE_OBJECT("Create Object"); +static LLFastTimer::DeclareTimer FTM_CREATE_OBJECT("Create Object"); // static LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 71c42f1649..96828ee1b6 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -278,7 +278,7 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, } } -static LLFastTimerUtil::DeclareTimer FTM_PROCESS_OBJECTS("Process Objects"); +static LLFastTimer::DeclareTimer FTM_PROCESS_OBJECTS("Process Objects"); void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, void **user_data, @@ -1357,7 +1357,7 @@ LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLVi } -static LLFastTimerUtil::DeclareTimer FTM_CREATE_OBJECT("Create Object"); +static LLFastTimer::DeclareTimer FTM_CREATE_OBJECT("Create Object"); LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRegion *regionp, const LLUUID &uuid, const U32 local_id, const LLHost &sender) diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 2454ccaa48..841a7ccc5e 100644 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -633,7 +633,7 @@ void LLViewerPartSim::shift(const LLVector3 &offset) } } -static LLFastTimerUtil::DeclareTimer FTM_SIMULATE_PARTICLES("Simulate Particles"); +static LLFastTimer::DeclareTimer FTM_SIMULATE_PARTICLES("Simulate Particles"); void LLViewerPartSim::updateSimulation() { diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 0997359de1..f825eaa8ab 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -305,7 +305,7 @@ void LLViewerTextureManager::init() LLViewerTexture::initClass() ; - if(LLFastTimerUtil::sMetricLog) + if(LLFastTimer::sMetricLog) { LLViewerTextureManager::sTesterp = new LLTexturePipelineTester() ; } diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index a5b2bfb781..8252b7df00 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -80,7 +80,7 @@ LLStat LLViewerTextureList::sRawMemStat(32, TRUE); LLStat LLViewerTextureList::sFormattedMemStat(32, TRUE); LLViewerTextureList gTextureList; -static LLFastTimerUtil::DeclareTimer FTM_PROCESS_IMAGES("Process Images"); +static LLFastTimer::DeclareTimer FTM_PROCESS_IMAGES("Process Images"); /////////////////////////////////////////////////////////////////////////////// @@ -570,7 +570,7 @@ void LLViewerTextureList::dirtyImage(LLViewerFetchedTexture *image) } //////////////////////////////////////////////////////////////////////////// -static LLFastTimerUtil::DeclareTimer FTM_IMAGE_MARK_DIRTY("Dirty Images"); +static LLFastTimer::DeclareTimer FTM_IMAGE_MARK_DIRTY("Dirty Images"); void LLViewerTextureList::updateImages(F32 max_time) { @@ -735,7 +735,7 @@ void LLViewerTextureList::updateImagesDecodePriorities() return type_from_host; } */ -static LLFastTimerUtil::DeclareTimer FTM_IMAGE_CREATE("Create Images"); +static LLFastTimer::DeclareTimer FTM_IMAGE_CREATE("Create Images"); F32 LLViewerTextureList::updateImagesCreateTextures(F32 max_time) { diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index d2827ee537..83cbc8a1f9 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2844,7 +2844,7 @@ void LLViewerWindow::updateKeyboardFocus() LLSideTray::getInstance()->highlightFocused(); } -static LLFastTimerUtil::DeclareTimer FTM_UPDATE_WORLD_VIEW("Update World View"); +static LLFastTimer::DeclareTimer FTM_UPDATE_WORLD_VIEW("Update World View"); void LLViewerWindow::updateWorldViewRect(bool use_full_window) { LLFastTimer ft(FTM_UPDATE_WORLD_VIEW); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 7e73bf4133..6e93bf1bf2 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2110,8 +2110,8 @@ S32 LLVOAvatar::setTETexture(const U8 te, const LLUUID& uuid) } } -static LLFastTimerUtil::DeclareTimer FTM_AVATAR_UPDATE("Update Avatar"); -static LLFastTimerUtil::DeclareTimer FTM_JOINT_UPDATE("Update Joints"); +static LLFastTimer::DeclareTimer FTM_AVATAR_UPDATE("Update Avatar"); +static LLFastTimer::DeclareTimer FTM_JOINT_UPDATE("Update Joints"); //------------------------------------------------------------------------ // idleUpdate() @@ -2304,7 +2304,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) }//if ( voiceEnabled ) } -static LLFastTimerUtil::DeclareTimer FTM_ATTACHMENT_UPDATE("Update Attachments"); +static LLFastTimer::DeclareTimer FTM_ATTACHMENT_UPDATE("Update Attachments"); void LLVOAvatar::idleUpdateMisc(bool detailed_update) { @@ -4675,7 +4675,7 @@ void LLVOAvatar::requestStopMotion( LLMotion* motion ) //----------------------------------------------------------------------------- // loadAvatar() //----------------------------------------------------------------------------- -static LLFastTimerUtil::DeclareTimer FTM_LOAD_AVATAR("Load Avatar"); +static LLFastTimer::DeclareTimer FTM_LOAD_AVATAR("Load Avatar"); BOOL LLVOAvatar::loadAvatar() { @@ -5263,7 +5263,7 @@ void LLVOAvatar::updateGL() //----------------------------------------------------------------------------- // updateGeometry() //----------------------------------------------------------------------------- -static LLFastTimerUtil::DeclareTimer FTM_UPDATE_AVATAR("Update Avatar"); +static LLFastTimer::DeclareTimer FTM_UPDATE_AVATAR("Update Avatar"); BOOL LLVOAvatar::updateGeometry(LLDrawable *drawable) { LLFastTimer ftm(FTM_UPDATE_AVATAR); diff --git a/indra/newview/llvoclouds.cpp b/indra/newview/llvoclouds.cpp index 5d01163e08..177cb16c50 100644 --- a/indra/newview/llvoclouds.cpp +++ b/indra/newview/llvoclouds.cpp @@ -115,7 +115,7 @@ LLDrawable* LLVOClouds::createDrawable(LLPipeline *pipeline) return mDrawable; } -static LLFastTimerUtil::DeclareTimer FTM_UPDATE_CLOUDS("Update Clouds"); +static LLFastTimer::DeclareTimer FTM_UPDATE_CLOUDS("Update Clouds"); BOOL LLVOClouds::updateGeometry(LLDrawable *drawable) { diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index 9b0be69a7e..e311f07912 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -382,7 +382,7 @@ LLDrawable* LLVOGrass::createDrawable(LLPipeline *pipeline) return mDrawable; } -static LLFastTimerUtil::DeclareTimer FTM_UPDATE_GRASS("Update Grass"); +static LLFastTimer::DeclareTimer FTM_UPDATE_GRASS("Update Grass"); BOOL LLVOGrass::updateGeometry(LLDrawable *drawable) { diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index ac6030ccae..139d2fbd88 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -139,7 +139,7 @@ LLVector3 LLVOPartGroup::getCameraPosition() const return gAgent.getCameraPositionAgent(); } -static LLFastTimerUtil::DeclareTimer FTM_UPDATE_PARTICLES("Update Particles"); +static LLFastTimer::DeclareTimer FTM_UPDATE_PARTICLES("Update Particles"); BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) { LLFastTimer ftm(FTM_UPDATE_PARTICLES); @@ -428,8 +428,8 @@ void LLParticlePartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_co } } -static LLFastTimerUtil::DeclareTimer FTM_REBUILD_GRASS_VB("Grass VB"); -static LLFastTimerUtil::DeclareTimer FTM_REBUILD_PARTICLE_VB("Particle VB"); +static LLFastTimer::DeclareTimer FTM_REBUILD_GRASS_VB("Grass VB"); +static LLFastTimer::DeclareTimer FTM_REBUILD_PARTICLE_VB("Particle VB"); void LLParticlePartition::getGeometry(LLSpatialGroup* group) { diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index a489142cf9..5ff8f0d267 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -1231,7 +1231,7 @@ void LLVOSky::createDummyVertexBuffer() } } -static LLFastTimerUtil::DeclareTimer FTM_RENDER_FAKE_VBO_UPDATE("Fake VBO Update"); +static LLFastTimer::DeclareTimer FTM_RENDER_FAKE_VBO_UPDATE("Fake VBO Update"); void LLVOSky::updateDummyVertexBuffer() { @@ -1257,7 +1257,7 @@ void LLVOSky::updateDummyVertexBuffer() //---------------------------------- //end of fake vertex buffer updating //---------------------------------- -static LLFastTimerUtil::DeclareTimer FTM_GEO_SKY("Sky Geometry"); +static LLFastTimer::DeclareTimer FTM_GEO_SKY("Sky Geometry"); BOOL LLVOSky::updateGeometry(LLDrawable *drawable) { diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp index 52ed8328b8..ef7b161003 100644 --- a/indra/newview/llvosurfacepatch.cpp +++ b/indra/newview/llvosurfacepatch.cpp @@ -176,7 +176,7 @@ LLDrawable *LLVOSurfacePatch::createDrawable(LLPipeline *pipeline) return mDrawable; } -static LLFastTimerUtil::DeclareTimer FTM_UPDATE_TERRAIN("Update Terrain"); +static LLFastTimer::DeclareTimer FTM_UPDATE_TERRAIN("Update Terrain"); void LLVOSurfacePatch::updateGL() { @@ -1035,7 +1035,7 @@ LLVertexBuffer* LLTerrainPartition::createVertexBuffer(U32 type_mask, U32 usage) return new LLVertexBufferTerrain(); } -static LLFastTimerUtil::DeclareTimer FTM_REBUILD_TERRAIN_VB("Terrain VB"); +static LLFastTimer::DeclareTimer FTM_REBUILD_TERRAIN_VB("Terrain VB"); void LLTerrainPartition::getGeometry(LLSpatialGroup* group) { LLFastTimer ftm(FTM_REBUILD_TERRAIN_VB); diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 98e12ad6ea..24f1c4bd24 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -500,7 +500,7 @@ LLDrawable* LLVOTree::createDrawable(LLPipeline *pipeline) const S32 LEAF_INDICES = 24; const S32 LEAF_VERTICES = 16; -static LLFastTimerUtil::DeclareTimer FTM_UPDATE_TREE("Update Tree"); +static LLFastTimer::DeclareTimer FTM_UPDATE_TREE("Update Tree"); BOOL LLVOTree::updateGeometry(LLDrawable *drawable) { diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 6973633581..55609621b3 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -86,8 +86,8 @@ S32 LLVOVolume::sNumLODChanges = 0; LLPointer LLVOVolume::sObjectMediaClient = NULL; LLPointer LLVOVolume::sObjectMediaNavigateClient = NULL; -static LLFastTimerUtil::DeclareTimer FTM_GEN_TRIANGLES("Generate Triangles"); -static LLFastTimerUtil::DeclareTimer FTM_GEN_VOLUME("Generate Volumes"); +static LLFastTimer::DeclareTimer FTM_GEN_TRIANGLES("Generate Triangles"); +static LLFastTimer::DeclareTimer FTM_GEN_VOLUME("Generate Volumes"); // Implementation class of LLMediaDataClientObject. See llmediadataclient.h class LLMediaDataClientObjectImpl : public LLMediaDataClientObject @@ -1339,8 +1339,8 @@ void LLVOVolume::updateRelativeXform() } } -static LLFastTimerUtil::DeclareTimer FTM_GEN_FLEX("Generate Flexies"); -static LLFastTimerUtil::DeclareTimer FTM_UPDATE_PRIMITIVES("Update Primitives"); +static LLFastTimer::DeclareTimer FTM_GEN_FLEX("Generate Flexies"); +static LLFastTimer::DeclareTimer FTM_UPDATE_PRIMITIVES("Update Primitives"); BOOL LLVOVolume::updateGeometry(LLDrawable *drawable) { @@ -3190,8 +3190,8 @@ void LLVolumeGeometryManager::getGeometry(LLSpatialGroup* group) } -static LLFastTimerUtil::DeclareTimer FTM_REBUILD_VOLUME_VB("Volume"); -static LLFastTimerUtil::DeclareTimer FTM_REBUILD_VBO("VBO Rebuilt"); +static LLFastTimer::DeclareTimer FTM_REBUILD_VOLUME_VB("Volume"); +static LLFastTimer::DeclareTimer FTM_REBUILD_VBO("VBO Rebuilt"); void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) { @@ -3423,7 +3423,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) mFaceList.clear(); } -static LLFastTimerUtil::DeclareTimer FTM_VOLUME_GEOM("Volume Geometry"); +static LLFastTimer::DeclareTimer FTM_VOLUME_GEOM("Volume Geometry"); void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) { llpushcallstacks ; diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp index 86cdde3f2e..a8c4625f6e 100644 --- a/indra/newview/llvowater.cpp +++ b/indra/newview/llvowater.cpp @@ -136,7 +136,7 @@ LLDrawable *LLVOWater::createDrawable(LLPipeline *pipeline) return mDrawable; } -static LLFastTimerUtil::DeclareTimer FTM_UPDATE_WATER("Update Water"); +static LLFastTimer::DeclareTimer FTM_UPDATE_WATER("Update Water"); BOOL LLVOWater::updateGeometry(LLDrawable *drawable) { diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index 77b07e0ccf..d3238f16a8 100644 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -307,7 +307,7 @@ void LLVOWLSky::restoreGL() gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_ALL, TRUE); } -static LLFastTimerUtil::DeclareTimer FTM_GEO_SKY("Sky Geometry"); +static LLFastTimer::DeclareTimer FTM_GEO_SKY("Sky Geometry"); BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable) { diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index 5d03596a44..8be8f494da 100644 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -261,7 +261,7 @@ void LLWaterParamManager::updateShaderUniforms(LLGLSLShader * shader) } } -static LLFastTimerUtil::DeclareTimer FTM_UPDATE_WLPARAM("Update Windlight Params"); +static LLFastTimer::DeclareTimer FTM_UPDATE_WLPARAM("Update Windlight Params"); void LLWaterParamManager::update(LLViewerCamera * cam) { diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index 9a0b2dfba8..7cac564619 100644 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -58,7 +58,7 @@ #include "curl/curl.h" LLWLParamManager * LLWLParamManager::sInstance = NULL; -static LLFastTimerUtil::DeclareTimer FTM_UPDATE_WLPARAM("Update Windlight Params"); +static LLFastTimer::DeclareTimer FTM_UPDATE_WLPARAM("Update Windlight Params"); LLWLParamManager::LLWLParamManager() : diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index f361767f68..4f4fc83819 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -140,34 +140,34 @@ BOOL gDebugPipeline = FALSE; LLPipeline gPipeline; const LLMatrix4* gGLLastMatrix = NULL; -LLFastTimerUtil::DeclareTimer FTM_RENDER_GEOMETRY("Geometry"); -LLFastTimerUtil::DeclareTimer FTM_RENDER_GRASS("Grass"); -LLFastTimerUtil::DeclareTimer FTM_RENDER_INVISIBLE("Invisible"); -LLFastTimerUtil::DeclareTimer FTM_RENDER_OCCLUSION("Occlusion"); -LLFastTimerUtil::DeclareTimer FTM_RENDER_SHINY("Shiny"); -LLFastTimerUtil::DeclareTimer FTM_RENDER_SIMPLE("Simple"); -LLFastTimerUtil::DeclareTimer FTM_RENDER_TERRAIN("Terrain"); -LLFastTimerUtil::DeclareTimer FTM_RENDER_TREES("Trees"); -LLFastTimerUtil::DeclareTimer FTM_RENDER_UI("UI"); -LLFastTimerUtil::DeclareTimer FTM_RENDER_WATER("Water"); -LLFastTimerUtil::DeclareTimer FTM_RENDER_WL_SKY("Windlight Sky"); -LLFastTimerUtil::DeclareTimer FTM_RENDER_ALPHA("Alpha Objects"); -LLFastTimerUtil::DeclareTimer FTM_RENDER_CHARACTERS("Avatars"); -LLFastTimerUtil::DeclareTimer FTM_RENDER_BUMP("Bump"); -LLFastTimerUtil::DeclareTimer FTM_RENDER_FULLBRIGHT("Fullbright"); -LLFastTimerUtil::DeclareTimer FTM_RENDER_GLOW("Glow"); -LLFastTimerUtil::DeclareTimer FTM_GEO_UPDATE("Geo Update"); -LLFastTimerUtil::DeclareTimer FTM_POOLRENDER("RenderPool"); -LLFastTimerUtil::DeclareTimer FTM_POOLS("Pools"); -LLFastTimerUtil::DeclareTimer FTM_RENDER_BLOOM_FBO("First FBO"); -LLFastTimerUtil::DeclareTimer FTM_STATESORT("Sort Draw State"); -LLFastTimerUtil::DeclareTimer FTM_PIPELINE("Pipeline"); -LLFastTimerUtil::DeclareTimer FTM_CLIENT_COPY("Client Copy"); -LLFastTimerUtil::DeclareTimer FTM_RENDER_DEFERRED("Deferred Shading"); - - -static LLFastTimerUtil::DeclareTimer FTM_STATESORT_DRAWABLE("Sort Drawables"); -static LLFastTimerUtil::DeclareTimer FTM_STATESORT_POSTSORT("Post Sort"); +LLFastTimer::DeclareTimer FTM_RENDER_GEOMETRY("Geometry"); +LLFastTimer::DeclareTimer FTM_RENDER_GRASS("Grass"); +LLFastTimer::DeclareTimer FTM_RENDER_INVISIBLE("Invisible"); +LLFastTimer::DeclareTimer FTM_RENDER_OCCLUSION("Occlusion"); +LLFastTimer::DeclareTimer FTM_RENDER_SHINY("Shiny"); +LLFastTimer::DeclareTimer FTM_RENDER_SIMPLE("Simple"); +LLFastTimer::DeclareTimer FTM_RENDER_TERRAIN("Terrain"); +LLFastTimer::DeclareTimer FTM_RENDER_TREES("Trees"); +LLFastTimer::DeclareTimer FTM_RENDER_UI("UI"); +LLFastTimer::DeclareTimer FTM_RENDER_WATER("Water"); +LLFastTimer::DeclareTimer FTM_RENDER_WL_SKY("Windlight Sky"); +LLFastTimer::DeclareTimer FTM_RENDER_ALPHA("Alpha Objects"); +LLFastTimer::DeclareTimer FTM_RENDER_CHARACTERS("Avatars"); +LLFastTimer::DeclareTimer FTM_RENDER_BUMP("Bump"); +LLFastTimer::DeclareTimer FTM_RENDER_FULLBRIGHT("Fullbright"); +LLFastTimer::DeclareTimer FTM_RENDER_GLOW("Glow"); +LLFastTimer::DeclareTimer FTM_GEO_UPDATE("Geo Update"); +LLFastTimer::DeclareTimer FTM_POOLRENDER("RenderPool"); +LLFastTimer::DeclareTimer FTM_POOLS("Pools"); +LLFastTimer::DeclareTimer FTM_RENDER_BLOOM_FBO("First FBO"); +LLFastTimer::DeclareTimer FTM_STATESORT("Sort Draw State"); +LLFastTimer::DeclareTimer FTM_PIPELINE("Pipeline"); +LLFastTimer::DeclareTimer FTM_CLIENT_COPY("Client Copy"); +LLFastTimer::DeclareTimer FTM_RENDER_DEFERRED("Deferred Shading"); + + +static LLFastTimer::DeclareTimer FTM_STATESORT_DRAWABLE("Sort Drawables"); +static LLFastTimer::DeclareTimer FTM_STATESORT_POSTSORT("Post Sort"); //---------------------------------------- std::string gPoolNames[] = @@ -508,7 +508,7 @@ void LLPipeline::destroyGL() } } -static LLFastTimerUtil::DeclareTimer FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture"); +static LLFastTimer::DeclareTimer FTM_RESIZE_SCREEN_TEXTURE("Resize Screen Texture"); void LLPipeline::resizeScreenTexture() { LLFastTimer ft(FTM_RESIZE_SCREEN_TEXTURE); @@ -1396,8 +1396,8 @@ void LLPipeline::updateMovedList(LLDrawable::drawable_vector_t& moved_list) } } -static LLFastTimerUtil::DeclareTimer FTM_OCTREE_BALANCE("Balance Octree"); -static LLFastTimerUtil::DeclareTimer FTM_UPDATE_MOVE("Update Move"); +static LLFastTimer::DeclareTimer FTM_OCTREE_BALANCE("Balance Octree"); +static LLFastTimer::DeclareTimer FTM_UPDATE_MOVE("Update Move"); void LLPipeline::updateMove() { @@ -1557,7 +1557,7 @@ BOOL LLPipeline::getVisibleExtents(LLCamera& camera, LLVector3& min, LLVector3& return res; } -static LLFastTimerUtil::DeclareTimer FTM_CULL("Object Culling"); +static LLFastTimer::DeclareTimer FTM_CULL("Object Culling"); void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_clip) { @@ -2188,7 +2188,7 @@ void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags f } } -static LLFastTimerUtil::DeclareTimer FTM_RESET_DRAWORDER("Reset Draw Order"); +static LLFastTimer::DeclareTimer FTM_RESET_DRAWORDER("Reset Draw Order"); void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result) { @@ -5519,7 +5519,7 @@ void LLPipeline::bindScreenToTexture() } -static LLFastTimerUtil::DeclareTimer FTM_RENDER_BLOOM("Bloom"); +static LLFastTimer::DeclareTimer FTM_RENDER_BLOOM("Bloom"); void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) { LLMemType mt_ru(LLMemType::MTYPE_PIPELINE_RENDER_BLOOM); @@ -6227,16 +6227,16 @@ void LLPipeline::bindDeferredShader(LLGLSLShader& shader, U32 light_index, LLRen } } -static LLFastTimerUtil::DeclareTimer FTM_GI_TRACE("Trace"); -static LLFastTimerUtil::DeclareTimer FTM_GI_GATHER("Gather"); -static LLFastTimerUtil::DeclareTimer FTM_SUN_SHADOW("Shadow Map"); -static LLFastTimerUtil::DeclareTimer FTM_SOFTEN_SHADOW("Shadow Soften"); -static LLFastTimerUtil::DeclareTimer FTM_EDGE_DETECTION("Find Edges"); -static LLFastTimerUtil::DeclareTimer FTM_LOCAL_LIGHTS("Local Lights"); -static LLFastTimerUtil::DeclareTimer FTM_ATMOSPHERICS("Atmospherics"); -static LLFastTimerUtil::DeclareTimer FTM_FULLSCREEN_LIGHTS("Fullscreen Lights"); -static LLFastTimerUtil::DeclareTimer FTM_PROJECTORS("Projectors"); -static LLFastTimerUtil::DeclareTimer FTM_POST("Post"); +static LLFastTimer::DeclareTimer FTM_GI_TRACE("Trace"); +static LLFastTimer::DeclareTimer FTM_GI_GATHER("Gather"); +static LLFastTimer::DeclareTimer FTM_SUN_SHADOW("Shadow Map"); +static LLFastTimer::DeclareTimer FTM_SOFTEN_SHADOW("Shadow Soften"); +static LLFastTimer::DeclareTimer FTM_EDGE_DETECTION("Find Edges"); +static LLFastTimer::DeclareTimer FTM_LOCAL_LIGHTS("Local Lights"); +static LLFastTimer::DeclareTimer FTM_ATMOSPHERICS("Atmospherics"); +static LLFastTimer::DeclareTimer FTM_FULLSCREEN_LIGHTS("Fullscreen Lights"); +static LLFastTimer::DeclareTimer FTM_PROJECTORS("Projectors"); +static LLFastTimer::DeclareTimer FTM_POST("Post"); void LLPipeline::renderDeferredLighting() @@ -7433,9 +7433,9 @@ glh::matrix4f scale_translate_to_fit(const LLVector3 min, const LLVector3 max) return ret; } -static LLFastTimerUtil::DeclareTimer FTM_SHADOW_RENDER("Render Shadows"); -static LLFastTimerUtil::DeclareTimer FTM_SHADOW_ALPHA("Alpha Shadow"); -static LLFastTimerUtil::DeclareTimer FTM_SHADOW_SIMPLE("Simple Shadow"); +static LLFastTimer::DeclareTimer FTM_SHADOW_RENDER("Render Shadows"); +static LLFastTimer::DeclareTimer FTM_SHADOW_ALPHA("Alpha Shadow"); +static LLFastTimer::DeclareTimer FTM_SHADOW_SIMPLE("Simple Shadow"); void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& shadow_cam, LLCullResult &result, BOOL use_shader, BOOL use_occlusion) { diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 13b6270bd6..67004a5f2d 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -78,25 +78,25 @@ glh::matrix4f gl_ortho(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, glh::matrix4f gl_perspective(GLfloat fovy, GLfloat aspect, GLfloat zNear, GLfloat zFar); glh::matrix4f gl_lookat(LLVector3 eye, LLVector3 center, LLVector3 up); -extern LLFastTimerUtil::DeclareTimer FTM_RENDER_GEOMETRY; -extern LLFastTimerUtil::DeclareTimer FTM_RENDER_GRASS; -extern LLFastTimerUtil::DeclareTimer FTM_RENDER_INVISIBLE; -extern LLFastTimerUtil::DeclareTimer FTM_RENDER_OCCLUSION; -extern LLFastTimerUtil::DeclareTimer FTM_RENDER_SHINY; -extern LLFastTimerUtil::DeclareTimer FTM_RENDER_SIMPLE; -extern LLFastTimerUtil::DeclareTimer FTM_RENDER_TERRAIN; -extern LLFastTimerUtil::DeclareTimer FTM_RENDER_TREES; -extern LLFastTimerUtil::DeclareTimer FTM_RENDER_UI; -extern LLFastTimerUtil::DeclareTimer FTM_RENDER_WATER; -extern LLFastTimerUtil::DeclareTimer FTM_RENDER_WL_SKY; -extern LLFastTimerUtil::DeclareTimer FTM_RENDER_ALPHA; -extern LLFastTimerUtil::DeclareTimer FTM_RENDER_CHARACTERS; -extern LLFastTimerUtil::DeclareTimer FTM_RENDER_BUMP; -extern LLFastTimerUtil::DeclareTimer FTM_RENDER_FULLBRIGHT; -extern LLFastTimerUtil::DeclareTimer FTM_RENDER_GLOW; -extern LLFastTimerUtil::DeclareTimer FTM_STATESORT; -extern LLFastTimerUtil::DeclareTimer FTM_PIPELINE; -extern LLFastTimerUtil::DeclareTimer FTM_CLIENT_COPY; +extern LLFastTimer::DeclareTimer FTM_RENDER_GEOMETRY; +extern LLFastTimer::DeclareTimer FTM_RENDER_GRASS; +extern LLFastTimer::DeclareTimer FTM_RENDER_INVISIBLE; +extern LLFastTimer::DeclareTimer FTM_RENDER_OCCLUSION; +extern LLFastTimer::DeclareTimer FTM_RENDER_SHINY; +extern LLFastTimer::DeclareTimer FTM_RENDER_SIMPLE; +extern LLFastTimer::DeclareTimer FTM_RENDER_TERRAIN; +extern LLFastTimer::DeclareTimer FTM_RENDER_TREES; +extern LLFastTimer::DeclareTimer FTM_RENDER_UI; +extern LLFastTimer::DeclareTimer FTM_RENDER_WATER; +extern LLFastTimer::DeclareTimer FTM_RENDER_WL_SKY; +extern LLFastTimer::DeclareTimer FTM_RENDER_ALPHA; +extern LLFastTimer::DeclareTimer FTM_RENDER_CHARACTERS; +extern LLFastTimer::DeclareTimer FTM_RENDER_BUMP; +extern LLFastTimer::DeclareTimer FTM_RENDER_FULLBRIGHT; +extern LLFastTimer::DeclareTimer FTM_RENDER_GLOW; +extern LLFastTimer::DeclareTimer FTM_STATESORT; +extern LLFastTimer::DeclareTimer FTM_PIPELINE; +extern LLFastTimer::DeclareTimer FTM_CLIENT_COPY; class LLPipeline -- cgit v1.2.3 From 3e5f5a205034cde29ef80a9230d8cd4867e6dec5 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 11 Jan 2010 14:41:37 -0800 Subject: EXT-3444 Volume control slider appears in an odd location reviewed by Leyla --- indra/newview/CMakeLists.txt | 3 +- indra/newview/llpanelvolumepulldown.cpp | 154 +++++++++++++++++++++ indra/newview/llpanelvolumepulldown.h | 64 +++++++++ indra/newview/llstatusbar.cpp | 19 ++- indra/newview/llstatusbar.h | 2 +- indra/newview/llviewerfloaterreg.cpp | 2 - .../skins/default/xui/en/panel_status_bar.xml | 1 - .../skins/default/xui/en/panel_volume_pulldown.xml | 55 ++++++++ 8 files changed, 293 insertions(+), 7 deletions(-) create mode 100644 indra/newview/llpanelvolumepulldown.cpp create mode 100644 indra/newview/llpanelvolumepulldown.h create mode 100644 indra/newview/skins/default/xui/en/panel_volume_pulldown.xml (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 8918fc3018..cf5032643b 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -214,7 +214,6 @@ set(viewer_SOURCE_FILES llfloaterurldisplay.cpp llfloaterurlentry.cpp llfloatervoicedevicesettings.cpp - llfloatervolumepulldown.cpp llfloaterwater.cpp llfloaterwhitelistentry.cpp llfloaterwindlight.cpp @@ -349,6 +348,7 @@ set(viewer_SOURCE_FILES llpanelshower.cpp llpanelteleporthistory.cpp llpanelvolume.cpp + llpanelvolumepulldown.cpp llparcelselection.cpp llparticipantlist.cpp llpatchvertexarray.cpp @@ -852,6 +852,7 @@ set(viewer_HEADER_FILES llpanelshower.h llpanelteleporthistory.h llpanelvolume.h + llpanelvolumepulldown.h llparcelselection.h llparticipantlist.h llpatchvertexarray.h diff --git a/indra/newview/llpanelvolumepulldown.cpp b/indra/newview/llpanelvolumepulldown.cpp new file mode 100644 index 0000000000..74e37efe4e --- /dev/null +++ b/indra/newview/llpanelvolumepulldown.cpp @@ -0,0 +1,154 @@ +/** + * @file llpanelvolumepulldown.cpp + * @author Tofu Linden + * @brief A floater showing the master volume pull-down + * + * $LicenseInfo:firstyear=2008&license=viewergpl$ + * + * Copyright (c) 2008-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llpanelvolumepulldown.h" + +// Viewer libs +#include "llviewercontrol.h" +#include "llstatusbar.h" + +// Linden libs +#include "llbutton.h" +#include "lltabcontainer.h" +#include "llfloaterreg.h" +#include "llfloaterpreference.h" +#include "llslider.h" + +/* static */ const F32 LLPanelVolumePulldown::sAutoCloseFadeStartTimeSec = 4.0f; +/* static */ const F32 LLPanelVolumePulldown::sAutoCloseTotalTimeSec = 5.0f; + +///---------------------------------------------------------------------------- +/// Class LLPanelVolumePulldown +///---------------------------------------------------------------------------- + +// Default constructor +LLPanelVolumePulldown::LLPanelVolumePulldown() +{ + mCommitCallbackRegistrar.add("Vol.setControlFalse", boost::bind(&LLPanelVolumePulldown::setControlFalse, this, _2)); + mCommitCallbackRegistrar.add("Vol.GoAudioPrefs", boost::bind(&LLPanelVolumePulldown::onAdvancedButtonClick, this, _2)); + LLUICtrlFactory::instance().buildPanel(this, "panel_volume_pulldown.xml"); +} + +BOOL LLPanelVolumePulldown::postBuild() +{ + // set the initial volume-slider's position to reflect reality + LLSlider* volslider = getChild( "mastervolume" ); + volslider->setValue(gSavedSettings.getF32("AudioLevelMaster")); + + return LLPanel::postBuild(); +} + +/*virtual*/ +void LLPanelVolumePulldown::onMouseEnter(S32 x, S32 y, MASK mask) +{ + mHoverTimer.stop(); + LLPanel::onMouseEnter(x,y,mask); +} + + +/*virtual*/ +void LLPanelVolumePulldown::onMouseLeave(S32 x, S32 y, MASK mask) +{ + mHoverTimer.start(); + LLPanel::onMouseLeave(x,y,mask); +} + +/*virtual*/ +void LLPanelVolumePulldown::handleVisibilityChange ( BOOL new_visibility ) +{ + if (new_visibility) + { + mHoverTimer.start(); // timer will be stopped when mouse hovers over panel + gFocusMgr.setTopCtrl(this); + } + else + { + mHoverTimer.stop(); + gFocusMgr.setTopCtrl(NULL); + } +} + +/*virtual*/ +void LLPanelVolumePulldown::onTopLost() +{ + setVisible(FALSE); +} + +void LLPanelVolumePulldown::onAdvancedButtonClick(const LLSD& user_data) +{ + // close the global volume minicontrol, we're bringing up the big one + setVisible(FALSE); + + // bring up the prefs floater + LLFloaterPreference* prefsfloater = dynamic_cast + (LLFloaterReg::showInstance("preferences")); + if (prefsfloater) + { + // grab the 'audio' panel from the preferences floater and + // bring it the front! + LLTabContainer* tabcontainer = prefsfloater->getChild("pref core"); + LLPanel* audiopanel = prefsfloater->getChild("audio"); + if (tabcontainer && audiopanel) + { + tabcontainer->selectTabPanel(audiopanel); + } + } +} + +void LLPanelVolumePulldown::setControlFalse(const LLSD& user_data) +{ + std::string control_name = user_data.asString(); + LLControlVariable* control = findControl(control_name); + + if (control) + control->set(LLSD(FALSE)); +} + +//virtual +void LLPanelVolumePulldown::draw() +{ + F32 alpha = mHoverTimer.getStarted() + ? clamp_rescale(mHoverTimer.getElapsedTimeF32(), sAutoCloseFadeStartTimeSec, sAutoCloseTotalTimeSec, 1.f, 0.f) + : 1.0f; + LLViewDrawContext context(alpha); + + LLPanel::draw(); + + if (alpha == 0.f) + { + setVisible(FALSE); + } +} + diff --git a/indra/newview/llpanelvolumepulldown.h b/indra/newview/llpanelvolumepulldown.h new file mode 100644 index 0000000000..9f20caa1a8 --- /dev/null +++ b/indra/newview/llpanelvolumepulldown.h @@ -0,0 +1,64 @@ +/** + * @file llpanelvolumepulldown.h + * @author Tofu Linden + * @brief A panel showing the master volume pull-down + * + * $LicenseInfo:firstyear=2008&license=viewergpl$ + * + * Copyright (c) 2008-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLPANELVOLUMEPULLDOWN_H +#define LL_LLPANELVOLUMEPULLDOWN_H + +#include "linden_common.h" + +#include "llpanel.h" + +class LLFrameTimer; + +class LLPanelVolumePulldown : public LLPanel +{ + public: + LLPanelVolumePulldown(); + /*virtual*/ void draw(); + /*virtual*/ void onMouseEnter(S32 x, S32 y, MASK mask); + /*virtual*/ void onMouseLeave(S32 x, S32 y, MASK mask); + /*virtual*/ void handleVisibilityChange ( BOOL new_visibility ); + /*virtual*/ void onTopLost(); + /*virtual*/ BOOL postBuild(); + + private: + void setControlFalse(const LLSD& user_data); + void onAdvancedButtonClick(const LLSD& user_data); + + LLFrameTimer mHoverTimer; + static const F32 sAutoCloseFadeStartTimeSec; + static const F32 sAutoCloseTotalTimeSec; +}; + + +#endif // LL_LLPANELVOLUMEPULLDOWN_H diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 5ce3bbb9f6..b3b2b9ee5d 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -42,7 +42,7 @@ #include "llfloaterbuycurrency.h" #include "llfloaterchat.h" #include "llfloaterlagmeter.h" -#include "llfloatervolumepulldown.h" +#include "llpanelvolumepulldown.h" #include "llfloaterregioninfo.h" #include "llfloaterscriptdebug.h" #include "llhudicon.h" @@ -204,6 +204,21 @@ LLStatusBar::LLStatusBar(const LLRect& rect) addChild(mSGPacketLoss); childSetActionTextbox("stat_btn", onClickStatGraph); + + mPanelVolumePulldown = new LLPanelVolumePulldown(); + addChild(mPanelVolumePulldown); + + LLRect volume_pulldown_rect = mPanelVolumePulldown->getRect(); + LLButton* volbtn = getChild( "volume_btn" ); + volume_pulldown_rect.setLeftTopAndSize(volbtn->getRect().mLeft - + (volume_pulldown_rect.getWidth() - volbtn->getRect().getWidth())/2, + volbtn->calcScreenRect().mBottom, + volume_pulldown_rect.getWidth(), + volume_pulldown_rect.getHeight()); + + mPanelVolumePulldown->setShape(volume_pulldown_rect); + mPanelVolumePulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); + mPanelVolumePulldown->setVisible(FALSE); } LLStatusBar::~LLStatusBar() @@ -501,7 +516,7 @@ static void onClickScriptDebug(void*) void LLStatusBar::onMouseEnterVolume(LLUICtrl* ctrl) { // show the master volume pull-down - LLFloaterReg::showInstance("volume_pulldown"); + gStatusBar->mPanelVolumePulldown->setVisible(TRUE); } static void onClickVolume(void* data) diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index f77cc1acb8..0e98da0fe4 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -112,7 +112,7 @@ private: S32 mSquareMetersCommitted; LLFrameTimer* mBalanceTimer; LLFrameTimer* mHealthTimer; - + LLPanelVolumePulldown* mPanelVolumePulldown; static std::vector sDays; static std::vector sMonths; static const U32 MAX_DATE_STRING_LENGTH; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 23bdbc7381..f8d1f34f9d 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -106,7 +106,6 @@ #include "llfloateruipreview.h" #include "llfloaterurldisplay.h" #include "llfloatervoicedevicesettings.h" -#include "llfloatervolumepulldown.h" #include "llfloaterwater.h" #include "llfloaterwhitelistentry.h" #include "llfloaterwindlight.h" @@ -256,7 +255,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("upload_image", "floater_image_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); - LLFloaterReg::add("volume_pulldown", "floater_volume_pulldown.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("voice_controls", "floater_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index 00f54feabd..5c9c9b5611 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -84,7 +84,6 @@ tool_tip="Global Volume Control" width="16" /> + + + + + + + + -- cgit v1.2.3 From 2aaa7971945823f53f0a01028036c37361bcfa17 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 11 Jan 2010 15:36:02 -0800 Subject: ext-4050 - nearby chat title bar missing background art --- indra/newview/skins/default/xui/en/floater_nearby_chat.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml index 920f0c909a..ae686d9ab7 100644 --- a/indra/newview/skins/default/xui/en/floater_nearby_chat.xml +++ b/indra/newview/skins/default/xui/en/floater_nearby_chat.xml @@ -4,8 +4,8 @@ border_drop_shadow_visible="false" drop_shadow_visible="false" border="false" - bg_opaque_image="Inspector_Background" - bg_alpha_image="Toast_Background" + bg_opaque_image="Window_Foreground" + bg_alpha_image="Window_Background" bg_alpha_color="0 0 0 0" legacy_header_height="18" can_minimize="true" -- cgit v1.2.3 From b98a4756567aedbc771f72d4a4a32b7a59a5c33e Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Mon, 11 Jan 2010 15:58:17 -0800 Subject: EXT-3629 About Land > Covenant contains incorrect information reviewed by Richard --- indra/newview/llfloaterland.cpp | 7 +------ indra/newview/llfloaterland.h | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 598a13de15..42c961a956 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -276,6 +276,7 @@ void LLFloaterLand::refresh() mPanelAudio->refresh(); mPanelMedia->refresh(); mPanelAccess->refresh(); + mPanelCovenant->refresh(); } @@ -2795,12 +2796,6 @@ LLPanelLandCovenant::~LLPanelLandCovenant() { } -BOOL LLPanelLandCovenant::postBuild() -{ - refresh(); - return TRUE; -} - // virtual void LLPanelLandCovenant::refresh() { diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h index d7d02ba1a3..a4785e8f5b 100644 --- a/indra/newview/llfloaterland.h +++ b/indra/newview/llfloaterland.h @@ -391,7 +391,6 @@ class LLPanelLandCovenant public: LLPanelLandCovenant(LLSafeHandle& parcelp); virtual ~LLPanelLandCovenant(); - virtual BOOL postBuild(); void refresh(); static void updateCovenantText(const std::string& string); static void updateEstateName(const std::string& name); -- cgit v1.2.3 From c1f4dc33c3c1a173cab1083af3f0a60767d09933 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Mon, 11 Jan 2010 15:59:53 -0800 Subject: EXT-2373 Viewer crashes if open Region/Estate floater after logging out reviewed by Richard --- indra/newview/llfloaterregioninfo.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index c4b87c1b2d..0402ba20e2 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -406,6 +406,11 @@ LLPanelEstateCovenant* LLFloaterRegionInfo::getPanelCovenant() void LLFloaterRegionInfo::refreshFromRegion(LLViewerRegion* region) { + if (!region) + { + return; + } + // call refresh from region on all panels std::for_each( mInfoPanels.begin(), -- cgit v1.2.3 From 8440d99e4498882dfc61459a91eba746ad717000 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Mon, 11 Jan 2010 16:02:57 -0800 Subject: EXT-4077 Clicking motd link opens two web browser windows Fixed click handling weirdness. On mouse up, mTopCtrl was being passed the mouse click, and then again the mRootView regardless of whether the first handled it. Also if mRootView didn't handle a mouse up, it was traversed again to handle the mouse up. reviewed by Richard --- indra/newview/llviewerwindow.cpp | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 83cbc8a1f9..ddaf4a221c 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -604,7 +604,6 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK { const char* buttonname = ""; const char* buttonstatestr = ""; - BOOL handled = FALSE; S32 x = pos.mX; S32 y = pos.mY; x = llround((F32)x / mDisplayScale.mV[VX]); @@ -699,7 +698,10 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK } else { - handled = top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleMouseUp(local_x, local_y, mask); + if (top_ctrl->pointInView(local_x, local_y) && top_ctrl->handleMouseUp(local_x, local_y, mask)) + { + return TRUE; + } } } @@ -717,34 +719,12 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK llinfos << buttonname << " Mouse " << buttonstatestr << " not handled by view" << llendl; } - if (down) + // Do not allow tool manager to handle mouseclicks if we have disconnected + if(!gDisconnected && LLToolMgr::getInstance()->getCurrentTool()->handleAnyMouseClick( x, y, mask, clicktype, down ) ) { - if (gDisconnected) - { - return FALSE; - } - - if(LLToolMgr::getInstance()->getCurrentTool()->handleAnyMouseClick( x, y, mask, clicktype, down ) ) - { - return TRUE; - } + return TRUE; } - else - { - if( !handled ) - { - handled = mRootView->handleAnyMouseClick(x, y, mask, clicktype, down); - } - if( !handled ) - { - LLTool *tool = LLToolMgr::getInstance()->getCurrentTool(); - if (tool) - { - handled = tool->handleAnyMouseClick(x, y, mask, clicktype, down); - } - } - } // If we got this far on a down-click, it wasn't handled. // Up-clicks, though, are always handled as far as the OS is concerned. -- cgit v1.2.3 From b446f673ffa16ec3055d6f76c003d6ad6e439822 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 11 Jan 2010 16:28:09 -0800 Subject: EXT-4066 - zooming while holding a hud in edit mode does not scale properly EXT-4040 - Hud starts automoving when clicked reviewed by Mani --- indra/newview/llviewerdisplay.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 3dac0ee452..4d559e2ca7 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1011,7 +1011,7 @@ void render_hud_attachments() LLRect get_whole_screen_region() { - LLRect whole_screen = gViewerWindow->getWindowRectScaled(); + LLRect whole_screen = gViewerWindow->getWorldViewRectScaled(); // apply camera zoom transform (for high res screenshots) F32 zoom_factor = LLViewerCamera::getInstance()->getZoomFactor(); @@ -1019,13 +1019,13 @@ LLRect get_whole_screen_region() if (zoom_factor > 1.f) { S32 num_horizontal_tiles = llceil(zoom_factor); - S32 tile_width = llround((F32)gViewerWindow->getWindowWidthScaled() / zoom_factor); - S32 tile_height = llround((F32)gViewerWindow->getWindowHeightScaled() / zoom_factor); + S32 tile_width = llround((F32)gViewerWindow->getWorldViewWidthScaled() / zoom_factor); + S32 tile_height = llround((F32)gViewerWindow->getWorldViewHeightScaled() / zoom_factor); int tile_y = sub_region / num_horizontal_tiles; int tile_x = sub_region - (tile_y * num_horizontal_tiles); glh::matrix4f mat; - whole_screen.setLeftTopAndSize(tile_x * tile_width, gViewerWindow->getWindowHeightScaled() - (tile_y * tile_height), tile_width, tile_height); + whole_screen.setLeftTopAndSize(tile_x * tile_width, gViewerWindow->getWorldViewHeightScaled() - (tile_y * tile_height), tile_width, tile_height); } return whole_screen; } @@ -1045,12 +1045,12 @@ bool get_hud_matrices(const LLRect& screen_region, glh::matrix4f &proj, glh::mat F32 aspect_ratio = LLViewerCamera::getInstance()->getAspect(); glh::matrix4f mat; - F32 scale_x = (F32)gViewerWindow->getWindowWidthScaled() / (F32)screen_region.getWidth(); - F32 scale_y = (F32)gViewerWindow->getWindowHeightScaled() / (F32)screen_region.getHeight(); + F32 scale_x = (F32)gViewerWindow->getWorldViewWidthScaled() / (F32)screen_region.getWidth(); + F32 scale_y = (F32)gViewerWindow->getWorldViewHeightScaled() / (F32)screen_region.getHeight(); mat.set_scale(glh::vec3f(scale_x, scale_y, 1.f)); mat.set_translate( - glh::vec3f(clamp_rescale((F32)screen_region.getCenterX(), 0.f, (F32)gViewerWindow->getWindowWidthScaled(), 0.5f * scale_x * aspect_ratio, -0.5f * scale_x * aspect_ratio), - clamp_rescale((F32)screen_region.getCenterY(), 0.f, (F32)gViewerWindow->getWindowHeightScaled(), 0.5f * scale_y, -0.5f * scale_y), + glh::vec3f(clamp_rescale((F32)screen_region.getCenterX(), 0.f, (F32)gViewerWindow->getWorldViewWidthScaled(), 0.5f * scale_x * aspect_ratio, -0.5f * scale_x * aspect_ratio), + clamp_rescale((F32)screen_region.getCenterY(), 0.f, (F32)gViewerWindow->getWorldViewHeightScaled(), 0.5f * scale_y, -0.5f * scale_y), 0.f)); proj *= mat; @@ -1300,8 +1300,8 @@ void render_ui_2d() if (gAgent.getAvatarObject() && gAgent.mHUDCurZoom < 0.98f) { glPushMatrix(); - S32 half_width = (gViewerWindow->getWindowWidthScaled() / 2); - S32 half_height = (gViewerWindow->getWindowHeightScaled() / 2); + S32 half_width = (gViewerWindow->getWorldViewWidthScaled() / 2); + S32 half_height = (gViewerWindow->getWorldViewHeightScaled() / 2); glScalef(LLUI::sGLScaleFactor.mV[0], LLUI::sGLScaleFactor.mV[1], 1.f); glTranslatef((F32)half_width, (F32)half_height, 0.f); F32 zoom = gAgent.mHUDCurZoom; -- cgit v1.2.3 From a94b6b26e9681775b4ba247fba4950e0ffd990c0 Mon Sep 17 00:00:00 2001 From: Erica Date: Mon, 11 Jan 2010 17:19:41 -0800 Subject: Removing old art assets --- indra/newview/skins/default/textures/textures.xml | 8 +---- indra/newview/skins/default/xui/en/menu_viewer.xml | 36 +--------------------- .../skins/default/xui/en/panel_status_bar.xml | 1 + 3 files changed, 3 insertions(+), 42 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index dab11149b9..83121e73c8 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -224,7 +224,7 @@ with the same filename but different name scale.left="4" scale.top="28" scale.right="60" scale.bottom="4" /> - + @@ -676,8 +676,6 @@ with the same filename but different name - - @@ -715,10 +713,6 @@ with the same filename but different name - - - - diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index fa7e3e86a3..45100eb1ff 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -198,40 +198,6 @@ function="Floater.Toggle" parameter="nearby_media" /> - - - - - - - - - diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index 00f54feabd..bbde47d2e1 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -42,6 +42,7 @@