diff options
author | Rye Mutt <rye@alchemyviewer.org> | 2024-08-03 10:10:17 -0400 |
---|---|---|
committer | Rye Mutt <rye@alchemyviewer.org> | 2024-08-04 23:11:57 -0400 |
commit | c4e921828a41c0e759ee103c6cfdb2cc40c1a581 (patch) | |
tree | 4e26ceeb63a58d1490a976794911c1342cbdd473 /indra/newview/llvoavatar.cpp | |
parent | 874794ea584588457dfde7ef17c447e2a0eb46bb (diff) |
Optimization and cleanup of various color finds during draw
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 83df39d606..d5a8ee6cf8 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3531,7 +3531,9 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name) std::deque<LLChat>::iterator chat_iter = mChats.begin(); mNameText->clearString(); - LLColor4 new_chat = LLUIColorTable::instance().getColor( isSelf() ? "UserChatColor" : "AgentChatColor" ); + static const LLUIColor user_chat_color = LLUIColorTable::instance().getColor("UserChatColor"); + static const LLUIColor agent_chat_color = LLUIColorTable::instance().getColor("AgentChatColor"); + const LLColor4& new_chat = isSelf() ? user_chat_color : agent_chat_color; LLColor4 normal_chat = lerp(new_chat, LLColor4(0.8f, 0.8f, 0.8f, 1.f), 0.7f); LLColor4 old_chat = lerp(normal_chat, LLColor4(0.6f, 0.6f, 0.6f, 1.f), 0.7f); if (mTyping && mChats.size() >= MAX_BUBBLE_CHAT_UTTERANCES) |