diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-05-05 00:37:16 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-05-05 00:37:16 +0300 |
commit | ec9b9898635e90dcdc3579e2121ef11f8ca2a0a8 (patch) | |
tree | 859eb8101847d3c8be18adc6bf9aa0e775a792e7 /indra/newview/llappviewer.cpp | |
parent | 80447f5e6bfd9843413c7a79074d11373e6c4061 (diff) | |
parent | 7c0f3db180e50aad3866a8ac1b1c88cccf74c68d (diff) |
Merge branch 'DRTVWR-501-maint' into DRTVWR-503-maint
# Conflicts:
# indra/newview/llinventorybridge.cpp
# indra/newview/llinventorypanel.cpp
# indra/newview/lltexturectrl.cpp
# indra/newview/skins/default/xui/de/floater_texture_ctrl.xml
# indra/newview/skins/default/xui/es/floater_texture_ctrl.xml
# indra/newview/skins/default/xui/fr/floater_texture_ctrl.xml
# indra/newview/skins/default/xui/it/floater_texture_ctrl.xml
# indra/newview/skins/default/xui/ja/floater_texture_ctrl.xml
# indra/newview/skins/default/xui/pt/floater_texture_ctrl.xml
# indra/newview/skins/default/xui/ru/floater_texture_ctrl.xml
# indra/newview/skins/default/xui/tr/floater_texture_ctrl.xml
# indra/newview/skins/default/xui/zh/floater_texture_ctrl.xml
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 50 |
1 files changed, 32 insertions, 18 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ab3ae1c64b..4c3b82b4e2 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -33,6 +33,7 @@ #include "llfeaturemanager.h" #include "lluictrlfactory.h" #include "lltexteditor.h" +#include "llenvironment.h" #include "llerrorcontrol.h" #include "lleventtimer.h" #include "llviewertexturelist.h" @@ -174,8 +175,6 @@ #include "llviewerparcelmgr.h" #include "llworldmapview.h" #include "llpostprocess.h" -#include "llwlparammanager.h" -#include "llwaterparammanager.h" #include "lldebugview.h" #include "llconsole.h" @@ -211,6 +210,7 @@ #include "llfloateroutfitsnapshot.h" #include "llfloatersnapshot.h" #include "llsidepanelinventory.h" +#include "llatmosphere.h" // includes for idle() idleShutdown() #include "llviewercontrol.h" @@ -779,6 +779,10 @@ bool LLAppViewer::init() // Memory will be cleaned up in ::cleanupClass() LLWearableType::initParamSingleton(new LLUITranslationBridge()); + // initialize the LLSettingsType translation bridge. + LLTranslationBridge::ptr_t trans = std::make_shared<LLUITranslationBridge>(); + LLSettingsType::initClass(trans); + // initialize SSE options LLVector4a::initClass(); @@ -1134,6 +1138,9 @@ bool LLAppViewer::init() gGLActive = FALSE; +#if LL_RELEASE_FOR_DOWNLOAD + if (!gSavedSettings.getBOOL("CmdLineSkipUpdater")) + { LLProcess::Params updater; updater.desc = "updater process"; // Because it's the updater, it MUST persist beyond the lifespan of the @@ -1159,18 +1166,13 @@ bool LLAppViewer::init() // ForceAddressSize updater.args.add(stringize(gSavedSettings.getU32("ForceAddressSize"))); -#if LL_WINDOWS && !LL_RELEASE_FOR_DOWNLOAD && !LL_SEND_CRASH_REPORTS - // This is neither a release package, nor crash-reporting enabled test build - // try to run version updater, but don't bother if it fails (file might be missing) - LLLeap *leap_p = LLLeap::create(updater, false); - if (!leap_p) + // Run the updater. An exception from launching the updater should bother us. + LLLeap::create(updater, true); + } + else { - LL_WARNS("LLLeap") << "Failed to run LLLeap" << LL_ENDL; + LL_WARNS("InitInfo") << "Skipping updater check." << LL_ENDL; } -#else - // Run the updater. An exception from launching the updater should bother us. - LLLeap::create(updater, true); -#endif // Iterate over --leap command-line options. But this is a bit tricky: if // there's only one, it won't be an array at all. @@ -1202,6 +1204,7 @@ bool LLAppViewer::init() << "lleventhost no longer supported as a dynamic library" << LL_ENDL; } +#endif LLTextUtil::TextHelpers::iconCallbackCreationFunction = create_text_segment_icon_from_url_match; @@ -1313,6 +1316,8 @@ static LLTrace::BlockTimerStatHandle FTM_YIELD("Yield"); static LLTrace::BlockTimerStatHandle FTM_TEXTURE_CACHE("Texture Cache"); static LLTrace::BlockTimerStatHandle FTM_DECODE("Image Decode"); +static LLTrace::BlockTimerStatHandle FTM_FETCH("Image Fetch"); + static LLTrace::BlockTimerStatHandle FTM_VFS("VFS Thread"); static LLTrace::BlockTimerStatHandle FTM_LFS("LFS Thread"); static LLTrace::BlockTimerStatHandle FTM_PAUSE_THREADS("Pause Threads"); @@ -1465,8 +1470,10 @@ bool LLAppViewer::doFrame() pingMainloopTimeout("Main:Display"); gGLActive = TRUE; + display(); + static U64 last_call = 0; - if (!gTeleportDisplay) + if (!gTeleportDisplay || gGLManager.mIsIntel) // SL-10625...throttle early, throttle often with Intel { // Frame/draw throttling U64 elapsed_time = LLTimer::getTotalTime() - last_call; @@ -1480,8 +1487,6 @@ bool LLAppViewer::doFrame() } last_call = LLTimer::getTotalTime(); - display(); - pingMainloopTimeout("Main:Snapshot"); LLFloaterSnapshot::update(); // take snapshots LLFloaterOutfitSnapshot::update(); @@ -1628,7 +1633,7 @@ S32 LLAppViewer::updateTextureThreads(F32 max_time) work_pending += LLAppViewer::getImageDecodeThread()->update(max_time); // unpauses the image thread } { - LL_RECORD_BLOCK_TIME(FTM_DECODE); + LL_RECORD_BLOCK_TIME(FTM_FETCH); work_pending += LLAppViewer::getTextureFetch()->update(max_time); // unpauses the texture fetch thread } return work_pending; @@ -1651,6 +1656,8 @@ void LLAppViewer::flushVFSIO() bool LLAppViewer::cleanup() { + LLAtmosphere::cleanupClass(); + //ditch LLVOAvatarSelf instance gAgentAvatarp = NULL; @@ -1905,6 +1912,12 @@ bool LLAppViewer::cleanup() // Store the time of our current logoff gSavedPerAccountSettings.setU32("LastLogoff", time_corrected()); + if (LLEnvironment::instanceExists()) + { + //Store environment settings if nessesary + LLEnvironment::getInstance()->saveToSettings(); + } + // Must do this after all panels have been deleted because panels that have persistent rects // save their rects on delete. gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE); @@ -2209,7 +2222,9 @@ void errorCallback(const std::string &error_string) // static info file. LLAppViewer::instance()->writeDebugInfo(); +#ifndef SHADER_CRASH_NONFATAL LLError::crashAndLoop(error_string); +#endif } void LLAppViewer::initLoggingAndGetLastDuration() @@ -4942,7 +4957,6 @@ void LLAppViewer::idle() // // Update weather effects // - gSky.propagateHeavenlyBodies(gFrameDTClamped); // moves sun, moon, and planets // Update wind vector LLVector3 wind_position_region; @@ -5426,7 +5440,7 @@ bool LLAppViewer::onChangeFrameLimit(LLSD const & evt) { if (evt.asInteger() > 0) { - mMinMicroSecPerFrame = 1000000 / evt.asInteger(); + mMinMicroSecPerFrame = (U64)(1000000.0f / F32(evt.asInteger())); } else { |