diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2016-10-11 16:06:04 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2016-10-11 16:06:04 +0300 |
commit | 061b918deea9a07e9d3e44e18a86afefc3740898 (patch) | |
tree | 520a7109e91cb33fd0680e0b6cc7474b215f164a /indra/newview/llavatarrendernotifier.h | |
parent | 4617e07b3795e46c2037462f738ab81b35bd7294 (diff) | |
parent | 6be5e1eb01a5b12ee4152ae9d4f53110a4bea246 (diff) |
Merged in MAINT-6792 (pull request #22)
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; }; |