diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-05-15 11:16:27 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-05-15 11:16:27 +0300 |
commit | bccc10db9a90d365c353baebf443fde2030ce970 (patch) | |
tree | 2c2e1fd94b29667a809f8d7285d049f5ff5d424d /indra/newview/llavatarrendernotifier.cpp | |
parent | 531cd34f670170ade57f8813fe48012b61a1d3c2 (diff) | |
parent | bb3c36f5cbc0c3b542045fd27255eee24e03da22 (diff) |
Merge branch 'main' into marchcat/x-b-merge
# Conflicts:
# autobuild.xml
# indra/cmake/ConfigurePkgConfig.cmake
# indra/cmake/ICU4C.cmake
# indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.cpp
# indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.h
# indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h
# indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.cpp
# indra/media_plugins/gstreamer010/llmediaimplgstreamervidplug.h
# indra/media_plugins/gstreamer010/media_plugin_gstreamer010.cpp
# indra/newview/llappviewerlinux_api.h
# indra/newview/llappviewerlinux_api_dbus.cpp
# indra/newview/llappviewerlinux_api_dbus.h
# indra/newview/llfloateremojipicker.cpp
# indra/newview/lloutfitslist.cpp
Diffstat (limited to 'indra/newview/llavatarrendernotifier.cpp')
-rw-r--r-- | indra/newview/llavatarrendernotifier.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/indra/newview/llavatarrendernotifier.cpp b/indra/newview/llavatarrendernotifier.cpp index 8b09f7903d..61fc9d00f3 100644 --- a/indra/newview/llavatarrendernotifier.cpp +++ b/indra/newview/llavatarrendernotifier.cpp @@ -2,26 +2,26 @@ * @file llavatarrendernotifier.cpp * @author andreykproductengine * @date 2015-08-05 - * @brief - * + * @brief + * * $LicenseInfo:firstyear=2013&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2013, Linden Research, Inc. - * + * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License only. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. - * + * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ @@ -113,12 +113,12 @@ void LLAvatarRenderNotifier::displayNotification(bool show_over_limit) { mAgentComplexity = mLatestAgentComplexity; mShowOverLimitAgents = show_over_limit; - static LLCachedControl<U32> expire_delay(gSavedSettings, "ShowMyComplexityChanges", 20); + static LLCachedControl<U32> expire_delay(gSavedSettings, "ShowMyComplexityChanges", 20); - LLDate expire_date(LLDate::now().secondsSinceEpoch() + expire_delay); - LLSD args; - args["AGENT_COMPLEXITY"] = LLSD::Integer(mLatestAgentComplexity); - std::string notification_name; + LLDate expire_date(LLDate::now().secondsSinceEpoch() + expire_delay); + LLSD args; + args["AGENT_COMPLEXITY"] = LLSD::Integer(mLatestAgentComplexity); + std::string notification_name; if (mShowOverLimitAgents) { notification_name = "AgentComplexityWithVisibility"; @@ -128,19 +128,19 @@ void LLAvatarRenderNotifier::displayNotification(bool show_over_limit) mAgentsCount = mLatestAgentsCount; mOverLimitAgents = mLatestOverLimitAgents; mOverLimitPct = mLatestOverLimitPct; - } - else - { + } + else + { // no change in visibility, just update complexity notification_name = "AgentComplexity"; - } + } - if (mNotificationPtr != NULL && mNotificationPtr->getName() != notification_name) - { - // since unique tag works only for same notification, - // old notification needs to be canceled manually - LLNotifications::instance().cancel(mNotificationPtr); - } + if (mNotificationPtr != NULL && mNotificationPtr->getName() != notification_name) + { + // since unique tag works only for same notification, + // old notification needs to be canceled manually + LLNotifications::instance().cancel(mNotificationPtr); + } // log unconditionally LL_WARNS("AvatarRenderInfo") << notification_name << " " << args << LL_ENDL; @@ -158,21 +158,21 @@ void LLAvatarRenderNotifier::displayNotification(bool show_over_limit) bool LLAvatarRenderNotifier::isNotificationVisible() { - return mNotificationPtr != NULL && mNotificationPtr->isActive(); + return mNotificationPtr != NULL && mNotificationPtr->isActive(); } void LLAvatarRenderNotifier::updateNotificationRegion(U32 agentcount, U32 overLimit) { - if (agentcount == 0) - { - // Data not ready - return; - } + if (agentcount == 0) + { + // Data not ready + return; + } - // save current values for later use - mLatestAgentsCount = agentcount > overLimit ? agentcount - 1 : agentcount; // subtract self - mLatestOverLimitAgents = overLimit; - mLatestOverLimitPct = mLatestAgentsCount != 0 ? ((F32)overLimit / (F32)mLatestAgentsCount) * 100.0 : 0; + // save current values for later use + mLatestAgentsCount = agentcount > overLimit ? agentcount - 1 : agentcount; // subtract self + mLatestOverLimitAgents = overLimit; + mLatestOverLimitPct = mLatestAgentsCount != 0 ? ((F32)overLimit / (F32)mLatestAgentsCount) * 100.0 : 0; if (mAgentsCount == mLatestAgentsCount && mOverLimitAgents == mLatestOverLimitAgents) @@ -313,7 +313,7 @@ void LLHUDRenderNotifier::updateNotificationHUD(hud_complexity_list_t complexity { return; } - + // TODO: // Find a way to show message with list of issues, but without making it too large // and intrusive. |