diff options
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r-- | indra/newview/llstartup.cpp | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 6883ead5ee..26d8ddaac6 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -207,6 +207,7 @@ #include "llstacktrace.h" #include "threadpool.h" +#include "llperfstats.h" #if LL_WINDOWS @@ -322,6 +323,8 @@ void set_flags_and_update_appearance() { LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true); LLAppearanceMgr::instance().updateAppearanceFromCOF(true, true, no_op); + + LLInventoryModelBackgroundFetch::instance().start(); } // Returns false to skip other idle processing. Should only return @@ -660,9 +663,22 @@ bool idle_startup() #else void* window_handle = NULL; #endif - bool init = gAudiop->init(window_handle, LLAppViewer::instance()->getSecondLifeTitle()); - if(init) + if (gAudiop->init(window_handle, LLAppViewer::instance()->getSecondLifeTitle())) { + if (FALSE == gSavedSettings.getBOOL("UseMediaPluginsForStreamingAudio")) + { + LL_INFOS("AppInit") << "Using default impl to render streaming audio" << LL_ENDL; + gAudiop->setStreamingAudioImpl(gAudiop->createDefaultStreamingAudioImpl()); + } + + // if the audio engine hasn't set up its own preferred handler for streaming audio + // then set up the generic streaming audio implementation which uses media plugins + if (NULL == gAudiop->getStreamingAudioImpl()) + { + LL_INFOS("AppInit") << "Using media plugins to render streaming audio" << LL_ENDL; + gAudiop->setStreamingAudioImpl(new LLStreamingAudio_MediaPlugins()); + } + gAudiop->setMuted(TRUE); } else @@ -671,16 +687,6 @@ bool idle_startup() delete gAudiop; gAudiop = NULL; } - - if (gAudiop) - { - // if the audio engine hasn't set up its own preferred handler for streaming audio then set up the generic streaming audio implementation which uses media plugins - if (NULL == gAudiop->getStreamingAudioImpl()) - { - LL_INFOS("AppInit") << "Using media plugins to render streaming audio" << LL_ENDL; - gAudiop->setStreamingAudioImpl(new LLStreamingAudio_MediaPlugins()); - } - } } } @@ -1496,6 +1502,8 @@ bool idle_startup() LLViewerParcelAskPlay::getInstance()->loadSettings(); } + gAgent.addRegionChangedCallback(boost::bind(&LLPerfStats::StatsRecorder::clearStats)); + // *Note: this is where gWorldMap used to be initialized. // register null callbacks for audio until the audio system is initialized @@ -2255,7 +2263,7 @@ bool idle_startup() if (STATE_CLEANUP == LLStartUp::getStartupState()) { - set_startup_status(1.0, "", ""); + set_startup_status(1.0, "", ""); display_startup(); if (!mBenefitsSuccessfullyInit) @@ -2342,6 +2350,8 @@ bool idle_startup() LLUIUsage::instance().clear(); + LLPerfStats::StatsRecorder::setAutotuneInit(); + return TRUE; } @@ -3016,7 +3026,7 @@ bool LLStartUp::dispatchURL() || (dx*dx > SLOP*SLOP) || (dy*dy > SLOP*SLOP) ) { - LLURLDispatcher::dispatch(getStartSLURL().getSLURLString(), "clicked", + LLURLDispatcher::dispatch(getStartSLURL().getSLURLString(), LLCommandHandler::NAV_TYPE_CLICKED, NULL, false); } return true; @@ -3244,7 +3254,7 @@ LLSD transform_cert_args(LLPointer<LLCertificate> cert) // are actually arrays, and we want to format them as comma separated // strings, so special case those. LLSDSerialize::toXML(cert_info[iter->first], std::cout); - if((iter->first== std::string(CERT_KEY_USAGE)) | + if((iter->first == std::string(CERT_KEY_USAGE)) || (iter->first == std::string(CERT_EXTENDED_KEY_USAGE))) { value = ""; @@ -3404,6 +3414,9 @@ bool process_login_success_response() if(!text.empty()) gAgentID.set(text); gDebugInfo["AgentID"] = text; + LLPerfStats::StatsRecorder::setEnabled(gSavedSettings.getBOOL("PerfStatsCaptureEnabled")); + LLPerfStats::StatsRecorder::setFocusAv(gAgentID); + // Agent id needed for parcel info request in LLUrlEntryParcel // to resolve parcel name. LLUrlEntryParcel::setAgentID(gAgentID); |