From acf592419bde744d171ceb3d0b978fe18dc32198 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 19 Jun 2019 16:52:44 +0300 Subject: DRTVWR-493 LLFollowCamMgr to singleton --- indra/newview/llappviewer.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 56e8cc8ff4..81d0523512 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1894,8 +1894,6 @@ bool LLAppViewer::cleanup() //end_messaging_system(); - SUBSYSTEM_CLEANUP(LLFollowCamMgr); - //SUBSYSTEM_CLEANUP(LLVolumeMgr); LLPrimitive::cleanupVolumeManager(); SUBSYSTEM_CLEANUP(LLWorldMapView); SUBSYSTEM_CLEANUP(LLFolderViewItem); -- cgit v1.2.3 From a74ea1811640f2647a1f6dd15663167dfdbe00ab Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 19 Jun 2019 15:57:03 +0300 Subject: DRTVWR-493 LLMachineId to singleton --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 81d0523512..7ccbbc6e10 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -826,7 +826,7 @@ bool LLAppViewer::init() LL_INFOS("InitInfo") << "LLCore::Http initialized." << LL_ENDL ; - LLMachineID::init(); + LLMachineID::getInstance(); //needs to be initialized before threads { if (gSavedSettings.getBOOL("QAModeMetrics")) -- cgit v1.2.3 From a2d91f3160ec50a4208214b612d41868b23e3c35 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 20 Jun 2019 20:53:46 +0300 Subject: DRTVWR-493 LLLocalBitmapMgr to Singleton --- indra/newview/llappviewer.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 7ccbbc6e10..fc75013496 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1750,8 +1750,6 @@ bool LLAppViewer::cleanup() gTransferManager.cleanup(); #endif - SUBSYSTEM_CLEANUP(LLLocalBitmapMgr); - // Note: this is where gWorldMap used to be deleted. // Note: this is where gHUDManager used to be deleted. -- cgit v1.2.3 From 8369276a4967185985cb5957b22cda6897e2df29 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 21 Jun 2019 20:55:39 +0300 Subject: DRTVWR-493 LLViewerMedia to singleton --- indra/newview/llappviewer.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index fc75013496..dd79ad5280 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1211,9 +1211,6 @@ bool LLAppViewer::init() << LL_ENDL; } - LLViewerMedia::initClass(); - LL_INFOS("InitInfo") << "Viewer media initialized." << LL_ENDL ; - LLTextUtil::TextHelpers::iconCallbackCreationFunction = create_text_segment_icon_from_url_match; //EXT-7013 - On windows for some locale (Japanese) standard @@ -2045,7 +2042,6 @@ bool LLAppViewer::cleanup() //Note: //SUBSYSTEM_CLEANUP(LLViewerMedia) has to be put before gTextureList.shutdown() //because some new image might be generated during cleaning up media. --bao - SUBSYSTEM_CLEANUP(LLViewerMedia); SUBSYSTEM_CLEANUP(LLViewerParcelMedia); gTextureList.shutdown(); // shutdown again in case a callback added something LLUIImageList::getInstance()->cleanUp(); -- cgit v1.2.3 From 30cc3ff01f39952b6138fad4095ea032d4b832a4 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 21 Jun 2019 21:31:40 +0300 Subject: DRTVWR-493 LLViewerParcelMedia to singleton --- indra/newview/llappviewer.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index dd79ad5280..a574588b1a 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2042,7 +2042,6 @@ bool LLAppViewer::cleanup() //Note: //SUBSYSTEM_CLEANUP(LLViewerMedia) has to be put before gTextureList.shutdown() //because some new image might be generated during cleaning up media. --bao - SUBSYSTEM_CLEANUP(LLViewerParcelMedia); gTextureList.shutdown(); // shutdown again in case a callback added something LLUIImageList::getInstance()->cleanUp(); -- cgit v1.2.3 From 03f81254055c487623211aeae330d02980781f67 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 27 Jun 2019 18:44:29 +0300 Subject: Backed out changeset: 920a0dbf290a Machine id is needed after singletons die --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a574588b1a..151039acce 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -826,7 +826,7 @@ bool LLAppViewer::init() LL_INFOS("InitInfo") << "LLCore::Http initialized." << LL_ENDL ; - LLMachineID::getInstance(); //needs to be initialized before threads + LLMachineID::init(); { if (gSavedSettings.getBOOL("QAModeMetrics")) -- cgit v1.2.3 From 779b5627c5e9c76a06938cd4e73a5b8f0440cabc Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 3 Jul 2019 20:06:47 +0300 Subject: DRTVWR-493 LLAvatarNameCache to singletone --- indra/newview/llappviewer.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 151039acce..823ded7a50 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4509,7 +4509,7 @@ void LLAppViewer::loadNameCache() llifstream name_cache_stream(filename.c_str()); if(name_cache_stream.is_open()) { - if ( ! LLAvatarNameCache::importFile(name_cache_stream)) + if ( ! LLAvatarNameCache::getInstance()->importFile(name_cache_stream)) { LL_WARNS("AppInit") << "removing invalid '" << filename << "'" << LL_ENDL; name_cache_stream.close(); @@ -4536,7 +4536,7 @@ void LLAppViewer::saveNameCache() llofstream name_cache_stream(filename.c_str()); if(name_cache_stream.is_open()) { - LLAvatarNameCache::exportFile(name_cache_stream); + LLAvatarNameCache::getInstance()->exportFile(name_cache_stream); } // real names cache @@ -5143,7 +5143,8 @@ void LLAppViewer::idleNameCache() // granted to neighbor regions before the main agent gets there. Can't // do it in the move-into-region code because cap not guaranteed to be // granted yet, for example on teleport. - bool had_capability = LLAvatarNameCache::hasNameLookupURL(); + LLAvatarNameCache *name_cache = LLAvatarNameCache::getInstance(); + bool had_capability = LLAvatarNameCache::getInstance()->hasNameLookupURL(); std::string name_lookup_url; name_lookup_url.reserve(128); // avoid a memory allocation below name_lookup_url = region->getCapability("GetDisplayNames"); @@ -5160,12 +5161,12 @@ void LLAppViewer::idleNameCache() { name_lookup_url += '/'; } - LLAvatarNameCache::setNameLookupURL(name_lookup_url); + name_cache->setNameLookupURL(name_lookup_url); } else { // Display names not available on this region - LLAvatarNameCache::setNameLookupURL( std::string() ); + name_cache->setNameLookupURL( std::string() ); } // Error recovery - did we change state? @@ -5175,7 +5176,7 @@ void LLAppViewer::idleNameCache() LLVOAvatar::invalidateNameTags(); } - LLAvatarNameCache::idle(); + name_cache->idle(); } // -- cgit v1.2.3 From 47cbcb61f8b7cbfb0f14043118c4e50b100d0068 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 4 Jul 2019 20:24:38 +0300 Subject: DRTVWR-493 Cleaned up unneded inits. --- indra/newview/llappviewer.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 823ded7a50..076594a5c8 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -896,8 +896,6 @@ bool LLAppViewer::init() // LLKeyboard relies on LLUI to know what some accelerator keys are called. LLKeyboard::setStringTranslatorFunc( LLTrans::getKeyboardString ); - LLWeb::initClass(); // do this after LLUI - // Provide the text fields with callbacks for opening Urls LLUrlAction::setOpenURLCallback(boost::bind(&LLWeb::loadURL, _1, LLStringUtil::null, LLStringUtil::null)); LLUrlAction::setOpenURLInternalCallback(boost::bind(&LLWeb::loadURLInternal, _1, LLStringUtil::null, LLStringUtil::null, false)); -- cgit v1.2.3 From 8df0583db09426904523f8dc70d638f9b8f2d809 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 11 Jul 2019 16:25:24 +0300 Subject: DRTVWR-493 Cleanup LLSkinningUtil --- indra/newview/llappviewer.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 076594a5c8..0435c3d398 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -100,7 +100,6 @@ #include "llscenemonitor.h" #include "llavatarrenderinfoaccountant.h" #include "lllocalbitmaps.h" -#include "llskinningutil.h" // Linden library includes #include "llavatarnamecache.h" @@ -798,9 +797,6 @@ bool LLAppViewer::init() LL_INFOS("InitInfo") << "Configuration initialized." << LL_ENDL ; - // initialize skinning util - LLSkinningUtil::initClass(); - //set the max heap size. initMaxHeapSize() ; LLCoros::instance().setStackSize(gSavedSettings.getS32("CoroutineStackSize")); -- cgit v1.2.3 From 17fae30f721c716bab1dd78cc5f8ac6b0aad49e0 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 25 Jul 2019 15:17:11 +0300 Subject: DRTVWR-493 LLImage to LLParamSingleton --- indra/newview/llappviewer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0435c3d398..cb4655cd87 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2040,7 +2040,6 @@ bool LLAppViewer::cleanup() LLUIImageList::getInstance()->cleanUp(); // This should eventually be done in LLAppViewer - SUBSYSTEM_CLEANUP(LLImage); SUBSYSTEM_CLEANUP(LLVFSThread); SUBSYSTEM_CLEANUP(LLLFSThread); @@ -2148,7 +2147,7 @@ bool LLAppViewer::initThreads() { static const bool enable_threads = true; - LLImage::initClass(gSavedSettings.getBOOL("TextureNewByteRange"),gSavedSettings.getS32("TextureReverseByteRange")); + LLImage::initParamSingleton(gSavedSettings.getBOOL("TextureNewByteRange"),gSavedSettings.getS32("TextureReverseByteRange")); LLVFSThread::initClass(enable_threads && false); LLLFSThread::initClass(enable_threads && false); -- cgit v1.2.3 From adeee613c60e8d4d2d57ede9685b8388a681c409 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 25 Jul 2019 18:20:17 +0300 Subject: DRTVWR-493 LLRender2D to LLParamSingleton --- indra/newview/llappviewer.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index cb4655cd87..1365ce6c7e 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1886,7 +1886,6 @@ bool LLAppViewer::cleanup() LLPrimitive::cleanupVolumeManager(); SUBSYSTEM_CLEANUP(LLWorldMapView); SUBSYSTEM_CLEANUP(LLFolderViewItem); - SUBSYSTEM_CLEANUP(LLUI); // // Shut down the VFS's AFTER the decode manager cleans up (since it cleans up vfiles). -- cgit v1.2.3 From c2660070ce5a81270d72feeea8939e9c0368360e Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Sat, 10 Aug 2019 03:09:30 +0300 Subject: SL-11716 Fixed crash on initializing LLUI --- indra/newview/llappviewer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 1365ce6c7e..12aadd852d 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -847,8 +847,7 @@ bool LLAppViewer::init() LLUI::initClass(settings_map, LLUIImageList::getInstance(), ui_audio_callback, - deferred_ui_audio_callback, - &LLUI::getScaleFactor()); + deferred_ui_audio_callback); LL_INFOS("InitInfo") << "UI initialized." << LL_ENDL ; // NOW LLUI::getLanguage() should work. gDirUtilp must know the language -- cgit v1.2.3 From c61d0f42973f1d58e4e6b5b8a4e0911ed0602bb7 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Sat, 10 Aug 2019 15:31:03 +0300 Subject: DRTVWR-493 LLUI to LLParamSingleton --- indra/newview/llappviewer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 12aadd852d..de70712627 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -844,7 +844,7 @@ bool LLAppViewer::init() settings_map["floater"] = &gSavedSettings; // *TODO: New settings file settings_map["account"] = &gSavedPerAccountSettings; - LLUI::initClass(settings_map, + LLUI::initParamSingleton(settings_map, LLUIImageList::getInstance(), ui_audio_callback, deferred_ui_audio_callback); @@ -898,7 +898,7 @@ bool LLAppViewer::init() LLUrlAction::setExecuteSLURLCallback(&LLURLDispatcher::dispatchFromTextEditor); // Let code in llui access the viewer help floater - LLUI::sHelpImpl = LLViewerHelp::getInstance(); + LLUI::getInstance()->mHelpImpl = LLViewerHelp::getInstance(); LL_INFOS("InitInfo") << "UI initialization is done." << LL_ENDL ; @@ -3033,7 +3033,7 @@ bool LLAppViewer::initWindow() gViewerWindow->getWindow()->maximize(); } - LLUI::sWindow = gViewerWindow->getWindow(); + LLUI::getInstance()->mWindow = gViewerWindow->getWindow(); // Show watch cursor gViewerWindow->setCursor(UI_CURSOR_WAIT); -- cgit v1.2.3 From 3c552696bf8704e30c1525a4f9d4b3dd09034820 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 12 Aug 2019 22:56:15 +0300 Subject: DRTVWR-493 LLWearableType to LLParamSingleton --- indra/newview/llappviewer.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index de70712627..84cd326f06 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -773,7 +773,7 @@ bool LLAppViewer::init() // initialize LLWearableType translation bridge. // Memory will be cleaned up in ::cleanupClass() - LLWearableType::initClass(new LLUITranslationBridge()); + LLWearableType::initParamSingleton(new LLUITranslationBridge()); // initialize SSE options LLVector4a::initClass(); @@ -2085,8 +2085,6 @@ bool LLAppViewer::cleanup() SUBSYSTEM_CLEANUP(LLProxy); LLCore::LLHttp::cleanup(); - SUBSYSTEM_CLEANUP(LLWearableType); - LLMainLoopRepeater::instance().stop(); ll_close_fail_log(); -- cgit v1.2.3 From 24a0601a50f81b8f1a21c2c64c118702dd93f645 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 13 Aug 2019 20:19:46 +0300 Subject: DRTVWR-493 Reworked a number of inits --- indra/newview/llappviewer.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 84cd326f06..1874743644 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1243,7 +1243,7 @@ bool LLAppViewer::init() // Note: this is where gLocalSpeakerMgr and gActiveSpeakerMgr used to be instantiated. LLVoiceChannel::initClass(); - LLVoiceClient::getInstance()->init(gServicePump); + LLVoiceClient::initParamSingleton(gServicePump); LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLFloaterIMContainer::onCurrentChannelChanged, _1), true); joystick = LLViewerJoystick::getInstance(); @@ -4123,7 +4123,7 @@ bool LLAppViewer::initCache() mPurgeCache = false; BOOL read_only = mSecondInstance ? TRUE : FALSE; LLAppViewer::getTextureCache()->setReadOnly(read_only) ; - LLVOCache::getInstance()->setReadOnly(read_only); + LLVOCache::initParamSingleton(LL_PATH_CACHE, gSavedSettings.getU32("CacheNumberOfRegionsForObjects"), getObjectCacheVersion(), read_only); bool texture_cache_mismatch = false; if (gSavedSettings.getS32("LocalCacheVersion") != LLAppViewer::getTextureCacheVersion()) @@ -4195,8 +4195,6 @@ bool LLAppViewer::initCache() S64 extra = LLAppViewer::getTextureCache()->initCache(LL_PATH_CACHE, texture_cache_size, texture_cache_mismatch); texture_cache_size -= extra; - LLVOCache::getInstance()->initCache(LL_PATH_CACHE, gSavedSettings.getU32("CacheNumberOfRegionsForObjects"), getObjectCacheVersion()) ; - LLSplashScreen::update(LLTrans::getString("StartupInitializingVFS")); // Init the VFS -- cgit v1.2.3 From 27d391b2bb068ee38ba36e7b3169058196da9420 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 4 Sep 2019 19:20:52 +0300 Subject: SL-11868 Fix cache init after purge --- indra/newview/llappviewer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 1874743644..f414ec0d09 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4123,7 +4123,7 @@ bool LLAppViewer::initCache() mPurgeCache = false; BOOL read_only = mSecondInstance ? TRUE : FALSE; LLAppViewer::getTextureCache()->setReadOnly(read_only) ; - LLVOCache::initParamSingleton(LL_PATH_CACHE, gSavedSettings.getU32("CacheNumberOfRegionsForObjects"), getObjectCacheVersion(), read_only); + LLVOCache::initParamSingleton(read_only); bool texture_cache_mismatch = false; if (gSavedSettings.getS32("LocalCacheVersion") != LLAppViewer::getTextureCacheVersion()) @@ -4195,6 +4195,9 @@ bool LLAppViewer::initCache() S64 extra = LLAppViewer::getTextureCache()->initCache(LL_PATH_CACHE, texture_cache_size, texture_cache_mismatch); texture_cache_size -= extra; + + LLVOCache::getInstance()->initCache(LL_PATH_CACHE, gSavedSettings.getU32("CacheNumberOfRegionsForObjects"), getObjectCacheVersion()); + LLSplashScreen::update(LLTrans::getString("StartupInitializingVFS")); // Init the VFS -- cgit v1.2.3