summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorprep <prep@lindenlab.com>2013-03-11 14:45:53 -0400
committerprep <prep@lindenlab.com>2013-03-11 14:45:53 -0400
commit207d9fd767895a3470722fb298eeef4f338e479a (patch)
tree050b5c2c1d88b910aeebe8c8be04c19f548bb123 /indra/newview/llappviewer.cpp
parent82c92ce5a97d6a83505c775348aef692e18e42ed (diff)
parentfe042430b03667abcd6b72ef9cc27d82d85f4242 (diff)
Viewer-chui merge
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 53c694eaca..0f77c68ec8 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -292,6 +292,10 @@ LLTimer gLogoutTimer;
static const F32 LOGOUT_REQUEST_TIME = 6.f; // this will be cut short by the LogoutReply msg.
F32 gLogoutMaxTime = LOGOUT_REQUEST_TIME;
+
+S32 gPendingMetricsUploads = 0;
+
+
BOOL gDisconnected = FALSE;
// used to restore texture state after a mode switch
@@ -682,6 +686,15 @@ LLAppViewer::~LLAppViewer()
removeMarkerFile();
}
+class LLUITranslationBridge : public LLTranslationBridge
+{
+public:
+ virtual std::string getString(const std::string &xml_desc)
+ {
+ return LLTrans::getString(xml_desc);
+ }
+};
+
bool LLAppViewer::init()
{
//
@@ -693,6 +706,10 @@ bool LLAppViewer::init()
//
LLFastTimer::reset();
+ // initialize LLWearableType translation bridge.
+ // Memory will be cleaned up in ::cleanupClass()
+ LLWearableType::initClass(new LLUITranslationBridge());
+
// initialize SSE options
LLVector4a::initClass();
@@ -1775,6 +1792,8 @@ bool LLAppViewer::cleanup()
llinfos << "Cleaning up Objects" << llendflush;
LLViewerObject::cleanupVOClasses();
+
+ LLAvatarAppearance::cleanupClass();
LLPostProcess::cleanupClass();
@@ -2014,6 +2033,8 @@ bool LLAppViewer::cleanup()
llinfos << "Cleaning up LLProxy." << llendl;
LLProxy::cleanupClass();
+ LLWearableType::cleanupClass();
+
LLMainLoopRepeater::instance().stop();
//release all private memory pools.
@@ -3573,6 +3594,12 @@ void LLAppViewer::requestQuit()
// Try to send metrics back to the grid
metricsSend(!gDisconnected);
+
+ // Try to send last batch of avatar rez metrics.
+ if (!gDisconnected && isAgentAvatarValid())
+ {
+ gAgentAvatarp->updateAvatarRezMetrics(true); // force a last packet to be sent.
+ }
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINT, TRUE);
effectp->setPositionGlobal(gAgent.getPositionGlobal());
@@ -4681,6 +4708,13 @@ void LLAppViewer::idleShutdown()
return;
}
+ if (gPendingMetricsUploads > 0
+ && gLogoutTimer.getElapsedTimeF32() < SHUTDOWN_UPLOAD_SAVE_TIME
+ && !logoutRequestSent())
+ {
+ return;
+ }
+
// All floaters are closed. Tell server we want to quit.
if( !logoutRequestSent() )
{