summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2015-08-26 12:07:16 -0400
committerOz Linden <oz@lindenlab.com>2015-08-26 12:07:16 -0400
commit712a4e70c81c1908e4e7668ff1695a9415ec4b71 (patch)
treeb5312334f90e4359dce19eb696954dbcca5f5fd6 /indra/newview/llvoavatar.cpp
parent206ef7a1562db19a4d8a41e55b7272c917f4b62c (diff)
refine fix for MAINT-5560 based on review feedback and to fix VS objection
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rwxr-xr-xindra/newview/llvoavatar.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 303b677dcf..5d83a20f50 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -8283,15 +8283,16 @@ void LLVOAvatar::idleUpdateRenderComplexity()
}
}
-void LLVOAvatar::modifyAttachmentGeometryBytes(S32 delta)
+void LLVOAvatar::addAttachmentSizes(U32 delta_bytes, F32 delta_area)
{
- mAttachmentGeometryBytes = llmax(mAttachmentGeometryBytes + delta, 0);
+ mAttachmentGeometryBytes += delta_bytes;
+ mAttachmentSurfaceArea += delta_area;
}
-void LLVOAvatar::modifyAttachmentSurfaceArea(F32 delta)
+void LLVOAvatar::subtractAttachmentSizes(U32 delta_bytes, F32 delta_area)
{
- F32 newval = mAttachmentSurfaceArea + delta;
- mAttachmentSurfaceArea = ( newval > 0.0 ? newval : 0.0 );
+ mAttachmentGeometryBytes = delta_bytes > mAttachmentGeometryBytes ? 0 : mAttachmentGeometryBytes - delta_bytes;
+ mAttachmentSurfaceArea = delta_area > mAttachmentSurfaceArea ? 0.0 : mAttachmentSurfaceArea - delta_area;
}
void LLVOAvatar::updateVisualComplexity()