summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-05-02 17:37:29 -0700
committerMerov Linden <merov@lindenlab.com>2013-05-02 17:37:29 -0700
commit2a7d604e87df5a48bfb0abeb0d7b897a117005fb (patch)
tree783a46ee6f16e484ac35b933bace359b2eb2d1b8 /indra/newview/llappviewer.cpp
parentcc7440d0853d269a5b955ab021db729ed5b6a92c (diff)
parent043f2e0bfd40d29464175de838e3a36aad6e81df (diff)
ACME-306 : Pull merge from viewer-chui
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp37
1 files changed, 35 insertions, 2 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index e97c264af3..861717669f 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();
@@ -786,7 +803,7 @@ bool LLAppViewer::init()
LLUIImageList::getInstance(),
ui_audio_callback,
deferred_ui_audio_callback,
- &LLUI::sGLScaleFactor);
+ &LLUI::getScaleFactor());
LL_INFOS("InitInfo") << "UI initialized." << LL_ENDL ;
// NOW LLUI::getLanguage() should work. gDirUtilp must know the language
@@ -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.
@@ -3576,6 +3597,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());
@@ -4368,7 +4395,6 @@ void LLAppViewer::idle()
// The 5-second interval is nice for this purpose. If the object debug
// bit moves or is disabled, please give this a suitable home.
LLViewerAssetStatsFF::record_fps_main(gFPSClamped);
- LLViewerAssetStatsFF::record_avatar_stats();
}
}
@@ -4684,6 +4710,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() )
{