diff options
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d5c5921ea3..f0481db89b 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. @@ -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()); @@ -4360,7 +4387,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(); } } @@ -4676,6 +4702,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() ) { |