summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authormaxim@mnikolenko <maxim@mnikolenko>2013-01-31 19:25:42 +0200
committermaxim@mnikolenko <maxim@mnikolenko>2013-01-31 19:25:42 +0200
commit2ec0d24e4a0beac5afba992b37f97c30d972342b (patch)
tree55842c2c5238b75a70eb99c3356fe99196530dc7 /indra/newview/llviewerwindow.cpp
parent8714b610149a5ae7b6f248023722f237c9336472 (diff)
parent22835e1ddb39341df26681dde8d22c673cc3940b (diff)
Merge
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rwxr-xr-xindra/newview/llviewerwindow.cpp43
1 files changed, 22 insertions, 21 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 36ddf26c82..e6e93d81bc 100755
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -80,6 +80,7 @@
#include "llmediaentry.h"
#include "llurldispatcher.h"
#include "raytrace.h"
+#include "llstat.h"
// newview includes
#include "llagent.h"
@@ -337,27 +338,24 @@ public:
if (gSavedSettings.getBOOL("DebugShowTime"))
{
- const U32 y_inc2 = 15;
- for (std::map<S32,LLFrameTimer>::reverse_iterator iter = gDebugTimers.rbegin();
- iter != gDebugTimers.rend(); ++iter)
{
- S32 idx = iter->first;
- LLFrameTimer& timer = iter->second;
+ const U32 y_inc2 = 15;
+ LLFrameTimer& timer = gTextureTimer;
F32 time = timer.getElapsedTimeF32();
S32 hours = (S32)(time / (60*60));
S32 mins = (S32)((time - hours*(60*60)) / 60);
S32 secs = (S32)((time - hours*(60*60) - mins*60));
- std::string label = gDebugTimerLabel[idx];
- if (label.empty()) label = llformat("Debug: %d", idx);
- addText(xpos, ypos, llformat(" %s: %d:%02d:%02d", label.c_str(), hours,mins,secs)); ypos += y_inc2;
+ addText(xpos, ypos, llformat("Texture: %d:%02d:%02d", hours,mins,secs)); ypos += y_inc2;
}
+ {
F32 time = gFrameTimeSeconds;
S32 hours = (S32)(time / (60*60));
S32 mins = (S32)((time - hours*(60*60)) / 60);
S32 secs = (S32)((time - hours*(60*60) - mins*60));
addText(xpos, ypos, llformat("Time: %d:%02d:%02d", hours,mins,secs)); ypos += y_inc;
}
+ }
#if LL_WINDOWS
if (gSavedSettings.getBOOL("DebugShowMemory"))
@@ -621,7 +619,7 @@ public:
addText(xpos, ypos, llformat("%d/%d Mesh HTTP Requests/Retries", LLMeshRepository::sHTTPRequestCount,
LLMeshRepository::sHTTPRetryCount));
ypos += y_inc;
-
+
addText(xpos, ypos, llformat("%d/%d Mesh LOD Pending/Processing", LLMeshRepository::sLODPending, LLMeshRepository::sLODProcessing));
ypos += y_inc;
@@ -1548,7 +1546,8 @@ LLViewerWindow::LLViewerWindow(const Params& p)
mResDirty(false),
mStatesDirty(false),
mCurrResolutionIndex(0),
- mProgressView(NULL)
+ mProgressView(NULL),
+ mMouseVelocityStat(new LLStat("Mouse Velocity"))
{
// gKeyboard is still NULL, so it doesn't do LLWindowListener any good to
// pass its value right now. Instead, pass it a nullary function that
@@ -1938,7 +1937,7 @@ void LLViewerWindow::initWorldUI()
panel_ssf_container->addChild(panel_stand_stop_flying);
panel_ssf_container->setVisible(TRUE);
-
+
LLMenuOptionPathfindingRebakeNavmesh::getInstance()->initialize();
// Load and make the toolbars visible
@@ -1986,12 +1985,12 @@ void LLViewerWindow::shutdownViews()
gMorphView->setVisible(FALSE);
}
llinfos << "Global views cleaned." << llendl ;
-
+
// DEV-40930: Clear sModalStack. Otherwise, any LLModalDialog left open
// will crump with LL_ERRS.
LLModalDialog::shutdownModals();
llinfos << "LLModalDialog shut down." << llendl;
-
+
// destroy the nav bar, not currently part of gViewerWindow
// *TODO: Make LLNavigationBar part of gViewerWindow
if (LLNavigationBar::instanceExists())
@@ -1999,17 +1998,17 @@ void LLViewerWindow::shutdownViews()
delete LLNavigationBar::getInstance();
}
llinfos << "LLNavigationBar destroyed." << llendl ;
-
+
// destroy menus after instantiating navbar above, as it needs
// access to gMenuHolder
cleanup_menus();
llinfos << "menus destroyed." << llendl ;
-
+
// Delete all child views.
delete mRootView;
mRootView = NULL;
llinfos << "RootView deleted." << llendl ;
-
+
LLMenuOptionPathfindingRebakeNavmesh::getInstance()->quit();
// Automatically deleted as children of mRootView. Fix the globals.
@@ -2079,6 +2078,8 @@ LLViewerWindow::~LLViewerWindow()
delete mDebugText;
mDebugText = NULL;
+
+ delete mMouseVelocityStat;
}
@@ -3252,7 +3253,7 @@ void LLViewerWindow::updateMouseDelta()
mouse_vel.setVec((F32) dx, (F32) dy);
}
- mMouseVelocityStat.addValue(mouse_vel.magVec());
+ mMouseVelocityStat->addValue(mouse_vel.magVec());
}
void LLViewerWindow::updateKeyboardFocus()
@@ -4776,7 +4777,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
LLViewerDynamicTexture::restoreGL();
LLVOAvatar::restoreGL();
LLVOPartGroup::restoreGL();
-
+
gResizeScreenTexture = TRUE;
gWindowResized = TRUE;
@@ -5003,7 +5004,7 @@ S32 LLViewerWindow::getChatConsoleBottomPad()
S32 offset = 0;
if(gToolBarView)
- offset += gToolBarView->getChild<LLView>("bottom_toolbar_panel")->getRect().getHeight();
+ offset += gToolBarView->getBottomToolbar()->getRect().getHeight();
return offset;
}
@@ -5244,8 +5245,8 @@ void LLPickInfo::getSurfaceInfo()
LLFace* facep = objectp->mDrawable->getFace(mObjectFace);
if (facep)
{
- mUVCoords = facep->surfaceToTexture(mSTCoords, mIntersection, mNormal);
- }
+ mUVCoords = facep->surfaceToTexture(mSTCoords, mIntersection, mNormal);
+ }
}
// and XY coords: