summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2016-10-07 20:29:42 +0300
committerandreykproductengine <akleshchev@productengine.com>2016-10-07 20:29:42 +0300
commit6be5e1eb01a5b12ee4152ae9d4f53110a4bea246 (patch)
tree4c1b398334cf430dbe8528d4676a711f234fc6c1 /indra/newview/llvoavatar.cpp
parent5dd97bc2bd4924b0342068e697b5d45165225b76 (diff)
MAINT-6792 Improvements for HUD warning
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp31
1 files changed, 19 insertions, 12 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index f79249d6fa..fe8f54b900 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -8354,7 +8354,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
{
U32 cost = VISUAL_COMPLEXITY_UNKNOWN;
LLVOVolume::texture_cost_t textures;
- LLHUDComplexity hud_complexity;
+ hud_complexity_list_t hud_complexity_list;
for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++)
{
@@ -8441,9 +8441,15 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
const LLVOVolume* volume = attached_object->mDrawable->getVOVolume();
if (volume)
{
+ LLHUDComplexity hud_object_complexity;
+ hud_object_complexity.objectName = attached_object->getAttachmentItemName();
+ hud_object_complexity.objectId = attached_object->getAttachmentItemID();
+ std::string joint_name;
+ gAgentAvatarp->getAttachedPointName(attached_object->getAttachmentItemID(), joint_name);
+ hud_object_complexity.jointName = joint_name;
// get cost and individual textures
- hud_complexity.objectsCost += volume->getRenderCost(textures);
- hud_complexity.objectsCount++;
+ hud_object_complexity.objectsCost += volume->getRenderCost(textures);
+ hud_object_complexity.objectsCount++;
LLViewerObject::const_child_list_t& child_list = attached_object->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
@@ -8454,30 +8460,31 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
if (chld_volume)
{
// get cost and individual textures
- hud_complexity.objectsCost += chld_volume->getRenderCost(textures);
- hud_complexity.objectsCount++;
+ hud_object_complexity.objectsCost += chld_volume->getRenderCost(textures);
+ hud_object_complexity.objectsCount++;
}
}
- hud_complexity.texturesCount += textures.size();
+ hud_object_complexity.texturesCount += textures.size();
for (LLVOVolume::texture_cost_t::iterator volume_texture = textures.begin();
volume_texture != textures.end();
++volume_texture)
{
// add the cost of each individual texture (ignores duplicates)
- hud_complexity.texturesCost += volume_texture->second;
+ hud_object_complexity.texturesCost += volume_texture->second;
LLViewerFetchedTexture *tex = LLViewerTextureManager::getFetchedTexture(volume_texture->first);
if (tex)
{
- F64 size = tex->getMaxVirtualSize(); // in pixels
- hud_complexity.texturesSizeTotal += size;
- if (size >= HUD_OVERSIZED_TEXTURE_DATA_SIZE)
+ // Note: Texture memory might be incorect since texture might be still loading.
+ hud_object_complexity.texturesMemoryTotal += tex->getTextureMemory();
+ if (tex->getOriginalHeight() * tex->getOriginalWidth() >= HUD_OVERSIZED_TEXTURE_DATA_SIZE)
{
- hud_complexity.largeTexturesCount++;
+ hud_object_complexity.largeTexturesCount++;
}
}
}
+ hud_complexity_list.push_back(hud_object_complexity);
}
}
}
@@ -8547,7 +8554,7 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
LLAvatarRenderNotifier::getInstance()->updateNotificationAgent(mVisualComplexity);
// HUD complexity
- LLHUDRenderNotifier::getInstance()->updateNotificationHUD(hud_complexity);
+ LLHUDRenderNotifier::getInstance()->updateNotificationHUD(hud_complexity_list);
}
}
}