summaryrefslogtreecommitdiff
path: root/indra/newview/llavatarrendernotifier.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llavatarrendernotifier.h')
-rw-r--r--indra/newview/llavatarrendernotifier.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/indra/newview/llavatarrendernotifier.h b/indra/newview/llavatarrendernotifier.h
index 2a2704de28..a169baef40 100644
--- a/indra/newview/llavatarrendernotifier.h
+++ b/indra/newview/llavatarrendernotifier.h
@@ -33,6 +33,36 @@
class LLViewerRegion;
+struct LLHUDComplexity
+{
+ LLHUDComplexity()
+ {
+ reset();
+ }
+ void reset()
+ {
+ objectId = LLUUID::null;
+ objectName = "";
+ objectsCost = 0;
+ objectsCount = 0;
+ texturesCost = 0;
+ texturesCount = 0;
+ largeTexturesCount = 0;
+ texturesMemoryTotal = (F64Bytes)0;
+ }
+ LLUUID objectId;
+ std::string objectName;
+ std::string jointName;
+ U32 objectsCost;
+ U32 objectsCount;
+ U32 texturesCost;
+ U32 texturesCount;
+ U32 largeTexturesCount;
+ F64Bytes texturesMemoryTotal;
+};
+
+typedef std::list<LLHUDComplexity> hud_complexity_list_t;
+
// Class to notify user about drastic changes in agent's render weights or if other agents
// reported that user's agent is too 'heavy' for their settings
class LLAvatarRenderNotifier : public LLSingleton<LLAvatarRenderNotifier>
@@ -81,4 +111,36 @@ private:
S32 mLastOutfitRezStatus;
};
+// Class to notify user about heavy set of HUD
+class LLHUDRenderNotifier : public LLSingleton<LLHUDRenderNotifier>
+{
+public:
+ LLHUDRenderNotifier();
+ ~LLHUDRenderNotifier();
+
+ void updateNotificationHUD(hud_complexity_list_t complexity);
+ bool isNotificationVisible();
+
+private:
+ enum EWarnLevel
+ {
+ WARN_NONE = -1,
+ WARN_TEXTURES = 0, // least important
+ WARN_CRAMPED,
+ WARN_HEAVY,
+ WARN_COST,
+ WARN_MEMORY, //most important
+ };
+
+ LLNotificationPtr mHUDNotificationPtr;
+
+ static EWarnLevel getWarningType(LLHUDComplexity object_complexity, LLHUDComplexity cmp_complexity);
+ void displayHUDNotification(EWarnLevel warn_type, LLUUID obj_id = LLUUID::null, std::string object_name = "", std::string joint_name = "");
+
+ LLHUDComplexity mReportedHUDComplexity;
+ EWarnLevel mReportedHUDWarning;
+ LLHUDComplexity mLatestHUDComplexity;
+ LLFrameTimer mHUDPopUpDelayTimer;
+};
+
#endif /* ! defined(LL_llavatarrendernotifier_H) */