summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2022-11-17 15:04:38 +0200
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2022-11-17 15:04:38 +0200
commit0ee82f5264067e22013c49abf19344172c2f658b (patch)
tree24071cb8fda40782817f49c3d4812da83d84d3b9
parent72b1cfc76b6deda8771935b086f040b887ffe804 (diff)
SL-18641 fix for 'Always display friends in full detail' setting
-rw-r--r--indra/newview/lldrawpoolavatar.cpp2
-rw-r--r--indra/newview/llfloaterperformance.cpp2
-rw-r--r--indra/newview/llviewerpartsim.cpp2
-rw-r--r--indra/newview/llvoavatar.cpp20
-rw-r--r--indra/newview/llvoavatar.h8
-rw-r--r--indra/newview/pipeline.cpp6
6 files changed, 25 insertions, 15 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 02dea6b828..4ffa903cca 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -386,7 +386,7 @@ void LLDrawPoolAvatar::renderShadow(S32 pass)
LLVOAvatar::AvatarOverallAppearance oa = avatarp->getOverallAppearance();
BOOL impostor = !LLPipeline::sImpostorRender && avatarp->isImpostor();
// no shadows if the shadows are causing this avatar to breach the limit.
- if (avatarp->isTooSlowWithShadows() || impostor || (oa == LLVOAvatar::AOA_INVISIBLE))
+ if (avatarp->isTooSlow() || impostor || (oa == LLVOAvatar::AOA_INVISIBLE))
{
// No shadows for impostored (including jellydolled) or invisible avs.
return;
diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/llfloaterperformance.cpp
index 10595f5b6a..51eb137d82 100644
--- a/indra/newview/llfloaterperformance.cpp
+++ b/indra/newview/llfloaterperformance.cpp
@@ -372,7 +372,7 @@ void LLFloaterPerformance::populateNearbyList()
auto render_av_raw = LLPerfStats::StatsRecorder::get(AvType, avatar->getID(),LLPerfStats::StatType_t::RENDER_COMBINED);
LLPerfStats::bufferToggleLock.unlock();
- auto is_slow = avatar->isTooSlowWithShadows();
+ auto is_slow = avatar->isTooSlow();
LLSD item;
item["id"] = avatar->getID();
LLSD& row = item["columns"];
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp
index a440f3232a..449fd4ba43 100644
--- a/indra/newview/llviewerpartsim.cpp
+++ b/indra/newview/llviewerpartsim.cpp
@@ -716,7 +716,7 @@ void LLViewerPartSim::updateSimulation()
if (upd && vobj && (vobj->getPCode() == LL_PCODE_VOLUME))
{
- if(vobj->getAvatar() && vobj->getAvatar()->isTooComplex() && vobj->getAvatar()->isTooSlowWithShadows())
+ if(vobj->getAvatar() && vobj->getAvatar()->isTooComplex() && vobj->getAvatar()->isTooSlow())
{
upd = FALSE;
}
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 776223da9d..c0835e3ed0 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -3137,7 +3137,7 @@ void LLVOAvatar::idleUpdateLoadingEffect()
LLPartData::LL_PART_TARGET_POS_MASK );
// do not generate particles for dummy or overly-complex avatars
- if (!mIsDummy && !isTooComplex() && !isTooSlowWithShadows())
+ if (!mIsDummy && !isTooComplex() && !isTooSlow())
{
setParticleSource(particle_parameters, getID());
}
@@ -3718,7 +3718,7 @@ bool LLVOAvatar::isVisuallyMuted()
}
else
{
- muted = isTooComplex() || isTooSlowWithShadows();
+ muted = isTooComplex() || isTooSlow();
}
}
@@ -8288,6 +8288,18 @@ bool LLVOAvatar::isTooComplex() const
return too_complex;
}
+bool LLVOAvatar::isTooSlow() const
+{
+ static LLCachedControl<bool> always_render_friends(gSavedSettings, "AlwaysRenderFriends");
+ bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && always_render_friends);
+
+ if (render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER)
+ {
+ return false;
+ }
+ return mTooSlow;
+}
+
// use Avatar Render Time as complexity metric
// markARTStale - Mark stale and set the frameupdate to now so that we can wait at least one frame to get a revised number.
void LLVOAvatar::markARTStale()
@@ -11189,7 +11201,7 @@ LLVOAvatar::AvatarOverallAppearance LLVOAvatar::getOverallAppearance() const
{ // Always want to see this AV as an impostor
result = AOA_JELLYDOLL;
}
- else if (isTooComplex() || isTooSlowWithShadows())
+ else if (isTooComplex() || isTooSlow())
{
result = AOA_JELLYDOLL;
}
@@ -11216,7 +11228,7 @@ void LLVOAvatar::calcMutedAVColor()
new_color = LLColor4::grey4;
change_msg = " blocked: color is grey4";
}
- else if (!isTooComplex() && !isTooSlowWithShadows())
+ else if (!isTooComplex() && !isTooSlow())
{
new_color = LLColor4::white;
change_msg = " simple imposter ";
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index a27327d8a3..3429f47dc9 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -354,12 +354,10 @@ public:
// check and return current state relative to limits
// default will test only the geometry (combined=false).
// this allows us to disable shadows separately on complex avatars.
- inline bool isTooSlowWithShadows() const {return mTooSlow;};
+
inline bool isTooSlowWithoutShadows() const {return mTooSlowWithoutShadows;};
- inline bool isTooSlow(bool combined = false) const
- {
- return(combined?mTooSlow:mTooSlowWithoutShadows);
- }
+ bool isTooSlow() const;
+
void updateTooSlow();
bool isTooComplex() const;
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 500cea98fb..3e78c9b82c 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -5993,7 +5993,7 @@ void LLPipeline::calcNearbyLights(LLCamera& camera)
LLDrawable* drawable = light->drawable;
const LLViewerObject *vobj = light->drawable->getVObj();
if(vobj && vobj->getAvatar()
- && (vobj->getAvatar()->isTooComplex() || vobj->getAvatar()->isInMuteList() || vobj->getAvatar()->isTooSlowWithShadows())
+ && (vobj->getAvatar()->isTooComplex() || vobj->getAvatar()->isInMuteList() || vobj->getAvatar()->isTooSlow())
)
{
drawable->clearState(LLDrawable::NEARBY_LIGHT);
@@ -6072,7 +6072,7 @@ void LLPipeline::calcNearbyLights(LLCamera& camera)
continue;
}
LLVOAvatar * av = light->getAvatar();
- if (av && (av->isTooComplex() || av->isInMuteList() || av->isTooSlowWithShadows()))
+ if (av && (av->isTooComplex() || av->isInMuteList() || av->isTooSlow()))
{
// avatars that are already in the list will be removed by removeMutedAVsLights
continue;
@@ -10856,7 +10856,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar)
<< " is " << ( too_complex ? "" : "not ") << "too complex"
<< LL_ENDL;
- bool too_slow = avatar->isTooSlowWithShadows();
+ bool too_slow = avatar->isTooSlow();
pushRenderTypeMask();