summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-05-03 09:55:31 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-05-03 09:55:31 -0400
commit2a10bd406c9155d30a82657ce2ee532b3a677d83 (patch)
tree0d5094583c60c4d57b52532f0407b09523d8d79f /indra/newview/llvovolume.cpp
parent2994833e7cc53670bd3303cb88054d7acee875cf (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/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp43
1 files changed, 20 insertions, 23 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index da5a505d3b..e45d5d4b5f 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1617,15 +1617,14 @@ BOOL LLVOVolume::updateLOD()
if (lod_changed)
{
- if (debugLoggingEnabled("AnimatedObjectsLinkset"))
- {
- if (isAnimatedObject() && isRiggedMesh())
- {
- std::string vobj_name = llformat("Vol%p", this);
- F32 est_tris = getEstTrianglesMax();
- LL_DEBUGS("AnimatedObjectsLinkset") << vobj_name << " updateLOD to " << getLOD() << ", tris " << est_tris << LL_ENDL;
- }
- }
+ LL_DEBUGS("AnimatedObjectsLinkset");
+ if (isAnimatedObject() && isRiggedMesh())
+ {
+ std::string vobj_name = llformat("Vol%p", this);
+ F32 est_tris = getEstTrianglesMax();
+ LL_CONT << vobj_name << " updateLOD to " << getLOD() << ", tris " << est_tris;
+ }
+ LL_ENDL;
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE);
mLODChanged = TRUE;
@@ -4532,15 +4531,14 @@ const LLMatrix4& LLVOVolume::getWorldMatrix(LLXformMatrix* xform) const
void LLVOVolume::markForUpdate(BOOL priority)
{
- if (debugLoggingEnabled("AnimatedObjectsLinkset"))
+ LL_DEBUGS("AnimatedObjectsLinkset");
+ if (isAnimatedObject() && isRiggedMesh())
{
- if (isAnimatedObject() && isRiggedMesh())
- {
- std::string vobj_name = llformat("Vol%p", this);
- F32 est_tris = getEstTrianglesMax();
- LL_DEBUGS("AnimatedObjectsLinkset") << vobj_name << " markForUpdate, tris " << est_tris << LL_ENDL;
- }
+ std::string vobj_name = llformat("Vol%p", this);
+ F32 est_tris = getEstTrianglesMax();
+ LL_CONT << vobj_name << " markForUpdate, tris " << est_tris;
}
+ LL_ENDL;
if (mDrawable)
{
@@ -6098,15 +6096,14 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
if (!vobj) continue;
- if (debugLoggingEnabled("AnimatedObjectsLinkset"))
+ LL_DEBUGS("AnimatedObjectsLinkset");
+ if (vobj->isAnimatedObject() && vobj->isRiggedMesh())
{
- if (vobj->isAnimatedObject() && vobj->isRiggedMesh())
- {
- std::string vobj_name = llformat("Vol%p", vobj);
- F32 est_tris = vobj->getEstTrianglesMax();
- LL_DEBUGS("AnimatedObjectsLinkset") << vobj_name << " rebuildMesh, tris " << est_tris << LL_ENDL;
- }
+ std::string vobj_name = llformat("Vol%p", vobj);
+ F32 est_tris = vobj->getEstTrianglesMax();
+ LL_CONT << vobj_name << " rebuildMesh, tris " << est_tris;
}
+ LL_ENDL;
if (vobj->isNoLOD()) continue;
vobj->preRebuild();