diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index 641f32bd9f9692c29d11cd8d1370069fc9a2f1d4..d54adf37037485450fbf36a51bc2935e2958f2c8 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -69,7 +69,7 @@ LLDrawPoolWater::~LLDrawPoolWater() void LLDrawPoolWater::setTransparentTextures(const LLUUID& transparentTextureId, const LLUUID& nextTransparentTextureId) { - const LLSettingsWater::ptr_t& pwater = LLEnvironment::instance().getCurrentWater(); + const LLSettingsWater::ptr_t& pwater = LLEnvironment::instanceFast().getCurrentWater(); mWaterImagep[0] = LLViewerTextureManager::getFetchedTexture(!transparentTextureId.isNull() ? transparentTextureId : pwater->GetDefaultTransparentTextureAssetId()); mWaterImagep[1] = LLViewerTextureManager::getFetchedTexture(!nextTransparentTextureId.isNull() ? nextTransparentTextureId : (!transparentTextureId.isNull() ? transparentTextureId : pwater->GetDefaultTransparentTextureAssetId())); mWaterImagep[0]->addTextureStats(1024.f*1024.f); @@ -84,7 +84,7 @@ void LLDrawPoolWater::setOpaqueTexture(const LLUUID& opaqueTextureId) void LLDrawPoolWater::setNormalMaps(const LLUUID& normalMapId, const LLUUID& nextNormalMapId) { - const LLSettingsWater::ptr_t& pwater = LLEnvironment::instance().getCurrentWater(); + const LLSettingsWater::ptr_t& pwater = LLEnvironment::instanceFast().getCurrentWater(); mWaterNormp[0] = LLViewerTextureManager::getFetchedTexture(!normalMapId.isNull() ? normalMapId : pwater->GetDefaultWaterNormalAssetId()); mWaterNormp[1] = LLViewerTextureManager::getFetchedTexture(!nextNormalMapId.isNull() ? nextNormalMapId : (!normalMapId.isNull() ? normalMapId : pwater->GetDefaultWaterNormalAssetId())); mWaterNormp[0]->addTextureStats(1024.f*1024.f); diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index e7505ff45b924817c400ec722f119c43efc63f80..bc1bb64dce56bfac1eb768fb76e15169b49e27c2 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -196,7 +196,7 @@ class LLFavoriteLandmarkButton : public LLButton void onMouseEnter(S32 x, S32 y, MASK mask) { - if (LLToolDragAndDrop::getInstance()->hasMouseCapture()) + if (LLToolDragAndDrop::getInstanceFast()->hasMouseCapture()) { LLUICtrl::onMouseEnter(x, y, mask); } @@ -714,14 +714,14 @@ void LLFavoritesBarCtrl::draw() { if (mItemsChangedTimer.getElapsedTimeF32() > 1.f) { - LLFavoritesOrderStorage::instance().saveFavoritesRecord(); + LLFavoritesOrderStorage::instanceFast().saveFavoritesRecord(); mItemsChangedTimer.stop(); } } - if(!mItemsChangedTimer.getStarted() && LLFavoritesOrderStorage::instance().mUpdateRequired) + if(!mItemsChangedTimer.getStarted() && LLFavoritesOrderStorage::instanceFast().mUpdateRequired) { - LLFavoritesOrderStorage::instance().mUpdateRequired = false; + LLFavoritesOrderStorage::instanceFast().mUpdateRequired = false; mItemsChangedTimer.start(); } diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 5bfd764951978a8593171f16fb8931f92c2c2b22..cc5db14e702e088712b021252da97eb7581883cb 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -779,9 +779,9 @@ void LLInventoryPanel::idle(void* user_data) { LLInventoryPanel* panel = (LLInventoryPanel*)user_data; // Nudge the filter if the clipboard state changed - if (panel->mClipboardState != LLClipboard::instance().getGeneration()) + if (panel->mClipboardState != LLClipboard::instanceFast().getGeneration()) { - panel->mClipboardState = LLClipboard::instance().getGeneration(); + panel->mClipboardState = LLClipboard::instanceFast().getGeneration(); const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); LLFolderViewFolder* trash_folder = panel->getFolderByID(trash_id); if (trash_folder) @@ -797,9 +797,9 @@ void LLInventoryPanel::idle(void* user_data) { panel->mFolderRoot.get()->update(); // while dragging, update selection rendering to reflect single/multi drag status - if (LLToolDragAndDrop::getInstance()->hasMouseCapture()) + if (LLToolDragAndDrop::getInstanceFast()->hasMouseCapture()) { - EAcceptance last_accept = LLToolDragAndDrop::getInstance()->getLastAccept(); + EAcceptance last_accept = LLToolDragAndDrop::getInstanceFast()->getLastAccept(); if (last_accept == ACCEPT_YES_SINGLE || last_accept == ACCEPT_YES_COPY_SINGLE) { panel->mFolderRoot.get()->setShowSingleSelection(TRUE); diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp index f9293966aafb785596e38cab46767decaf04ef3f..24add3506d511de0879c7733e144a778b1440e54 100644 --- a/indra/newview/llmaterialmgr.cpp +++ b/indra/newview/llmaterialmgr.cpp @@ -593,7 +593,7 @@ void LLMaterialMgr::onIdle(void*) { LL_RECORD_BLOCK_TIME(FTM_MATERIALS_IDLE); - LLMaterialMgr* instancep = LLMaterialMgr::getInstance(); + LLMaterialMgr* instancep = LLMaterialMgr::getInstanceFast(); if (!instancep->mGetQueue.empty()) { diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index e9c07fb8b4d52e50830c752f890833d984c77b30..08d0f548f071cfcf40d98a8a6fadeddfd819f243 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -128,14 +128,14 @@ void LLOutputMonitorCtrl::draw() if (getVisible() && mAutoUpdate && !getIsMuted() && mSpeakerId.notNull()) { - setPower(LLVoiceClient::getInstance()->getCurrentPower(mSpeakerId)); + setPower(LLVoiceClient::getInstanceFast()->getCurrentPower(mSpeakerId)); if(mIsAgentControl) { - setIsTalking(LLVoiceClient::getInstance()->getUserPTTState()); + setIsTalking(LLVoiceClient::getInstanceFast()->getUserPTTState()); } else { - setIsTalking(LLVoiceClient::getInstance()->getIsSpeaking(mSpeakerId)); + setIsTalking(LLVoiceClient::getInstanceFast()->getIsSpeaking(mSpeakerId)); } } @@ -307,7 +307,7 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& s { // check only blocking on voice. EXT-3542 mIsMuted = LLMuteList::getInstanceFast()->isMuted(mSpeakerId, LLMute::flagVoiceChat); - LLMuteList::getInstance()->addObserver(this); + LLMuteList::getInstanceFast()->addObserver(this); } } } diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index e2e9632c89a64e1c47b50987b3de712e62e08ca6..5e0ef159cac86f4bb2696eff2770011e28fc3e74 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -364,7 +364,7 @@ void LLSpeakerMgr::update(BOOL resort_ok) return; } - auto& voice_client = LLVoiceClient::instance(); + auto& voice_client = LLVoiceClient::instanceFast(); static const LLUIColor speaking_color = LLUIColorTable::instance().getColor("SpeakingColor"); static const LLUIColor overdriven_color = LLUIColorTable::instance().getColor("OverdrivenColor"); @@ -475,7 +475,7 @@ void LLSpeakerMgr::update(BOOL resort_ok) void LLSpeakerMgr::updateSpeakerList() { // Are we bound to the currently active voice channel? - auto& voice_client = LLVoiceClient::instance(); + auto& voice_client = LLVoiceClient::instanceFast(); if ((!mVoiceChannel && voice_client.inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive())) { std::set<LLUUID> participants; diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 9d14a548f9338394606f38554752c31aa86fa5f4..542169e45818a29865337b3da14b499561215a64 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -51,7 +51,7 @@ static LLDefaultChildRegistry::Register<LLToolBarView> r("toolbar_view"); bool isToolDragged() { - return (LLToolDragAndDrop::getInstance()->getSource() == LLToolDragAndDrop::SOURCE_VIEWER); + return (LLToolDragAndDrop::getInstanceFast()->getSource() == LLToolDragAndDrop::SOURCE_VIEWER); } LLToolBarView::Toolbar::Toolbar() diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index 8cb024140d4555a6abdd13121f4bc8944dabf1b9..21eb2af5d5d23036dea1ab7396bf625c2a0a3b17 100644 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -226,14 +226,14 @@ LLTool* LLToolMgr::getCurrentTool() } if (cur_tool) { - if ( LLToolCompInspect::getInstance()->isToolCameraActive() - && prev_tool == LLToolCamera::getInstance() - && cur_tool == LLToolPie::getInstance() ) + if ( LLToolCompInspect::getInstanceFast()->isToolCameraActive() + && prev_tool == LLToolCamera::getInstanceFast() + && cur_tool == LLToolPie::getInstanceFast() ) { LLFloaterInspect * inspect_instance = LLFloaterReg::findTypedInstance<LLFloaterInspect>("inspect"); if(inspect_instance && inspect_instance->getVisible()) { - setTransientTool(LLToolCompInspect::getInstance()); + setTransientTool(LLToolCompInspect::getInstanceFast()); } } else @@ -260,7 +260,7 @@ void LLToolMgr::updateToolStatus() bool LLToolMgr::inEdit() { - return mBaseTool != LLToolPie::getInstance() && mBaseTool != gToolNull; + return mBaseTool != LLToolPie::getInstanceFast() && mBaseTool != gToolNull; } bool LLToolMgr::canEdit() diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 2370603d5a064173bc01d5e7119194b256620b6c..ae7172566d6e6a7e8fadc54d5c75083cda3f4768 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -891,7 +891,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) } } - LLSceneMonitor::getInstance()->fetchQueryResult(); + LLSceneMonitor::getInstanceFast()->fetchQueryResult(); LLGLState::checkStates(); LLGLState::checkClientArrays(); @@ -1064,7 +1064,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) { //capture the frame buffer. - LLSceneMonitor::getInstance()->capture(); + LLSceneMonitor::getInstanceFast()->capture(); } LLAppViewer::instance()->pingMainloopTimeout(STR_DISPLAY_RENDERUI); @@ -1317,12 +1317,12 @@ void render_ui(F32 zoom_factor, int subfield) set_current_modelview(copy_matrix(gGLLastModelView)); } - if(LLSceneMonitor::getInstance()->needsUpdate()) + if(LLSceneMonitor::getInstanceFast()->needsUpdate()) { LL_RECORD_BLOCK_TIME(FTM_RENDER_UI_SCENE_MON); gGL.pushMatrix(); gViewerWindow->setup2DRender(); - LLSceneMonitor::getInstance()->compare(); + LLSceneMonitor::getInstanceFast()->compare(); gViewerWindow->setup3DRender(); gGL.popMatrix(); } diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 1e84095523f1d76e504e6239563fc5563839aac7..e2822c27980e8d67d4aa8bb81c18aec28654e689 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -411,7 +411,7 @@ std::string LLViewerMedia::getCurrentUserAgent() // Just in case we need to check browser differences in A/B test // builds. - std::string channel = LLVersionInfo::instance().getChannel(); + std::string channel = LLVersionInfo::instanceFast().getChannel(); // append our magic version number string to the browser user agent id // See the HTTP 1.0 and 1.1 specifications for allowed formats: @@ -421,7 +421,7 @@ std::string LLViewerMedia::getCurrentUserAgent() // http://www.mozilla.org/build/revised-user-agent-strings.html std::ostringstream codec; codec << "SecondLife/"; - codec << LLVersionInfo::instance().getVersion(); + codec << LLVersionInfo::instanceFast().getVersion(); codec << " (" << channel << "; " << skin_name << " skin)"; LL_INFOS() << codec.str() << LL_ENDL; @@ -521,7 +521,7 @@ bool LLViewerMedia::isInterestingEnough(const LLVOVolume *object, const F64 &obj result = false; } // Focused? Then it is interesting! - else if (LLViewerMediaFocus::getInstance()->getFocusedObjectID() == object->getID()) + else if (LLViewerMediaFocus::getInstanceFast()->getFocusedObjectID() == object->getID()) { result = true; } @@ -837,7 +837,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg) { if(LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio()) { - LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade(); + LLViewerAudio::getInstanceFast()->stopInternetStreamWithAutoFade(); restore_parcel_audio = true; } } @@ -845,7 +845,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg) { if(gAudiop && LLViewerMedia::hasParcelAudio() && restore_parcel_audio && gSavedSettings.getBOOL("MediaTentativeAutoPlay")) { - LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLViewerMedia::getParcelAudioURL()); + LLViewerAudio::getInstanceFast()->startInternetStreamWithAutoFade(LLViewerMedia::getParcelAudioURL()); restore_parcel_audio = false; } } @@ -956,7 +956,7 @@ void LLViewerMedia::setAllMediaEnabled(bool val) { if (!LLViewerMedia::isParcelMediaPlaying() && LLViewerMedia::hasParcelMedia()) { - LLViewerParcelMedia::getInstance()->play(LLViewerParcelMgr::getInstance()->getAgentParcel()); + LLViewerParcelMedia::getInstanceFast()->play(LLViewerParcelMgr::getInstanceFast()->getAgentParcel()); } static LLCachedControl<bool> audio_streaming_music(gSavedSettings, "AudioStreamingMusic", true); @@ -972,16 +972,16 @@ void LLViewerMedia::setAllMediaEnabled(bool val) } else { - LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLViewerMedia::getParcelAudioURL()); + LLViewerAudio::getInstanceFast()->startInternetStreamWithAutoFade(LLViewerMedia::getParcelAudioURL()); } } } else { // This actually unloads the impl, as opposed to "stop"ping the media - LLViewerParcelMedia::getInstance()->stop(); + LLViewerParcelMedia::getInstanceFast()->stop(); if (gAudiop) { - LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade(); + LLViewerAudio::getInstanceFast()->stopInternetStreamWithAutoFade(); } } } @@ -1029,7 +1029,7 @@ void LLViewerMedia::setAllMediaPaused(bool val) { if (!LLViewerMedia::isParcelMediaPlaying() && LLViewerMedia::hasParcelMedia()) { - LLViewerParcelMedia::getInstance()->play(agent_parcel); + LLViewerParcelMedia::getInstanceFast()->play(agent_parcel); } static LLCachedControl<bool> audio_streaming_music(gSavedSettings, "AudioStreamingMusic", true); @@ -1045,30 +1045,30 @@ void LLViewerMedia::setAllMediaPaused(bool val) } else { - LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLViewerMedia::getParcelAudioURL()); + LLViewerAudio::getInstanceFast()->startInternetStreamWithAutoFade(LLViewerMedia::getParcelAudioURL()); } } } else { // This actually unloads the impl, as opposed to "stop"ping the media - LLViewerParcelMedia::getInstance()->stop(); + LLViewerParcelMedia::getInstanceFast()->stop(); if (gAudiop) { - LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade(); + LLViewerAudio::getInstanceFast()->stopInternetStreamWithAutoFade(); } } // remove play choice for current parcel if (agent_parcel && gAgent.getRegion()) { - LLViewerParcelAskPlay::getInstance()->resetSetting(gAgent.getRegion()->getRegionID(), agent_parcel->getLocalID()); + LLViewerParcelAskPlay::getInstanceFast()->resetSetting(gAgent.getRegion()->getRegionID(), agent_parcel->getLocalID()); } } ////////////////////////////////////////////////////////////////////////////////////////// bool LLViewerMedia::isParcelMediaPlaying() { - viewer_media_t media = LLViewerParcelMedia::getInstance()->getParcelMedia(); + viewer_media_t media = LLViewerParcelMedia::getInstanceFast()->getParcelMedia(); return (LLViewerMedia::hasParcelMedia() && media && media->hasMedia()); } @@ -1484,7 +1484,7 @@ bool LLViewerMedia::hasInWorldMedia() ////////////////////////////////////////////////////////////////////////////////////////// bool LLViewerMedia::hasParcelMedia() { - return !LLViewerParcelMedia::getInstance()->getURL().empty(); + return !LLViewerParcelMedia::getInstanceFast()->getURL().empty(); } ////////////////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp index 74073f451b304b56022cb000f4b616d0373eeae8..14fbcacbf61ec5626f83ca568dfe56956ce8973e 100644 --- a/indra/newview/llviewerparceloverlay.cpp +++ b/indra/newview/llviewerparceloverlay.cpp @@ -340,12 +340,20 @@ void LLViewerParcelOverlay::updateOverlayTexture() { return; } - const LLColor4U avail = LLUIColorTable::instance().getColor("PropertyColorAvail").get(); - const LLColor4U owned = LLUIColorTable::instance().getColor("PropertyColorOther").get(); - const LLColor4U group = LLUIColorTable::instance().getColor("PropertyColorGroup").get(); - const LLColor4U self = LLUIColorTable::instance().getColor("PropertyColorSelf").get(); - const LLColor4U for_sale = LLUIColorTable::instance().getColor("PropertyColorForSale").get(); - const LLColor4U auction = LLUIColorTable::instance().getColor("PropertyColorAuction").get(); + static const LLUIColor avail_color = LLUIColorTable::instance().getColor("PropertyColorAvail"); + static const LLUIColor owned_color = LLUIColorTable::instance().getColor("PropertyColorOther"); + static const LLUIColor group_color = LLUIColorTable::instance().getColor("PropertyColorGroup"); + static const LLUIColor self_color = LLUIColorTable::instance().getColor("PropertyColorSelf"); + static const LLUIColor for_sale_color = LLUIColorTable::instance().getColor("PropertyColorForSale"); + static const LLUIColor auction_color = LLUIColorTable::instance().getColor("PropertyColorAuction"); + + + const LLColor4U avail = avail_color.get(); + const LLColor4U owned = owned_color.get(); + const LLColor4U group = group_color.get(); + const LLColor4U self = self_color.get(); + const LLColor4U for_sale = for_sale_color.get(); + const LLColor4U auction = auction_color.get(); // Create the base texture. U8 *raw = mImageRaw->getData(); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index c23b4ab240eaafd6edcfb7cfb33fb9aaa7a5cdae..80dcbe34ddf6e7604af39aa212f901b4c42d90ac 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -491,7 +491,9 @@ class LLDebugText mBackRectCamera1.mBottom = -1; mBackRectCamera2 = mBackRectCamera1; - mBackColor = LLUIColorTable::instance().getColor( "MenuDefaultBgColor" ); + static LLUIColor debug_background_color = LLUIColorTable::instance().getColor("MenuDefaultBgColor"); + + mBackColor = debug_background_color; clearText(); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index f66d9e12af0e6a038325cf3d332f14cfe1b57c30..f9f5b409ff4db28a17bf9c66afbfd5629e990649 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -755,12 +755,12 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id, mDebugExistenceTimer.reset(); mLastAppearanceMessageTimer.reset(); - if(LLSceneMonitor::getInstance()->isEnabled()) + if(LLSceneMonitor::getInstanceFast()->isEnabled()) { - LLSceneMonitor::getInstance()->freezeAvatar((LLCharacter*)this); + LLSceneMonitor::getInstanceFast()->freezeAvatar((LLCharacter*)this); } - mVisuallyMuteSetting = LLVOAvatar::VisualMuteSettings(LLRenderMuteList::getInstance()->getSavedVisualMuteSetting(getID())); + mVisuallyMuteSetting = LLVOAvatar::VisualMuteSettings(LLRenderMuteList::getInstanceFast()->getSavedVisualMuteSetting(getID())); } std::string LLVOAvatar::avString() const