summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-04-20 18:14:37 +0000
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-04-20 18:14:37 +0000
commit9634bcf488f45675e53a761808f59881b57cbe8c (patch)
tree40b695d7acb23e381331bda92c9f7550d655749e /indra/newview/llappviewer.cpp
parentde17c53ae32fef76827201ed24a5af137af12313 (diff)
parentd7f1c88c35849e56f5b352f13c16a08467d1533b (diff)
Merged master into DRTVWR-508
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp50
1 files changed, 32 insertions, 18 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index b232a8c3bb..cbb47d71f7 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"
@@ -172,8 +173,6 @@
#include "llviewerparcelmgr.h"
#include "llworldmapview.h"
#include "llpostprocess.h"
-#include "llwlparammanager.h"
-#include "llwaterparammanager.h"
#include "lldebugview.h"
#include "llconsole.h"
@@ -209,6 +208,7 @@
#include "llfloateroutfitsnapshot.h"
#include "llfloatersnapshot.h"
#include "llsidepanelinventory.h"
+#include "llatmosphere.h"
// includes for idle() idleShutdown()
#include "llviewercontrol.h"
@@ -777,6 +777,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();
@@ -1137,6 +1141,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
@@ -1162,18 +1169,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.
@@ -1205,6 +1207,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;
@@ -1316,6 +1319,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");
@@ -1467,8 +1472,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;
@@ -1482,8 +1489,6 @@ bool LLAppViewer::doFrame()
}
last_call = LLTimer::getTotalTime();
- display();
-
pingMainloopTimeout("Main:Snapshot");
LLFloaterSnapshot::update(); // take snapshots
LLFloaterOutfitSnapshot::update();
@@ -1630,7 +1635,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;
@@ -1653,6 +1658,8 @@ void LLAppViewer::flushVFSIO()
bool LLAppViewer::cleanup()
{
+ LLAtmosphere::cleanupClass();
+
//ditch LLVOAvatarSelf instance
gAgentAvatarp = NULL;
@@ -1902,6 +1909,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);
@@ -2206,7 +2219,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()
@@ -4933,7 +4948,6 @@ void LLAppViewer::idle()
//
// Update weather effects
//
- gSky.propagateHeavenlyBodies(gFrameDTClamped); // moves sun, moon, and planets
// Update wind vector
LLVector3 wind_position_region;
@@ -5417,7 +5431,7 @@ bool LLAppViewer::onChangeFrameLimit(LLSD const & evt)
{
if (evt.asInteger() > 0)
{
- mMinMicroSecPerFrame = 1000000 / evt.asInteger();
+ mMinMicroSecPerFrame = (U64)(1000000.0f / F32(evt.asInteger()));
}
else
{