diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 757dd6074b0466b5f33d543a58fb7e9d73476d86..e9ddac72e4559bc8fc6507d7096520dce05f7770 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -2036,7 +2036,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit) camera_position_global = focusPosGlobal + mCameraFocusOffset; } - auto& worldInst = LLWorld::instance(); + auto& worldInst = LLWorld::instanceFast(); if (!ALControlCache::DisableCameraConstraints && !gAgent.isGodlike()) { diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp index 9ca3e0022b8a424204bb63411930517679d584be..47416414190213206a24875e9bdec22e2b64f87b 100644 --- a/indra/newview/llcontrolavatar.cpp +++ b/indra/newview/llcontrolavatar.cpp @@ -567,7 +567,7 @@ void LLControlAvatar::updateAnimations() getAnimatedVolumes(volumes); // Rebuild mSignaledAnimations from the associated volumes. - auto& signaled_anim_map = LLObjectSignaledAnimationMap::instance().getMap(); + auto& signaled_anim_map = LLObjectSignaledAnimationMap::instanceFast().getMap(); std::map<LLUUID, S32> anims; for (LLVOVolume* volp : volumes) diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index eda47ff2bf38a376738778756ea159df349a2285..ea95540f95bb19ee20a663ff86d01348e4dbf0d7 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -260,7 +260,7 @@ void LLNetMap::draw() gGL.rotatef( rotation * RAD_TO_DEG, 0.f, 0.f, 1.f); } - auto& worldInst = LLWorld::instance(); + auto& worldInst = LLWorld::instanceFast(); // figure out where agent is S32 region_width = ll_round(worldInst.getRegionWidthInMeters()); diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 7440ce25ae9b4f59af0529489215a78c02fcff39..54acf28b3fef470ce02c355314436a80fa53c4df 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -5425,7 +5425,7 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data return (node->getObject() && node->getObject()->mID == mID); } } func(id); - LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode(&func); + LLSelectNode* node = LLSelectMgr::getInstanceFast()->getSelection()->getFirstNode(&func); if (!node) { @@ -5567,7 +5567,7 @@ void LLSelectMgr::processObjectPropertiesFamily(LLMessageSystem* msg, void** use return (node->getObject() && node->getObject()->mID == mID); } } func(id); - LLSelectNode* node = LLSelectMgr::getInstance()->mHoverObjects->getFirstNode(&func); + LLSelectNode* node = LLSelectMgr::getInstanceFast()->mHoverObjects->getFirstNode(&func); if (node) { diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp index cb356726e6aa4ea3c61f58a28966ee4e980b04a4..c95c7b8cde972cc2a823db725539cf1dcf89fce7 100644 --- a/indra/newview/llsurface.cpp +++ b/indra/newview/llsurface.cpp @@ -172,7 +172,7 @@ void LLSurface::create(const S32 grids_per_edge, mOriginGlobal.setVec(origin_global); - mPVArray.create(mGridsPerEdge, mGridsPerPatchEdge, LLWorld::getInstance()->getRegionScale()); + mPVArray.create(mGridsPerEdge, mGridsPerPatchEdge, LLWorld::getInstanceFast()->getRegionScale()); S32 number_of_grids = mGridsPerEdge * mGridsPerEdge; @@ -1188,7 +1188,7 @@ void LLSurface::setWaterHeight(F32 height) mWaterObjp->setPositionRegion(water_pos_region); if (changed) { - LLWorld::getInstance()->updateWaterObjects(); + LLWorld::getInstanceFast()->updateWaterObjects(); } } else diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp index 5c6bb60e939c10e10584adeaf1c1c6896484031b..85c393ca856c6ee5347fb22abcab2314bd5b536e 100644 --- a/indra/newview/lltoolgun.cpp +++ b/indra/newview/lltoolgun.cpp @@ -191,7 +191,7 @@ void LLToolGun::draw() myRotation.set(-myRotation.mQ[VX], -myRotation.mQ[VY], -myRotation.mQ[VZ], myRotation.mQ[VW]); LLWorld::pos_map_t positions; - LLWorld::getInstance()->getAvatars(&positions, gAgent.getPositionGlobal(), iff_range); + LLWorld::getInstanceFast()->getAvatars(&positions, gAgent.getPositionGlobal(), iff_range); for (const auto& position : positions) { const auto& id = position.first; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 0c163e952c52d041e017ebeb39071f29623c9c94..c96e116c55d79d764215d79228c4de99ae2efbbc 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -3640,7 +3640,7 @@ void LLViewerMediaImpl::calculateInterest() LLVOVolume *obj = *iter; llassert(obj); if (!obj) continue; - if(LLMuteList::getInstance() && + if(LLMuteList::instanceExists() && LLMuteList::getInstance()->isMuted(obj->getID())) { mIsMuted = true; @@ -3648,7 +3648,7 @@ void LLViewerMediaImpl::calculateInterest() else { // We won't have full permissions data for all objects. Attempt to mute objects when we can tell their owners are muted. - if (LLSelectMgr::getInstance()) + if (LLSelectMgr::instanceExists()) { LLPermissions* obj_perm = LLSelectMgr::getInstance()->findObjectPermissions(obj); if(obj_perm) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 72169b5284b0b6950e176a6640e7aaa3eb31a1cc..2c634e2031db19c4da3298bb8c4212572117654a 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -476,7 +476,7 @@ void process_logout_reply(LLMessageSystem* msg, void**) void process_layer_data(LLMessageSystem *mesgsys, void **user_data) { - LLViewerRegion *regionp = LLWorld::getInstance()->getRegion(mesgsys->getSender()); + LLViewerRegion *regionp = LLWorld::getInstanceFast()->getRegion(mesgsys->getSender()); LL_DEBUGS_ONCE("SceneLoadTiming") << "Received layer data" << LL_ENDL; @@ -4454,7 +4454,7 @@ void process_object_animation(LLMessageSystem *mesgsys, void **user_data) << uuid << " animation id " << animation_id << LL_ENDL; #endif } - LLObjectSignaledAnimationMap::instance().getMap()[uuid] = signaled_anims; + LLObjectSignaledAnimationMap::instanceFast().getMap()[uuid] = signaled_anims; LLViewerObject *objp = gObjectList.findObject(uuid); if (!objp) diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 88c391c0f1637759c8d9231473b8668a54d298f7..325f7c153438f149b9be06b2d4c989329d13684a 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -487,7 +487,7 @@ void LLViewerObject::markDead() if (flagCameraSource()) { - LLFollowCamMgr::getInstance()->removeFollowCamParams(mID); + LLFollowCamMgr::getInstanceFast()->removeFollowCamParams(mID); } sNumZombieObjects++; @@ -946,9 +946,9 @@ void LLViewerObject::removeChild(LLViewerObject *childp) if (childp->isSelected()) { - LLSelectMgr::getInstance()->deselectObjectAndFamily(childp); + LLSelectMgr::getInstanceFast()->deselectObjectAndFamily(childp); BOOL add_to_end = TRUE; - LLSelectMgr::getInstance()->selectObjectAndFamily(childp, add_to_end); + LLSelectMgr::getInstanceFast()->selectObjectAndFamily(childp, add_to_end); } } @@ -1138,7 +1138,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, U32 retval = 0x0; - auto& worldInst = LLWorld::instance(); + auto& worldInst = LLWorld::instanceFast(); // If region is removed from the list it is also deleted. if (!worldInst.isRegionListed(mRegionp)) @@ -2486,7 +2486,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, if (needs_refresh) { - LLSelectMgr::getInstance()->updateSelectionCenter(); + LLSelectMgr::getInstanceFast()->updateSelectionCenter(); dialog_refresh_all(); } @@ -2669,7 +2669,7 @@ void LLViewerObject::interpolateLinearMotion(const F64SecondsImplicit& frame_tim new_pos = new_pos + getPositionRegion(); new_v = new_v + vel; - auto& worldInst = LLWorld::instance(); + auto& worldInst = LLWorld::instanceFast(); // Clamp interpolated position to minimum underground and maximum region height LLVector3d new_pos_global = mRegionp->getPosGlobalFromRegion(new_pos); @@ -2837,7 +2837,7 @@ void LLViewerObject::doUpdateInventory( // make sure that the serial number does not match. deleteInventoryItem(item_id); LLPermissions perm(item->getPermissions()); - LLPermissions* obj_perm = LLSelectMgr::getInstance()->findObjectPermissions(this); + LLPermissions* obj_perm = LLSelectMgr::getInstanceFast()->findObjectPermissions(this); bool is_atomic = ((S32)LLAssetType::AT_OBJECT == item->getType()) ? false : true; if(obj_perm) { @@ -3151,7 +3151,7 @@ void LLViewerObject::updateControlAvatar() getControlAvatar()->updateAnimations(); if (isSelected()) { - LLSelectMgr::getInstance()->pauseAssociatedAvatars(); + LLSelectMgr::getInstanceFast()->pauseAssociatedAvatars(); } } } @@ -3765,7 +3765,7 @@ void LLViewerObject::setScale(const LLVector3 &scale, BOOL damped) { if (!mOnMap) { - llassert_always(LLWorld::getInstance()->getRegionFromHandle(getRegion()->getHandle())); + llassert_always(LLWorld::getInstanceFast()->getRegionFromHandle(getRegion()->getHandle())); gObjectList.addToMap(this); mOnMap = TRUE; @@ -4239,7 +4239,7 @@ LLNameValue *LLViewerObject::getNVPair(const std::string& name) const void LLViewerObject::updatePositionCaches() const { // If region is removed from the list it is also deleted. - if(mRegionp && LLWorld::instance().isRegionListed(mRegionp)) + if(mRegionp && LLWorld::instanceFast().isRegionListed(mRegionp)) { if (!isRoot()) { @@ -4257,7 +4257,7 @@ void LLViewerObject::updatePositionCaches() const const LLVector3d LLViewerObject::getPositionGlobal() const { // If region is removed from the list it is also deleted. - if(mRegionp && LLWorld::instance().isRegionListed(mRegionp)) + if(mRegionp && LLWorld::instanceFast().isRegionListed(mRegionp)) { LLVector3d position_global = mRegionp->getPosGlobalFromRegion(getPositionRegion()); @@ -4277,7 +4277,7 @@ const LLVector3d LLViewerObject::getPositionGlobal() const const LLVector3 &LLViewerObject::getPositionAgent() const { // If region is removed from the list it is also deleted. - if(mRegionp && LLWorld::instance().isRegionListed(mRegionp)) + if(mRegionp && LLWorld::instanceFast().isRegionListed(mRegionp)) { if (mDrawable.notNull() && (!mDrawable->isRoot() && getParent())) { @@ -5701,7 +5701,7 @@ bool LLViewerObject::isOwnerInMuteList(LLUUID id) } else { - muted = LLMuteList::getInstance()->isMuted(owner_id); + muted = LLMuteList::getInstanceFast()->isMuted(owner_id); const F64 SECONDS_BETWEEN_MUTE_UPDATES = 1; mCachedMuteListUpdateTime = now + SECONDS_BETWEEN_MUTE_UPDATES; @@ -5777,7 +5777,7 @@ void LLViewerObject::setParticleSource(const LLPartSysData& particle_parameters, mPartSourcep->setImage(image); } } - LLViewerPartSim::getInstance()->addPartSource(pss); + LLViewerPartSim::getInstanceFast()->addPartSource(pss); } void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& owner_id) @@ -5799,7 +5799,7 @@ void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& own { LLPointer<LLViewerPartSourceScript> pss = LLViewerPartSourceScript::unpackPSS(this, NULL, block_num); //If the owner is muted, don't create the system - if(LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagParticles)) return; + if(LLMuteList::getInstanceFast()->isMuted(owner_id, LLMute::flagParticles)) return; // We need to be able to deal with a particle source that hasn't changed, but still got an update! if (pss) @@ -5807,7 +5807,7 @@ void LLViewerObject::unpackParticleSource(const S32 block_num, const LLUUID& own // LL_INFOS() << "Making particle system with owner " << owner_id << LL_ENDL; pss->setOwnerUUID(owner_id); mPartSourcep = pss; - LLViewerPartSim::getInstance()->addPartSource(pss); + LLViewerPartSim::getInstanceFast()->addPartSource(pss); } } if (mPartSourcep) @@ -5847,14 +5847,14 @@ void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_ { LLPointer<LLViewerPartSourceScript> pss = LLViewerPartSourceScript::unpackPSS(this, NULL, dp, legacy); //If the owner is muted, don't create the system - if(LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagParticles)) return; + if(LLMuteList::getInstanceFast()->isMuted(owner_id, LLMute::flagParticles)) return; // We need to be able to deal with a particle source that hasn't changed, but still got an update! if (pss) { // LL_INFOS() << "Making particle system with owner " << owner_id << LL_ENDL; pss->setOwnerUUID(owner_id); mPartSourcep = pss; - LLViewerPartSim::getInstance()->addPartSource(pss); + LLViewerPartSim::getInstanceFast()->addPartSource(pss); } } if (mPartSourcep) @@ -6275,7 +6275,7 @@ BOOL LLViewerObject::permYouOwner() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLGridManager::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstanceFast()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -6312,7 +6312,7 @@ BOOL LLViewerObject::permOwnerModify() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLGridManager::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstanceFast()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -6336,7 +6336,7 @@ BOOL LLViewerObject::permModify() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLGridManager::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstanceFast()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -6360,7 +6360,7 @@ BOOL LLViewerObject::permCopy() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLGridManager::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstanceFast()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -6384,7 +6384,7 @@ BOOL LLViewerObject::permMove() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLGridManager::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstanceFast()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -6408,7 +6408,7 @@ BOOL LLViewerObject::permTransfer() const return TRUE; #else # ifdef TOGGLE_HACKED_GODLIKE_VIEWER - if (!LLGridManager::getInstance()->isInProductionGrid() + if (!LLGridManager::getInstanceFast()->isInProductionGrid() && (gAgent.getGodLevel() >= GOD_MAINTENANCE)) { return TRUE; @@ -7021,7 +7021,7 @@ class ObjectPhysicsProperties : public LLHTTPNode } } func(local_id); - LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstNode(&func); + LLSelectNode* node = LLSelectMgr::getInstanceFast()->getSelection()->getFirstNode(&func); if (node) { diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 6c474c62edbdb3e7738819dc3dbc0d8600acbd8d..b3cf06efc44266dd6e36c02da06c771db67c6c6a 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -287,11 +287,11 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, && update_type != OUT_TERSE_IMPROVED && objectp->mCreateSelected) { - if ( LLToolMgr::getInstance()->getCurrentTool() != LLToolPie::getInstance() ) + if ( LLToolMgr::getInstanceFast()->getCurrentTool() != LLToolPie::getInstanceFast() ) { // LL_INFOS() << "DEBUG selecting " << objectp->mID << " " // << objectp->mLocalID << LL_ENDL; - LLSelectMgr::getInstance()->selectObjectAndFamily(objectp); + LLSelectMgr::getInstanceFast()->selectObjectAndFamily(objectp); dialog_refresh_all(); } @@ -316,7 +316,7 @@ LLViewerObject* LLViewerObjectList::processObjectUpdateFromCache(LLVOCacheEntry* U32 local_id; LLPCode pcode = 0; LLUUID fullid; - LLViewerStatsRecorder& recorder = LLViewerStatsRecorder::instance(); + LLViewerStatsRecorder& recorder = LLViewerStatsRecorder::instanceFast(); // Cache Hit. record(LLStatViewer::OBJECT_CACHE_HIT_RATE, LLUnits::Ratio::fromValue(1)); @@ -457,7 +457,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, U64 region_handle; mesgsys->getU64Fast(_PREHASH_RegionData, _PREHASH_RegionHandle, region_handle); - LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(region_handle); + LLViewerRegion *regionp = LLWorld::getInstanceFast()->getRegionFromHandle(region_handle); if (!regionp) { @@ -467,7 +467,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, U8 compressed_dpbuffer[2048]; LLDataPackerBinaryBuffer compressed_dp(compressed_dpbuffer, 2048); - LLViewerStatsRecorder& recorder = LLViewerStatsRecorder::instance(); + LLViewerStatsRecorder& recorder = LLViewerStatsRecorder::instanceFast(); for (i = 0; i < num_objects; i++) { @@ -733,14 +733,14 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys, U64 region_handle; mesgsys->getU64Fast(_PREHASH_RegionData, _PREHASH_RegionHandle, region_handle); - LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(region_handle); + LLViewerRegion *regionp = LLWorld::getInstanceFast()->getRegionFromHandle(region_handle); if (!regionp) { LL_WARNS() << "Object update from unknown region! " << region_handle << LL_ENDL; return; } - LLViewerStatsRecorder& recorder = LLViewerStatsRecorder::instance(); + LLViewerStatsRecorder& recorder = LLViewerStatsRecorder::instanceFast(); for (S32 i = 0; i < num_objects; i++) { @@ -830,7 +830,9 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent) // Slam priorities for textures that we care about (hovered, selected, and focused) // Hovered // Assumes only one level deep of parenting - LLSelectNode* nodep = LLSelectMgr::instance().getHoverNode(); + auto& select_mgr = LLSelectMgr::instanceFast(); + + LLSelectNode* nodep = select_mgr.getHoverNode(); if (nodep) { objectp = nodep->getObject(); @@ -856,7 +858,7 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent) return true; } } func; - LLSelectMgr::getInstance()->getSelection()->applyToRootObjects(&func); + select_mgr.getSelection()->applyToRootObjects(&func); // Iterate through some of the objects and lazy update their texture priorities for (i = mCurLazyUpdateIndex; i < max_value; i++) @@ -1011,8 +1013,6 @@ void LLViewerObjectList::update(LLAgent &agent) } } - - fetchObjectCosts(); fetchPhysicsFlags(); @@ -1023,7 +1023,7 @@ void LLViewerObjectList::update(LLAgent &agent) // don't factor frames that were paused into the stats if (! mWasPaused) { - LLViewerStats::getInstance()->updateFrameStats(time_diff); + LLViewerStats::getInstanceFast()->updateFrameStats(time_diff); } /* @@ -1727,7 +1727,7 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset) { LL_RECORD_BLOCK_TIME(FTM_REGION_SHIFT); - LLWorld::getInstance()->shiftRegions(offset); + LLWorld::getInstanceFast()->shiftRegions(offset); } } @@ -1905,7 +1905,7 @@ void LLViewerObjectList::generatePickList(LLCamera &camera) std::vector<LLDrawable*> pick_drawables; - for (LLViewerRegion* region : LLWorld::getInstance()->getRegionList()) + for (LLViewerRegion* region : LLWorld::getInstanceFast()->getRegionList()) { for (U32 i = 0; i < LLViewerRegion::NUM_PARTITIONS; i++) { @@ -2324,12 +2324,12 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port) if (orphans_found && objectp->isSelected()) { - LLSelectNode* nodep = LLSelectMgr::getInstance()->getSelection()->findNode(objectp); + LLSelectNode* nodep = LLSelectMgr::getInstanceFast()->getSelection()->findNode(objectp); if (nodep && !nodep->mIndividualSelection) { // rebuild selection with orphans - LLSelectMgr::getInstance()->deselectObjectAndFamily(objectp); - LLSelectMgr::getInstance()->selectObjectAndFamily(objectp); + LLSelectMgr::getInstanceFast()->deselectObjectAndFamily(objectp); + LLSelectMgr::getInstanceFast()->selectObjectAndFamily(objectp); } } } diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 8dbefbd84e1f8b3ca9e2f4ede9a5f36a28b12bf9..a48635fc95ed9f4f66982b73647c763a65db034b 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -736,7 +736,7 @@ void LLViewerRegion::loadObjectCache() if(LLVOCache::instanceExists()) { - LLVOCache::getInstance()->readFromCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap) ; + LLVOCache::getInstanceFast()->readFromCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap) ; if (mImpl->mCacheMap.empty()) { mCacheDirty = TRUE; @@ -762,7 +762,7 @@ void LLViewerRegion::saveObjectCache() const F32 start_time_threshold = 600.0f; //seconds bool removal_enabled = sVOCacheCullingEnabled && (mRegionTimer.getElapsedTimeF32() > start_time_threshold); //allow to remove invalid objects from object cache file. - LLVOCache::getInstance()->writeToCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap, mCacheDirty, removal_enabled) ; + LLVOCache::getInstanceFast()->writeToCache(mHandle, mImpl->mCacheID, mImpl->mCacheMap, mCacheDirty, removal_enabled) ; mCacheDirty = FALSE; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 87ab372e7b0f7732e844143ce00031ca51ff5609..089830d63e8eb11738b9f181e1d34cda982473a9 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2593,8 +2593,8 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time) BOOL detailed_update = updateCharacter(agent); static LLUICachedControl<bool> visualizers_in_calls("ShowVoiceVisualizersInCalls", false); - bool voice_enabled = (visualizers_in_calls || LLVoiceClient::getInstance()->inProximalChannel()) && - LLVoiceClient::getInstance()->getVoiceEnabled(mID); + bool voice_enabled = (visualizers_in_calls || LLVoiceClient::getInstanceFast()->inProximalChannel()) && + LLVoiceClient::getInstanceFast()->getVoiceEnabled(mID); idleUpdateVoiceVisualizer( voice_enabled ); idleUpdateMisc( detailed_update ); @@ -2700,7 +2700,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) // Notice the calls to "gAwayTimer.reset()". This resets the timer that determines how long the avatar has been // "away", so that the avatar doesn't lapse into away-mode (and slump over) while the user is still talking. //----------------------------------------------------------------------------------------------------------------- - if (LLVoiceClient::getInstance()->getIsSpeaking( mID )) + if (LLVoiceClient::getInstanceFast()->getIsSpeaking( mID )) { if (!mVoiceVisualizer->getCurrentlySpeaking()) { @@ -2709,7 +2709,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) //printf( "gAwayTimer.reset();\n" ); } - mVoiceVisualizer->setSpeakingAmplitude( LLVoiceClient::getInstance()->getCurrentPower( mID ) ); + mVoiceVisualizer->setSpeakingAmplitude( LLVoiceClient::getInstanceFast()->getCurrentPower( mID ) ); if( isSelf() ) { @@ -2772,7 +2772,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) if (detailed_update) { LL_RECORD_BLOCK_TIME(FTM_ATTACHMENT_UPDATE); - auto& selectMgr = LLSelectMgr::instance(); + auto& selectMgr = LLSelectMgr::instanceFast(); for (const auto& attach_point_pair : mAttachmentPoints) { LLViewerJointAttachment* attachment = attach_point_pair.second; @@ -2953,7 +2953,7 @@ F32 LLVOAvatar::calcMorphAmount() void LLVOAvatar::idleUpdateLipSync(bool voice_enabled) { // Use the Lipsync_Ooh and Lipsync_Aah morphs for lip sync - auto& voiceClient = LLVoiceClient::instance(); + auto& voiceClient = LLVoiceClient::instanceFast(); if ( voice_enabled && mLastRezzedStatus > 0 // no point updating lip-sync for clouds && (voiceClient.lipSyncEnabled()) @@ -2999,9 +2999,9 @@ void LLVOAvatar::idleUpdateLoadingEffect() if (isSelf()) { LL_INFOS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible" << LL_ENDL; - LLAppearanceMgr::instance().onFirstFullyVisible(); + LLAppearanceMgr::instanceFast().onFirstFullyVisible(); - ALAOEngine::instance().onLoginComplete(); + ALAOEngine::instanceFast().onLoginComplete(); } else { @@ -3650,7 +3650,7 @@ void LLVOAvatar::idleUpdateBelowWater() BOOL was_below_water = mBelowWater; mBelowWater = avatar_height < water_height; if (isSelf() && mBelowWater != was_below_water) - ALAOEngine::instance().checkBelowWater(mBelowWater); + ALAOEngine::instanceFast().checkBelowWater(mBelowWater); } void LLVOAvatar::slamPosition() @@ -3719,7 +3719,7 @@ bool LLVOAvatar::isInMuteList() const } else { - muted = LLMuteList::getInstance()->isMuted(getID()); + muted = LLMuteList::getInstanceFast()->isMuted(getID()); const F64 SECONDS_BETWEEN_MUTE_UPDATES = 1; mCachedMuteListUpdateTime = now + SECONDS_BETWEEN_MUTE_UPDATES; @@ -3787,7 +3787,7 @@ void LLVOAvatar::updateAppearanceMessageDebugText() 1, central_bake_version); std::string origin_string = bakedTextureOriginInfo(); debug_line += " [" + origin_string + "]"; - S32 curr_cof_version = LLAppearanceMgr::instance().getCOFVersion(); + S32 curr_cof_version = LLAppearanceMgr::instanceFast().getCOFVersion(); S32 last_request_cof_version = mLastUpdateRequestCOFVersion; S32 last_received_cof_version = mLastUpdateReceivedCOFVersion; if (isSelf()) @@ -4111,8 +4111,8 @@ void LLVOAvatar::updateFootstepSounds() LLVector3d foot_pos_global = gAgent.getPosGlobalFromAgent(foot_pos_agent); - if (LLViewerParcelMgr::getInstance()->canHearSound(foot_pos_global) - && !LLMuteList::getInstance()->isMuted(getID(), LLMute::flagObjectSounds)) + if (LLViewerParcelMgr::getInstanceFast()->canHearSound(foot_pos_global) + && !LLMuteList::getInstanceFast()->isMuted(getID(), LLMute::flagObjectSounds)) { gAudiop->triggerSound(step_sound_id, getID(), STEP_VOLUME, LLAudioEngine::AUDIO_TYPE_AMBIENT, foot_pos_global); } @@ -4435,7 +4435,7 @@ void LLVOAvatar::updateRootPositionAndRotation(LLAgent& agent, F32 speed, bool w LLVector3 normal; resolveHeightGlobal(root_pos, ground_under_pelvis, normal); F32 foot_to_ground = (F32) (root_pos.mdV[VZ] - mPelvisToFoot - ground_under_pelvis.mdV[VZ]); - BOOL in_air = ((!LLWorld::getInstance()->getRegionFromPosGlobal(ground_under_pelvis)) || + BOOL in_air = ((!LLWorld::getInstanceFast()->getRegionFromPosGlobal(ground_under_pelvis)) || foot_to_ground > FOOT_GROUND_COLLISION_TOLERANCE); if (in_air && !mInAir) @@ -5806,7 +5806,7 @@ const std::string LLVOAvatar::getImageURL(const U8 te, const LLUUID &uuid) { llassert(isIndexBakedTexture(ETextureIndex(te))); std::string url = ""; - const std::string& appearance_service_url = LLAppearanceMgr::instance().getAppearanceServiceURL(); + const std::string& appearance_service_url = LLAppearanceMgr::instanceFast().getAppearanceServiceURL(); if (appearance_service_url.empty()) { // Probably a server-side issue if we get here: @@ -5840,7 +5840,7 @@ void LLVOAvatar::resolveHeightAgent(const LLVector3 &in_pos_agent, LLVector3 &ou void LLVOAvatar::resolveRayCollisionAgent(const LLVector3d start_pt, const LLVector3d end_pt, LLVector3d &out_pos, LLVector3 &out_norm) { LLViewerObject *obj; - LLWorld::getInstance()->resolveStepHeightGlobal(this, start_pt, end_pt, out_pos, out_norm, &obj); + LLWorld::getInstanceFast()->resolveStepHeightGlobal(this, start_pt, end_pt, out_pos, out_norm, &obj); } void LLVOAvatar::resolveHeightGlobal(const LLVector3d &inPos, LLVector3d &outPos, LLVector3 &outNorm) @@ -5849,7 +5849,7 @@ void LLVOAvatar::resolveHeightGlobal(const LLVector3d &inPos, LLVector3d &outPos LLVector3d p0 = inPos + zVec; LLVector3d p1 = inPos - zVec; LLViewerObject *obj; - LLWorld::getInstance()->resolveStepHeightGlobal(this, p0, p1, outPos, outNorm, &obj); + LLWorld::getInstanceFast()->resolveStepHeightGlobal(this, p0, p1, outPos, outNorm, &obj); if (!obj) { mStepOnLand = TRUE; @@ -6013,8 +6013,8 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL if (gAudiop) { LLVector3d char_pos_global = gAgent.getPosGlobalFromAgent(getCharacterPosition()); - if (LLViewerParcelMgr::getInstance()->canHearSound(char_pos_global) - && !LLMuteList::getInstance()->isMuted(getID(), LLMute::flagObjectSounds)) + if (LLViewerParcelMgr::getInstanceFast()->canHearSound(char_pos_global) + && !LLMuteList::getInstanceFast()->isMuted(getID(), LLMute::flagObjectSounds)) { // RN: uncomment this to play on typing sound at fixed volume once sound engine is fixed // to support both spatialized and non-spatialized instances of the same sound @@ -6156,7 +6156,7 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset) LLUUID remap_id; if(isSelf()) { - remap_id = ALAOEngine::getInstance()->override(id, true); + remap_id = ALAOEngine::getInstanceFast()->override(id, true); if(remap_id.isNull()) { remap_id = remapMotionID(id); @@ -6203,7 +6203,7 @@ BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate) LLUUID remap_id; if(isSelf()) { - remap_id = ALAOEngine::getInstance()->override(id, false); + remap_id = ALAOEngine::getInstanceFast()->override(id, false); if (remap_id.isNull()) { remap_id = remapMotionID(id); @@ -6945,7 +6945,7 @@ void LLVOAvatar::getGround(const LLVector3 &in_pos_agent, LLVector3 &out_pos_age p1_global = gAgent.getPosGlobalFromAgent(in_pos_agent) - z_vec; LLViewerObject *obj; LLVector3d out_pos_global; - LLWorld::getInstance()->resolveStepHeightGlobal(this, p0_global, p1_global, out_pos_global, outNorm, &obj); + LLWorld::getInstanceFast()->resolveStepHeightGlobal(this, p0_global, p1_global, out_pos_global, outNorm, &obj); out_pos_agent = gAgent.getPosAgentFromGlobal(out_pos_global); } @@ -7465,8 +7465,8 @@ const LLViewerJointAttachment *LLVOAvatar::attachObject(LLViewerObject *viewer_o if (viewer_object->isSelected()) { - LLSelectMgr::getInstance()->updateSelectionCenter(); - LLSelectMgr::getInstance()->updatePointAt(); + LLSelectMgr::getInstanceFast()->updateSelectionCenter(); + LLSelectMgr::getInstanceFast()->updatePointAt(); } viewer_object->refreshBakeTexture(); @@ -7730,9 +7730,9 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object) gAgentCamera.changeCameraToMouselook(); } - if (gAgentCamera.getFocusOnAvatar() && LLToolMgr::getInstance()->inEdit()) + if (gAgentCamera.getFocusOnAvatar() && LLToolMgr::getInstanceFast()->inEdit()) { - LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); + LLSelectNode* node = LLSelectMgr::getInstanceFast()->getSelection()->getFirstRootNode(); if (node && node->mValid) { LLViewerObject* root_object = node->getObject(); @@ -7786,13 +7786,15 @@ void LLVOAvatar::getOffObject() if (sit_object) { stopMotionFromSource(sit_object->getID()); - LLFollowCamMgr::getInstance()->setCameraActive(sit_object->getID(), FALSE); + + auto& followcam_mgr = LLFollowCamMgr::instanceFast(); + followcam_mgr.setCameraActive(sit_object->getID(), FALSE); LLViewerObject::const_child_list_t& child_list = sit_object->getChildren(); for (LLViewerObject* child_objectp : child_list) { stopMotionFromSource(child_objectp->getID()); - LLFollowCamMgr::getInstance()->setCameraActive(child_objectp->getID(), FALSE); + followcam_mgr.setCameraActive(child_objectp->getID(), FALSE); } } @@ -8201,7 +8203,7 @@ void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapse record["elapsed"] = elapsed; record["completed"] = completed; U32 grid_x(0), grid_y(0); - if (!isDead() && getRegion() && LLWorld::instance().isRegionListed(getRegion())) + if (!isDead() && getRegion() && LLWorld::instanceFast().isRegionListed(getRegion())) { record["central_bake_version"] = LLSD::Integer(getRegion()->getCentralBakeVersion()); grid_from_region_handle(getRegion()->getHandle(), &grid_x, &grid_y); diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 22f808f54cd9fe7535daaf22ec7fa1782f1abe18..c26452c1faf0d9e0a3277c6f66fba16b92b6357f 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1338,7 +1338,7 @@ BOOL LLVOAvatarSelf::detachAttachmentIntoInventory(const LLUUID &item_id) LLViewerObject *found_obj = gObjectList.findObject(item_id); if (found_obj) { - LLSelectMgr::getInstance()->remove(found_obj); + LLSelectMgr::getInstanceFast()->remove(found_obj); } // Error checking in case this object was attached to an invalid point @@ -2851,16 +2851,16 @@ void LLVOAvatarSelf::setHoverOffset(const LLVector3& hover_offset, bool send_upd //------------------------------------------------------------------------ BOOL LLVOAvatarSelf::needsRenderBeam() { - LLTool *tool = LLToolMgr::getInstance()->getCurrentTool(); + LLTool *tool = LLToolMgr::getInstanceFast()->getCurrentTool(); - BOOL is_touching_or_grabbing = (tool == LLToolGrab::getInstance() && LLToolGrab::getInstance()->isEditing()); - if (LLToolGrab::getInstance()->getEditingObject() && - LLToolGrab::getInstance()->getEditingObject()->isAttachment()) + BOOL is_touching_or_grabbing = (tool == LLToolGrab::getInstanceFast() && LLToolGrab::getInstanceFast()->isEditing()); + if (LLToolGrab::getInstanceFast()->getEditingObject() && + LLToolGrab::getInstanceFast()->getEditingObject()->isAttachment()) { // don't render selection beam on hud objects is_touching_or_grabbing = FALSE; } - return is_touching_or_grabbing || (getAttachmentState() & AGENT_STATE_EDITING && LLSelectMgr::getInstance()->shouldShowSelection()); + return is_touching_or_grabbing || (getAttachmentState() & AGENT_STATE_EDITING && LLSelectMgr::getInstanceFast()->shouldShowSelection()); } // static diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index b225408f99bac7edcc6cbd9fea1d914eb887a027..b419c8f612a82c73151b29363d7c919adf256657 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -455,7 +455,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, if(LLVOCache::instanceExists() && getRegion()) { - LLVOCache::getInstance()->removeEntry(getRegion()->getHandle()) ; + LLVOCache::getInstanceFast()->removeEntry(getRegion()->getHandle()) ; } LL_WARNS() << "Bogus TE data in " << getID() << LL_ENDL; @@ -2336,7 +2336,7 @@ S32 LLVOVolume::setTEMaterialID(const U8 te, const LLMaterialID& pMaterialID) #endif if (res) { - LLMaterialMgr::instance().getTE(getRegion()->getRegionID(), pMaterialID, te, boost::bind(&LLVOVolume::setTEMaterialParamsCallbackTE, getID(), _1, _2, _3)); + LLMaterialMgr::instanceFast().getTE(getRegion()->getRegionID(), pMaterialID, te, boost::bind(&LLVOVolume::setTEMaterialParamsCallbackTE, getID(), _1, _2, _3)); setChanged(ALL_CHANGED); if (!mDrawable.isNull()) @@ -5211,7 +5211,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, // [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c const LLViewerObject* pObj = facep->getViewerObject(); bool selected = pObj->isSelected(); - if ( (pObj->isSelected() && LLSelectMgr::getInstance()->mHideSelectedObjects) && + if ( (pObj->isSelected() && LLSelectMgr::getInstanceFast()->mHideSelectedObjects) && ( (!RlvActions::isRlvEnabled()) || ( ((!pObj->isHUDAttachment()) || (!gRlvAttachmentLocks.isLockedAttachment(pObj->getRootEdit()))) && (RlvActions::canEdit(pObj)) ) ) )