diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2023-05-03 09:55:31 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2023-05-03 09:55:31 -0400 |
commit | 2a10bd406c9155d30a82657ce2ee532b3a677d83 (patch) | |
tree | 0d5094583c60c4d57b52532f0407b09523d8d79f /indra/newview/llvoavatar.cpp | |
parent | 2994833e7cc53670bd3303cb88054d7acee875cf (diff) |
DRTVWR-559: Replace debugLoggingEnabled() function with LL_DEBUGS().
The trouble with debugLoggingEnabled() is that it locked mutexes and searched
maps every time that call was reached. LL_DEBUGS() has the same functionality
(albeit with idiosyncratic syntax) but performs expensive lookups only once
per session, caching the result in a local static variable.
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r-- | indra/newview/llvoavatar.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index e38a6457f4..34771b6172 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -11070,8 +11070,9 @@ void LLVOAvatar::calculateUpdateRenderComplexity() // Diagnostic output to identify all avatar-related textures. // Does not affect rendering cost calculation. - if (isSelf() && debugLoggingEnabled("ARCdetail")) + if (isSelf()) { + LL_DEBUGS("ARCdetail"); // print any attachment textures we didn't already know about. for (LLVOVolume::texture_cost_t::iterator it = textures.begin(); it != textures.end(); ++it) { @@ -11080,17 +11081,17 @@ void LLVOAvatar::calculateUpdateRenderComplexity() && (all_textures.find(image_id) == all_textures.end())) { // attachment texture not previously seen. - LL_DEBUGS("ARCdetail") << "attachment_texture: " << image_id.asString() << LL_ENDL; + LL_CONT << "attachment_texture: " << image_id.asString() << '\n'; all_textures.insert(image_id); } } // print any avatar textures we didn't already know about - for (LLAvatarAppearanceDictionary::Textures::const_iterator iter = LLAvatarAppearance::getDictionary()->getTextures().begin(); + for (LLAvatarAppearanceDictionary::Textures::const_iterator iter = LLAvatarAppearance::getDictionary()->getTextures().begin(); iter != LLAvatarAppearance::getDictionary()->getTextures().end(); ++iter) { - const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = iter->second; + const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = iter->second; // TODO: MULTI-WEARABLE: handle multiple textures for self const LLViewerTexture* te_image = getImage(iter->first,0); if (!te_image) @@ -11100,10 +11101,11 @@ void LLVOAvatar::calculateUpdateRenderComplexity() continue; if (all_textures.find(image_id) == all_textures.end()) { - LL_DEBUGS("ARCdetail") << "local_texture: " << texture_dict->mName << ": " << image_id << LL_ENDL; + LL_CONT << "local_texture: " << texture_dict->mName << ": " << image_id << '\n'; all_textures.insert(image_id); } } + LL_ENDL; } if ( cost != mVisualComplexity ) |