diff options
Diffstat (limited to 'indra/newview/llavatarrendernotifier.h')
-rw-r--r-- | indra/newview/llavatarrendernotifier.h | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/indra/newview/llavatarrendernotifier.h b/indra/newview/llavatarrendernotifier.h index 959bebef02..a169baef40 100644 --- a/indra/newview/llavatarrendernotifier.h +++ b/indra/newview/llavatarrendernotifier.h @@ -37,21 +37,32 @@ struct LLHUDComplexity { LLHUDComplexity() { + reset(); + } + void reset() + { + objectId = LLUUID::null; + objectName = ""; objectsCost = 0; objectsCount = 0; texturesCost = 0; texturesCount = 0; largeTexturesCount = 0; - texturesSizeTotal = 0; + texturesMemoryTotal = (F64Bytes)0; } + LLUUID objectId; + std::string objectName; + std::string jointName; U32 objectsCost; U32 objectsCount; U32 texturesCost; U32 texturesCount; U32 largeTexturesCount; - F64 texturesSizeTotal; + 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> @@ -107,12 +118,27 @@ public: LLHUDRenderNotifier(); ~LLHUDRenderNotifier(); - void updateNotificationHUD(LLHUDComplexity new_complexity); + void updateNotificationHUD(hud_complexity_list_t complexity); + bool isNotificationVisible(); private: - void displayHUDNotification(const char* message); + 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; }; |