summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2024-07-22 08:29:35 -0400
committerGitHub <noreply@github.com>2024-07-22 15:29:35 +0300
commit7ebbc58ae310b5c41efb3fe1460d63663ab92004 (patch)
tree031d0ad22e888a646ff20557854012574d1cd328 /indra/newview/llvoavatar.cpp
parent8a3c9a0b9d3bdf193b49f7f82378558c275948a6 (diff)
Cache various frequently accessed settings (#2080)
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index fadea01d3c..fcd2f74108 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -4070,12 +4070,14 @@ void LLVOAvatar::updateDebugText()
{
// Leave mDebugText uncleared here, in case a derived class has added some state first
- if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))
+ static LLCachedControl<bool> debug_av_appearance_message(gSavedSettings, "DebugAvatarAppearanceMessage");
+ if (debug_av_appearance_message)
{
updateAppearanceMessageDebugText();
}
- if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked"))
+ static LLCachedControl<bool> debug_av_composite_baked(gSavedSettings, "DebugAvatarCompositeBaked");
+ if (debug_av_composite_baked)
{
if (!mBakedTextureDebugText.empty())
addDebugText(mBakedTextureDebugText);
@@ -8592,7 +8594,8 @@ LLMotion* LLVOAvatar::findMotion(const LLUUID& id) const
// colorized if using deferred rendering.
void LLVOAvatar::debugColorizeSubMeshes(U32 i, const LLColor4& color)
{
- if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked"))
+ static LLCachedControl<bool> debug_av_composite_baked(gSavedSettings, "DebugAvatarCompositeBaked");
+ if (debug_av_composite_baked)
{
avatar_joint_mesh_list_t::iterator iter = mBakedTextureDatas[i].mJointMeshes.begin();
avatar_joint_mesh_list_t::iterator end = mBakedTextureDatas[i].mJointMeshes.end();