summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp33
1 files changed, 22 insertions, 11 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index e085a945a8..86322e8421 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -10533,7 +10533,8 @@ void LLVOAvatar::accountRenderComplexityForObject(
const F32 max_attachment_complexity,
LLVOVolume::texture_cost_t& textures,
U32& cost,
- hud_complexity_list_t& hud_complexity_list)
+ hud_complexity_list_t& hud_complexity_list,
+ object_complexity_list_t& object_complexity_list)
{
if (attached_object && !attached_object->isHUDAttachment())
{
@@ -10552,12 +10553,12 @@ void LLVOAvatar::accountRenderComplexityForObject(
F32 attachment_volume_cost = 0;
F32 attachment_texture_cost = 0;
F32 attachment_children_cost = 0;
- const F32 animated_object_attachment_surcharge = 1000;
+ const F32 animated_object_attachment_surcharge = 1000;
- if (attached_object->isAnimatedObject())
- {
- attachment_volume_cost += animated_object_attachment_surcharge;
- }
+ if (attached_object->isAnimatedObject())
+ {
+ attachment_volume_cost += animated_object_attachment_surcharge;
+ }
attachment_volume_cost += volume->getRenderCost(textures);
const_child_list_t children = volume->getChildren();
@@ -10591,6 +10592,15 @@ void LLVOAvatar::accountRenderComplexityForObject(
<< LL_ENDL;
// Limit attachment complexity to avoid signed integer flipping of the wearer's ACI
cost += (U32)llclamp(attachment_total_cost, MIN_ATTACHMENT_COMPLEXITY, max_attachment_complexity);
+
+ if (isSelf())
+ {
+ LLObjectComplexity object_complexity;
+ object_complexity.objectName = attached_object->getAttachmentItemName();
+ object_complexity.objectId = attached_object->getAttachmentItemID();
+ object_complexity.objectCost = attachment_total_cost;
+ object_complexity_list.push_back(object_complexity);
+ }
}
}
}
@@ -10677,6 +10687,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
U32 cost = VISUAL_COMPLEXITY_UNKNOWN;
LLVOVolume::texture_cost_t textures;
hud_complexity_list_t hud_complexity_list;
+ object_complexity_list_t object_complexity_list;
for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++)
{
@@ -10720,7 +10731,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
if (volp && !volp->isAttachment())
{
accountRenderComplexityForObject(volp, max_attachment_complexity,
- textures, cost, hud_complexity_list);
+ textures, cost, hud_complexity_list, object_complexity_list);
}
}
@@ -10736,7 +10747,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
{
const LLViewerObject* attached_object = attachment_iter->get();
accountRenderComplexityForObject(attached_object, max_attachment_complexity,
- textures, cost, hud_complexity_list);
+ textures, cost, hud_complexity_list, object_complexity_list);
}
}
@@ -10795,13 +10806,13 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
mVisualComplexity = cost;
mVisualComplexityStale = false;
- static LLCachedControl<U32> show_my_complexity_changes(gSavedSettings, "ShowMyComplexityChanges", 20);
-
- if (isSelf() && show_my_complexity_changes)
+ if (isSelf())
{
// Avatar complexity
LLAvatarRenderNotifier::getInstance()->updateNotificationAgent(mVisualComplexity);
+ LLAvatarRenderNotifier::getInstance()->setObjectComplexityList(object_complexity_list);
+
// HUD complexity
LLHUDRenderNotifier::getInstance()->updateNotificationHUD(hud_complexity_list);
}