diff options
Diffstat (limited to 'indra/newview/llappviewer.cpp')
| -rw-r--r-- | indra/newview/llappviewer.cpp | 52 | 
1 files changed, 17 insertions, 35 deletions
| diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index be5611899a..90c7791c19 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" @@ -774,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(); @@ -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")); @@ -848,11 +844,10 @@ 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, -		&LLUI::getScaleFactor()); +		deferred_ui_audio_callback);  	LL_INFOS("InitInfo") << "UI initialized." << LL_ENDL ;  	// NOW LLUI::getLanguage() should work. gDirUtilp must know the language @@ -896,8 +891,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)); @@ -905,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 ; @@ -1211,9 +1204,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 @@ -1253,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(); @@ -1750,8 +1740,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. @@ -1894,12 +1882,9 @@ bool LLAppViewer::cleanup()   	//end_messaging_system(); -	SUBSYSTEM_CLEANUP(LLFollowCamMgr); -	//SUBSYSTEM_CLEANUP(LLVolumeMgr);  	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). @@ -2049,13 +2034,10 @@ 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();  	// This should eventually be done in LLAppViewer -	SUBSYSTEM_CLEANUP(LLImage);  	SUBSYSTEM_CLEANUP(LLVFSThread);  	SUBSYSTEM_CLEANUP(LLLFSThread); @@ -2103,8 +2085,6 @@ bool LLAppViewer::cleanup()  	SUBSYSTEM_CLEANUP(LLProxy);      LLCore::LLHttp::cleanup(); -	SUBSYSTEM_CLEANUP(LLWearableType); -  	LLMainLoopRepeater::instance().stop();  	ll_close_fail_log(); @@ -2163,7 +2143,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); @@ -3046,7 +3026,7 @@ bool LLAppViewer::initWindow()  		gViewerWindow->getWindow()->maximize();  	} -	LLUI::sWindow = gViewerWindow->getWindow(); +	LLUI::getInstance()->mWindow = gViewerWindow->getWindow();  	// Show watch cursor  	gViewerWindow->setCursor(UI_CURSOR_WAIT); @@ -4145,7 +4125,7 @@ bool LLAppViewer::initCache()  	mPurgeCache = false;  	BOOL read_only = mSecondInstance ? TRUE : FALSE;  	LLAppViewer::getTextureCache()->setReadOnly(read_only) ; -	LLVOCache::getInstance()->setReadOnly(read_only); +	LLVOCache::initParamSingleton(read_only);  	bool texture_cache_mismatch = false;  	if (gSavedSettings.getS32("LocalCacheVersion") != LLAppViewer::getTextureCacheVersion()) @@ -4217,7 +4197,8 @@ 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()) ; + +	LLVOCache::getInstance()->initCache(LL_PATH_CACHE, gSavedSettings.getU32("CacheNumberOfRegionsForObjects"), getObjectCacheVersion());  	LLSplashScreen::update(LLTrans::getString("StartupInitializingVFS")); @@ -4520,7 +4501,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(); @@ -4547,7 +4528,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 @@ -5154,7 +5135,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"); @@ -5171,12 +5153,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? @@ -5186,7 +5168,7 @@ void LLAppViewer::idleNameCache()  		LLVOAvatar::invalidateNameTags();  	} -	LLAvatarNameCache::idle(); +	name_cache->idle();  }  // | 
