summaryrefslogtreecommitdiff
path: root/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2022-05-31 01:58:09 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2022-05-31 01:58:09 +0300
commit9b0569840f06137ee2379463f5028a5342c3555a (patch)
tree279eaa517131fe4e073d8d9781e0b69e747a0bb9 /indra/newview/llstartup.cpp
parent1e09d25d9ce8b7ec8da28ad5364d81c0faab9d0a (diff)
parentcdbd06e8ed6e3f4285a61f5c0b607a65dfdf8dfd (diff)
Merge branch 'master' into DRTVWR-544-maint
# Conflicts: # indra/llprimitive/llmodel.cpp # indra/llprimitive/llmodel.h # indra/newview/llappviewer.cpp # indra/newview/llappviewer.h
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r--indra/newview/llstartup.cpp36
1 files changed, 22 insertions, 14 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 03b24ffb71..b32cff31d0 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -35,6 +35,7 @@
#else
# include <sys/stat.h> // mkdir()
#endif
+#include <memory> // std::unique_ptr
#include "llviewermedia_streamingaudio.h"
#include "llaudioengine.h"
@@ -179,7 +180,6 @@
#include "pipeline.h"
#include "llappviewer.h"
#include "llfasttimerview.h"
-#include "lltelemetry.h"
#include "llfloatermap.h"
#include "llweb.h"
#include "llvoiceclient.h"
@@ -206,6 +206,9 @@
#include "llstacktrace.h"
+#include "threadpool.h"
+
+
#if LL_WINDOWS
#include "lldxhardware.h"
#endif
@@ -254,9 +257,9 @@ static bool mBenefitsSuccessfullyInit = false;
const F32 STATE_AGENT_WAIT_TIMEOUT = 240; //seconds
const S32 MAX_SEED_CAP_ATTEMPTS_BEFORE_LOGIN = 3; // Give region 3 chances
-boost::scoped_ptr<LLEventPump> LLStartUp::sStateWatcher(new LLEventStream("StartupState"));
-boost::scoped_ptr<LLStartupListener> LLStartUp::sListener(new LLStartupListener());
-boost::scoped_ptr<LLViewerStats::PhaseMap> LLStartUp::sPhases(new LLViewerStats::PhaseMap);
+std::unique_ptr<LLEventPump> LLStartUp::sStateWatcher(new LLEventStream("StartupState"));
+std::unique_ptr<LLStartupListener> LLStartUp::sListener(new LLStartupListener());
+std::unique_ptr<LLViewerStats::PhaseMap> LLStartUp::sPhases(new LLViewerStats::PhaseMap);
//
// local function declaration
@@ -309,6 +312,12 @@ void update_texture_fetch()
LLAppViewer::getImageDecodeThread()->update(1); // unpauses the image thread
LLAppViewer::getTextureFetch()->update(1); // unpauses the texture fetch thread
gTextureList.updateImages(0.10f);
+
+ if (LLImageGLThread::sEnabled)
+ {
+ std::shared_ptr<LL::WorkQueue> main_queue = LL::WorkQueue::getInstance("mainloop");
+ main_queue->runFor(std::chrono::milliseconds(1));
+ }
}
void set_flags_and_update_appearance()
@@ -531,8 +540,6 @@ bool idle_startup()
}
#if LL_WINDOWS
- LLPROFILE_STARTUP();
-
// On the windows dev builds, unpackaged, the message.xml file will
// be located in indra/build-vc**/newview/<config>/app_settings.
std::string message_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"message.xml");
@@ -1507,6 +1514,9 @@ bool idle_startup()
gAgentCamera.resetCamera();
display_startup();
+ // start up the ThreadPool we'll use for textures et al.
+ LLAppViewer::instance()->initGeneralThread();
+
// Initialize global class data needed for surfaces (i.e. textures)
LL_DEBUGS("AppInit") << "Initializing sky..." << LL_ENDL;
// Initialize all of the viewer object classes for the first time (doing things like texture fetches.
@@ -1521,7 +1531,11 @@ bool idle_startup()
display_startup();
LL_DEBUGS("AppInit") << "Decoding images..." << LL_ENDL;
- // For all images pre-loaded into viewer cache, decode them.
+ // For all images pre-loaded into viewer cache, init
+ // priorities and fetching using decodeAllImages.
+ // Most of the fetching and decoding likely to be done
+ // by update_texture_fetch() later, while viewer waits.
+ //
// Need to do this AFTER we init the sky
const S32 DECODE_TIME_SEC = 2;
for (int i = 0; i < DECODE_TIME_SEC; i++)
@@ -2874,7 +2888,7 @@ void reset_login()
gAgentWearables.cleanup();
gAgentCamera.cleanup();
gAgent.cleanup();
- LLWorld::getInstance()->destroyClass();
+ LLWorld::getInstance()->resetClass();
if ( gViewerWindow )
{ // Hide menus and normal buttons
@@ -3342,12 +3356,6 @@ bool init_benefits(LLSD& response)
succ = false;
}
- // FIXME PREMIUM - for testing if login does not yet provide Premium Plus. Should be removed thereafter.
- //if (succ && !LLAgentBenefitsMgr::has("Premium Plus"))
- //{
- // LLAgentBenefitsMgr::init("Premium Plus", packages_sd["Premium"]["benefits"]);
- // llassert(LLAgentBenefitsMgr::has("Premium Plus"));
- //}
return succ;
}