refine fix for MAINT-5560 based on review feedback and to fix VS objection
parent
206ef7a156
commit
712a4e70c8
|
|
@ -268,8 +268,10 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio
|
|||
|
||||
LLSD info = LLSD::emptyMap();
|
||||
U32 avatar_complexity = avatar->getVisualComplexity();
|
||||
if (avatar_complexity > 0)
|
||||
if (avatar_complexity > 0)
|
||||
{
|
||||
// the weight/complexity is unsigned, but LLSD only stores signed integers,
|
||||
// so if it's over that (which would be ridiculously high), just store the maximum signed int value
|
||||
info[KEY_WEIGHT] = (S32)(avatar_complexity < S32_MAX ? avatar_complexity : S32_MAX);
|
||||
info[KEY_TOO_COMPLEX] = LLSD::Boolean(avatar->isTooComplex());
|
||||
agents[avatar->getID().asString()] = info;
|
||||
|
|
|
|||
|
|
@ -862,8 +862,7 @@ void LLSpatialGroup::handleDestruction(const TreeNode* node)
|
|||
{
|
||||
if (bridge->mAvatar.notNull())
|
||||
{
|
||||
bridge->mAvatar->modifyAttachmentGeometryBytes( -mGeometryBytes );
|
||||
bridge->mAvatar->modifyAttachmentSurfaceArea( -mSurfaceArea );
|
||||
bridge->mAvatar->subtractAttachmentSizes( mGeometryBytes, mSurfaceArea );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -258,9 +258,9 @@ public:
|
|||
|
||||
U32 getVisualComplexity() { return mVisualComplexity; }; // Numbers calculated here by rendering AV
|
||||
S32 getAttachmentGeometryBytes() { return mAttachmentGeometryBytes; }; // number of bytes in attached geometry
|
||||
void modifyAttachmentGeometryBytes(S32 delta);
|
||||
F32 getAttachmentSurfaceArea() { return mAttachmentSurfaceArea; }; // estimated surface area of attachments
|
||||
void modifyAttachmentSurfaceArea(F32 delta);
|
||||
void addAttachmentSizes(U32 delta_bytes, F32 delta_area);
|
||||
void subtractAttachmentSizes(U32 delta_bytes, F32 delta_area);
|
||||
|
||||
U32 getReportedVisualComplexity() { return mReportedVisualComplexity; }; // Numbers as reported by the SL server
|
||||
void setReportedVisualComplexity(U32 value) { mReportedVisualComplexity = value; };
|
||||
|
|
|
|||
|
|
@ -4703,8 +4703,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
|
|||
|
||||
if (pAvatarVO)
|
||||
{
|
||||
pAvatarVO->modifyAttachmentGeometryBytes( -group->mGeometryBytes );
|
||||
pAvatarVO->modifyAttachmentSurfaceArea( -group->mSurfaceArea );
|
||||
pAvatarVO->subtractAttachmentSizes( group->mGeometryBytes, group->mSurfaceArea );
|
||||
}
|
||||
|
||||
group->mGeometryBytes = 0;
|
||||
|
|
@ -5258,8 +5257,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
|
|||
|
||||
if (pAvatarVO)
|
||||
{
|
||||
pAvatarVO->modifyAttachmentGeometryBytes( group->mGeometryBytes );
|
||||
pAvatarVO->modifyAttachmentSurfaceArea( group->mSurfaceArea );
|
||||
pAvatarVO->addAttachmentSizes( group->mGeometryBytes, group->mSurfaceArea );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue