From 255bb8504d6191358bd94e838d2f9e5360577128 Mon Sep 17 00:00:00 2001 From: Brad Linden <46733234+brad-linden@users.noreply.github.com> Date: Wed, 14 Feb 2024 09:54:46 -0800 Subject: [PATCH 01/15] Update cla.yaml allowlist to clear spurious errors (#804) --- .github/workflows/cla.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cla.yaml b/.github/workflows/cla.yaml index fa180c66c9..b4b2565889 100644 --- a/.github/workflows/cla.yaml +++ b/.github/workflows/cla.yaml @@ -23,3 +23,4 @@ jobs: path-to-signatures: signatures.json remote-organization-name: secondlife remote-repository-name: cla-signatures + allowlist: callum@mbp.localdomain From 3d1445013337068960b31b4a648bf5df17d01341 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 22 Feb 2024 00:02:25 +0200 Subject: [PATCH 02/15] triage#100 Fix invalid interest mode Agent needs these strings before values were initialized so made values a bit more global. --- indra/newview/llagent.cpp | 6 +++--- indra/newview/llfloater360capture.cpp | 2 +- indra/newview/llviewermenu.cpp | 8 ++++---- indra/newview/llviewerregion.cpp | 5 +---- indra/newview/llviewerregion.h | 8 +++++--- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 4d8ba3fff2..fb0d3bd58c 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -405,7 +405,7 @@ LLAgent::LLAgent() : mHttpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID), mTeleportState(TELEPORT_NONE), mRegionp(NULL), - mInterestListMode(LLViewerRegion::IL_MODE_DEFAULT), + mInterestListMode(IL_MODE_DEFAULT), mAgentOriginGlobal(), mPositionGlobal(), @@ -999,9 +999,9 @@ void LLAgent::capabilityReceivedCallback(const LLUUID ®ion_id, LLViewerRegion LLAppViewer::instance()->updateNameLookupUrl(regionp); } - if (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360) + if (gAgent.getInterestListMode() == IL_MODE_360) { - gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360); + gAgent.changeInterestListMode(IL_MODE_360); } } } diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index ce8e4b4452..d5efc15e35 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -67,7 +67,7 @@ LLFloater360Capture::LLFloater360Capture(const LLSD& key) mStartILMode = gAgent.getInterestListMode(); // send everything to us for as long as this floater is open - gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360); + gAgent.changeInterestListMode(IL_MODE_360); } LLFloater360Capture::~LLFloater360Capture() diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 591e60da44..2415402ebd 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1262,13 +1262,13 @@ public: bool handleEvent(const LLSD &userdata) { // Toggle the mode - regions will get updated - if (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360) + if (gAgent.getInterestListMode() == IL_MODE_360) { - gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_DEFAULT); + gAgent.changeInterestListMode(IL_MODE_DEFAULT); } else { - gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360); + gAgent.changeInterestListMode(IL_MODE_360); } return true; } @@ -1278,7 +1278,7 @@ class LLAdvancedCheckInterestList360Mode : public view_listener_t { bool handleEvent(const LLSD& userdata) { - return (gAgent.getInterestListMode() == LLViewerRegion::IL_MODE_360); + return (gAgent.getInterestListMode() == IL_MODE_360); } }; diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 4621ed7ec1..67f88285ca 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -105,9 +105,6 @@ S32 LLViewerRegion::sLastCameraUpdated = 0; S32 LLViewerRegion::sNewObjectCreationThrottle = -1; LLViewerRegion::vocache_entry_map_t LLViewerRegion::sRegionCacheCleanup; -const std::string LLViewerRegion::IL_MODE_DEFAULT = "default"; -const std::string LLViewerRegion::IL_MODE_360 = "360"; - typedef std::map CapabilityMap; static void log_capabilities(const CapabilityMap &capmap); @@ -3438,7 +3435,7 @@ void LLViewerRegion::setInterestListMode(const std::string &new_mode) { mInterestListMode = new_mode; - if (mInterestListMode != std::string(IL_MODE_DEFAULT) && mInterestListMode != std::string(IL_MODE_360)) + if (mInterestListMode != IL_MODE_DEFAULT && mInterestListMode != IL_MODE_360) { LL_WARNS("360Capture") << "Region " << getRegionID() << " setInterestListMode() invalid interest list mode: " << mInterestListMode << ", setting to default" << LL_ENDL; diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index be12cf032d..2fb313b60c 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -52,6 +52,11 @@ const U32 MAX_OBJECT_CACHE_ENTRIES = 50000; // Region handshake flags const U32 REGION_HANDSHAKE_SUPPORTS_SELF_APPEARANCE = 1U << 2; +// Interest list mode, +// in use by agent and region classes so must exist before region classes +const std::string IL_MODE_DEFAULT = "default"; +const std::string IL_MODE_360 = "360"; + class LLEventPoll; class LLVLComposition; class LLViewerObject; @@ -505,9 +510,6 @@ public: void resetInterestList(); - static const std::string IL_MODE_DEFAULT; - static const std::string IL_MODE_360; - private: static S32 sNewObjectCreationThrottle; LLViewerRegionImpl * mImpl; From 3010f627e5eef4a5c1c37af64364445c04149318 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 22 Feb 2024 15:51:42 +0100 Subject: [PATCH 03/15] Replaced an overlooked BOOL in lllegacyatmospherics.h --- indra/newview/lllegacyatmospherics.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/lllegacyatmospherics.h b/indra/newview/lllegacyatmospherics.h index d48f3040c3..9dec90f03d 100644 --- a/indra/newview/lllegacyatmospherics.h +++ b/indra/newview/lllegacyatmospherics.h @@ -267,7 +267,7 @@ protected: F32 mHazeConcentration; F32 mCloudDensity; F32 mWind; - BOOL mInitialized; + bool mInitialized; LLVector3 mLastLightingDirection; LLColor3 mLastTotalAmbient; F32 mAmbientScale; From 4b24b0d933fa701720d876639d2bbdd9b834b725 Mon Sep 17 00:00:00 2001 From: Vir Linden <60274682+vir-linden@users.noreply.github.com> Date: Thu, 22 Feb 2024 10:28:10 -0500 Subject: [PATCH 04/15] Create issue_template.md Issue template for the "blank issue" option --- .github/ISSUE_TEMPLATE/issue_template.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/issue_template.md diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md new file mode 100644 index 0000000000..96e71e64f5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -0,0 +1,3 @@ +--- +labels: triage +--- From e452eeb81685b82581b7a3893b4cdbf0546a401c Mon Sep 17 00:00:00 2001 From: Vir Linden <60274682+vir-linden@users.noreply.github.com> Date: Thu, 22 Feb 2024 11:24:55 -0500 Subject: [PATCH 05/15] Update issue_template.md --- .github/ISSUE_TEMPLATE/issue_template.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md index 96e71e64f5..b78a5f7774 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -1,3 +1,5 @@ --- +name: default issue +description: template for default new issue if no template is selected labels: triage --- From b9ac5e843331e34d9ec64ae60c4d2fef2994d3a7 Mon Sep 17 00:00:00 2001 From: Vir Linden <60274682+vir-linden@users.noreply.github.com> Date: Thu, 22 Feb 2024 11:26:54 -0500 Subject: [PATCH 06/15] Update issue_template.md --- .github/ISSUE_TEMPLATE/issue_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md index b78a5f7774..0a106ca1e2 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -1,5 +1,5 @@ --- name: default issue -description: template for default new issue if no template is selected +about: template for default new issue if no template is selected labels: triage --- From ffef19843b79c53aa710ed475d526f0d8f91866b Mon Sep 17 00:00:00 2001 From: Vir Linden <60274682+vir-linden@users.noreply.github.com> Date: Thu, 22 Feb 2024 11:28:44 -0500 Subject: [PATCH 07/15] Delete .github/ISSUE_TEMPLATE/issue_template.md --- .github/ISSUE_TEMPLATE/issue_template.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/issue_template.md diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md deleted file mode 100644 index 0a106ca1e2..0000000000 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: default issue -about: template for default new issue if no template is selected -labels: triage ---- From 0f2248ea12713822c546e362487aa94bb29e2899 Mon Sep 17 00:00:00 2001 From: Brad Linden <46733234+brad-linden@users.noreply.github.com> Date: Thu, 22 Feb 2024 13:01:49 -0800 Subject: [PATCH 08/15] Improving issue templates. (#877) making ordering explicit, and disabling blank issue submission to force triage label to be set. --- .github/ISSUE_TEMPLATE/{bug.yaml => 10-bug.yaml} | 0 .../{enhancement.md => 20-enhancement.md} | 0 .github/ISSUE_TEMPLATE/30-blank.yaml | 10 ++++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + 4 files changed, 11 insertions(+) rename .github/ISSUE_TEMPLATE/{bug.yaml => 10-bug.yaml} (100%) rename .github/ISSUE_TEMPLATE/{enhancement.md => 20-enhancement.md} (100%) create mode 100644 .github/ISSUE_TEMPLATE/30-blank.yaml diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/10-bug.yaml similarity index 100% rename from .github/ISSUE_TEMPLATE/bug.yaml rename to .github/ISSUE_TEMPLATE/10-bug.yaml diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/20-enhancement.md similarity index 100% rename from .github/ISSUE_TEMPLATE/enhancement.md rename to .github/ISSUE_TEMPLATE/20-enhancement.md diff --git a/.github/ISSUE_TEMPLATE/30-blank.yaml b/.github/ISSUE_TEMPLATE/30-blank.yaml new file mode 100644 index 0000000000..abe2623378 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/30-blank.yaml @@ -0,0 +1,10 @@ +name: Blank Issue +description: Don’t see your issue here? Open a blank issue. +labels: [triage] +body: +- type: textarea + attributes: + label: Description + description: Please describe your issue. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 75fa187132..f2d58f5f65 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,3 +1,4 @@ +blank_issues_enabled: false contact_links: - name: 💬 Community Feedback (Canny) url: https://feedback.secondlife.com From 27ad2a11af43133726853067875fc4be45f77354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20N=C3=A6sbye=20Christensen?= Date: Fri, 23 Feb 2024 00:08:38 +0100 Subject: [PATCH 09/15] remove another unused old macOS file --- indra/newview/CMakeLists.txt | 1 - indra/newview/macmain.h | 44 ------------------------------------ 2 files changed, 45 deletions(-) delete mode 100644 indra/newview/macmain.h diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 52593cca5b..af25447564 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1355,7 +1355,6 @@ set(viewer_HEADER_FILES llworldmapview.h llxmlrpclistener.h llxmlrpctransaction.h - macmain.h noise.h pipeline.h roles_constants.h diff --git a/indra/newview/macmain.h b/indra/newview/macmain.h deleted file mode 100644 index 11c909a8c3..0000000000 --- a/indra/newview/macmain.h +++ /dev/null @@ -1,44 +0,0 @@ -/** - * @file macmain.h - * @brief Main Mac viewer defines - * - * $LicenseInfo:firstyear=2003&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, 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$ - */ - -/* main.h */ - -#define rMenuBar 128 /* menu bar */ - -#define mApple 128 /* Apple menu */ -#define iAbout 1 - -#define mFile 129 /* File menu */ -#define iNew 1 -#define iClose 4 -#define iQuitSeparator 10 -#define iQuit 11 - -#define mEdit 130 /* Edit menu */ - -#define kAboutBox 200 /* Dialog resource for About box */ - -#define kSleepTime 32767 From 5dcc0606a8512159660c652cb25e7f29292f2df0 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 23 Feb 2024 04:18:03 +0200 Subject: [PATCH 10/15] Issue#880 Crash on a dead pointer in a chat session --- indra/newview/llconversationmodel.cpp | 26 ++++++++-------- indra/newview/llfloaterimsessiontab.cpp | 41 +++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 14 deletions(-) diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 9ec4fb085b..fe5428d7f5 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -353,22 +353,20 @@ void LLConversationItemSession::clearParticipants() void LLConversationItemSession::clearAndDeparentModels() { - std::for_each(mChildren.begin(), mChildren.end(), - [](LLFolderViewModelItem* c) + for (LLFolderViewModelItem* child : mChildren) + { + if (child->getNumRefs() == 0) { - if (c->getNumRefs() == 0) - { - // LLConversationItemParticipant can be created but not assigned to any view, - // it was waiting for an "add_participant" event to be processed - delete c; - } - else - { - // Model is still assigned to some view/widget - c->setParent(NULL); - } + // LLConversationItemParticipant can be created but not assigned to any view, + // it was waiting for an "add_participant" event to be processed + delete child; } - ); + else + { + // Model is still assigned to some view/widget + child->setParent(NULL); + } + } mChildren.clear(); } diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 005e9f68ee..6c2649984f 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -99,6 +99,26 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id) LLFloaterIMSessionTab::~LLFloaterIMSessionTab() { delete mRefreshTimer; + + LLFloaterIMContainer* im_container = LLFloaterIMContainer::findInstance(); + if (im_container) + { + LLParticipantList* session = dynamic_cast(im_container->getSessionModel(mSessionID)); + if (session) + { + for (const conversations_widgets_map::value_type& widget_pair : mConversationsWidgets) + { + LLFolderViewItem* widget = widget_pair.second; + LLFolderViewModelItem* item_vmi = widget->getViewModelItem(); + if (item_vmi && item_vmi->getNumRefs() == 1) + { + // This is the last pointer, remove participant from session + // before participant gets deleted on destroyView. + session->removeChild(item_vmi); + } + } + } + } } //static @@ -545,6 +565,27 @@ void LLFloaterIMSessionTab::removeConversationViewParticipant(const LLUUID& part LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,participant_id); if (widget) { + LLFolderViewModelItem* item_vmi = widget->getViewModelItem(); + if (item_vmi && item_vmi->getNumRefs() == 1) + { + // This is the last pointer, remove participant from session + // before participant gets deleted on destroyView. + // + // Floater (widget) and participant's view can simultaneously + // co-own the model, in which case view is responsible for + // the deletion and floater is free to clear and recreate + // the list, yet there are cases where only widget owns + // the pointer so it should do the cleanup. + // See "add_participant". + // + // Todo: If it keeps causing issues turn participants + // into LLPointers in the session + LLParticipantList* session = getParticipantList(); + if (session) + { + session->removeChild(item_vmi); + } + } widget->destroyView(); } mConversationsWidgets.erase(participant_id); From d31de6afb2ac9f659efc13c438df727372fcac08 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 24 Feb 2024 00:54:57 +0200 Subject: [PATCH 11/15] Issue#884 Crash on ~LLSearchEditor Crash seems to be specific to LLFilterEditor and only in a couple specific floaters. Based on older calltacks, commiting on exit was crashing. So I'm making sure that panels that potentially do not own the element in question clean the callback in case panels get deleted before the search editor. --- indra/llui/llsearcheditor.cpp | 7 +++++++ indra/llui/llsearcheditor.h | 2 +- indra/newview/llfloaterimsessiontab.cpp | 1 - indra/newview/llpanelgrouproles.cpp | 4 +++- indra/newview/llpanelgrouproles.h | 1 + indra/newview/llpanelpeople.cpp | 13 +++++++++---- indra/newview/llpanelpeople.h | 5 +++++ 7 files changed, 26 insertions(+), 7 deletions(-) diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp index 78bd06b67e..13051998bd 100644 --- a/indra/llui/llsearcheditor.cpp +++ b/indra/llui/llsearcheditor.cpp @@ -104,6 +104,13 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) } } +LLSearchEditor::~LLSearchEditor() +{ + mKeystrokeCallback = NULL; + mTextChangedCallback = NULL; + setCommitOnFocusLost(false); +} + //virtual void LLSearchEditor::draw() { diff --git a/indra/llui/llsearcheditor.h b/indra/llui/llsearcheditor.h index b332967f9b..3f8c6323b0 100644 --- a/indra/llui/llsearcheditor.h +++ b/indra/llui/llsearcheditor.h @@ -74,7 +74,7 @@ protected: friend class LLUICtrlFactory; public: - virtual ~LLSearchEditor() {} + virtual ~LLSearchEditor(); /*virtual*/ void draw(); diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 6c2649984f..fd2d3095b3 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -470,7 +470,6 @@ void LLFloaterIMSessionTab::appendMessage(const LLChat& chat, const LLSD &args) { im_box->setTimeNow(mSessionID,chat.mFromID); } - LLChat& tmp_chat = const_cast(chat); diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index b5d4712868..6c81eb3ea1 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -437,6 +437,7 @@ LLPanelGroupSubTab::LLPanelGroupSubTab() LLPanelGroupSubTab::~LLPanelGroupSubTab() { + mSearchCommitConnection.disconnect(); } bool LLPanelGroupSubTab::postBuildSubTab(LLView* root) @@ -469,7 +470,8 @@ bool LLPanelGroupSubTab::postBuild() mSearchEditor = findChild("filter_input", recurse); if (mSearchEditor) // SubTab doesn't implement this, only some of derived classes { - mSearchEditor->setCommitCallback(boost::bind(&LLPanelGroupSubTab::setSearchFilter, this, _2)); + // panel + mSearchCommitConnection = mSearchEditor->setCommitCallback(boost::bind(&LLPanelGroupSubTab::setSearchFilter, this, _2)); } return LLPanelGroupTab::postBuild(); diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index a4ae81eb60..3fa96213e5 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -136,6 +136,7 @@ protected: LLPanel* mFooter; LLFilterEditor* mSearchEditor; + boost::signals2::connection mSearchCommitConnection; std::string mSearchFilter; diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index a480c79504..da2206aefb 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -577,6 +577,11 @@ LLPanelPeople::~LLPanelPeople() delete mFriendListUpdater; delete mRecentListUpdater; + mNearbyFilterCommitConnection.disconnect(); + mFriedsFilterCommitConnection.disconnect(); + mGroupsFilterCommitConnection.disconnect(); + mRecentFilterCommitConnection.disconnect(); + if(LLVoiceClient::instanceExists()) { LLVoiceClient::getInstance()->removeObserver(this); @@ -613,10 +618,10 @@ bool LLPanelPeople::postBuild() { S32 max_premium = LLAgentBenefitsMgr::get("Premium").getGroupMembershipLimit(); - getChild("nearby_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); - getChild("friends_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); - getChild("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); - getChild("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); + mNearbyFilterCommitConnection = getChild("nearby_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); + mFriedsFilterCommitConnection = getChild("friends_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); + mGroupsFilterCommitConnection = getChild("groups_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); + mRecentFilterCommitConnection = getChild("recent_filter_input")->setCommitCallback(boost::bind(&LLPanelPeople::onFilterEdit, this, _2)); if(LLAgentBenefitsMgr::current().getGroupMembershipLimit() < max_premium) { diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 807384f50c..058f34aa2f 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -147,6 +147,11 @@ private: Updater* mRecentListUpdater; Updater* mButtonsUpdater; LLHandle< LLFloater > mPicker; + + boost::signals2::connection mNearbyFilterCommitConnection; + boost::signals2::connection mFriedsFilterCommitConnection; + boost::signals2::connection mGroupsFilterCommitConnection; + boost::signals2::connection mRecentFilterCommitConnection; }; #endif //LL_LLPANELPEOPLE_H From c8d5974f998ac223412ea3fe2f93613c86d50908 Mon Sep 17 00:00:00 2001 From: Beq Date: Tue, 27 Feb 2024 16:43:28 +0000 Subject: [PATCH 12/15] BUG-234595/Jira-public-Issue#11494 Mac texture loading/unloading This removes the "special case" for Mac which was resulting in values a few orders of magnitude smaller than on windows. --- indra/newview/llviewertexturelist.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 30e08d1fa9..cea9c91295 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -905,10 +905,6 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag min_scale = llmax(min_scale*min_scale, 0.1f); vsize /= min_scale; - -#if LL_DARWIN - vsize /= 1.f + LLViewerTexture::sDesiredDiscardBias*(1.f+face->getDrawable()->mDistanceWRTCamera*bias_distance_scale); -#else vsize /= LLViewerTexture::sDesiredDiscardBias; vsize /= llmax(1.f, (LLViewerTexture::sDesiredDiscardBias-1.f) * (1.f + face->getDrawable()->mDistanceWRTCamera * bias_distance_scale)); @@ -919,7 +915,6 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag { // further reduce by discard bias when off screen or occluded vsize /= LLViewerTexture::sDesiredDiscardBias; } -#endif // if a GLTF material is present, ignore that face // as far as this texture stats go, but update the GLTF material // stats From e160758b5c32f7b4b9622a5c25c7c53070395c7d Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 1 Mar 2024 13:48:46 +0100 Subject: [PATCH 13/15] Convert remaining TRUE/FALSE to true/false --- indra/llcorehttp/_httpservice.cpp | 2 +- indra/llimage/tests/llimageworker_test.cpp | 2 +- indra/llinventory/tests/inventorymisc_test.cpp | 4 ++-- .../tests/lltemplatemessagedispatcher_test.cpp | 8 ++++---- indra/llmessage/tests/llxfer_file_test.cpp | 2 +- indra/llprimitive/tests/llprimitive_test.cpp | 14 +++++++------- indra/llxml/llcontrol.cpp | 4 ++-- indra/llxml/tests/llcontrol_test.cpp | 6 +++--- indra/newview/tests/lllogininstance_test.cpp | 10 +++++----- indra/newview/tests/llsechandler_basic_test.cpp | 2 +- indra/newview/tests/llviewerhelputil_test.cpp | 2 +- indra/test/llsaleinfo_tut.cpp | 8 ++++---- indra/test/lltemplatemessagebuilder_tut.cpp | 2 +- indra/test/message_tut.cpp | 2 +- 14 files changed, 34 insertions(+), 34 deletions(-) diff --git a/indra/llcorehttp/_httpservice.cpp b/indra/llcorehttp/_httpservice.cpp index 294acd7f63..88ddf5b995 100644 --- a/indra/llcorehttp/_httpservice.cpp +++ b/indra/llcorehttp/_httpservice.cpp @@ -317,7 +317,7 @@ void HttpService::threadRun(LLCoreInt::HttpThread * thread) } catch (std::bad_alloc&) { - LLMemory::logMemoryInfo(TRUE); + LLMemory::logMemoryInfo(true); //output possible call stacks to log file. LLError::LLCallStacks::print(); diff --git a/indra/llimage/tests/llimageworker_test.cpp b/indra/llimage/tests/llimageworker_test.cpp index 0a97b739b0..b0212af66e 100644 --- a/indra/llimage/tests/llimageworker_test.cpp +++ b/indra/llimage/tests/llimageworker_test.cpp @@ -150,7 +150,7 @@ namespace tut ensure("LLImageDecodeThread: threaded constructor failed", mThread != NULL); // Insert something in the queue bool done = false; - LLImageDecodeThread::handle_t decodeHandle = mThread->decodeImage(NULL, 0, FALSE, new responder_test(&done)); + LLImageDecodeThread::handle_t decodeHandle = mThread->decodeImage(NULL, 0, false, new responder_test(&done)); // Verifies we get back a valid handle ensure("LLImageDecodeThread: threaded decodeImage(), returned handle is null", decodeHandle != 0); // Wait till the thread has time to handle the work order (though it doesn't do much per work order...) diff --git a/indra/llinventory/tests/inventorymisc_test.cpp b/indra/llinventory/tests/inventorymisc_test.cpp index 039fa938dd..0f38dd9104 100644 --- a/indra/llinventory/tests/inventorymisc_test.cpp +++ b/indra/llinventory/tests/inventorymisc_test.cpp @@ -374,7 +374,7 @@ namespace tut LLPointer src1 = create_random_inventory_item(); std::ostringstream ostream; - src1->exportLegacyStream(ostream, TRUE); + src1->exportLegacyStream(ostream, true); std::istringstream istream(ostream.str()); LLPointer src2 = new LLInventoryItem(); @@ -496,7 +496,7 @@ namespace tut LLPointer src1 = create_random_inventory_cat(); std::ostringstream ostream; - src1->exportLegacyStream(ostream, TRUE); + src1->exportLegacyStream(ostream, true); std::istringstream istream(ostream.str()); LLPointer src2 = new LLInventoryCategory(); diff --git a/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp b/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp index fd4f10f39a..3f87a4aff6 100644 --- a/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp +++ b/indra/llmessage/tests/lltemplatemessagedispatcher_test.cpp @@ -84,7 +84,7 @@ namespace tut mMessageName = "MessageName"; gUdpDispatchWasCalled = false; gClearRecvWasCalled = false; - gValidateMessage = FALSE; + gValidateMessage = false; mMessage["body"]["binary-template-data"] = std::vector(); } @@ -121,7 +121,7 @@ namespace tut { LLTemplateMessageReader* pReader = NULL; LLTemplateMessageDispatcher t(*pReader); - gValidateMessage = TRUE; + gValidateMessage = true; std::vector vector_data; fillVector(vector_data, gBinaryTemplateData); mMessage["body"]["binary-template-data"] = vector_data; @@ -138,7 +138,7 @@ namespace tut std::vector vector_data; fillVector(vector_data, gBinaryTemplateData); mMessage["body"]["binary-template-data"] = vector_data; - gValidateMessage = FALSE; + gValidateMessage = false; t.dispatch(mMessageName, mMessage, mResponsePtr); ensure("clear received message was called", gClearRecvWasCalled); } @@ -149,7 +149,7 @@ namespace tut { LLTemplateMessageReader* pReader = NULL; LLTemplateMessageDispatcher t(*pReader); - gValidateMessage = TRUE; + gValidateMessage = true; std::vector vector_data; fillVector(vector_data, gBinaryTemplateData); mMessage["body"]["binary-template-data"] = vector_data; diff --git a/indra/llmessage/tests/llxfer_file_test.cpp b/indra/llmessage/tests/llxfer_file_test.cpp index a8c1adf9b4..cf95d2627c 100644 --- a/indra/llmessage/tests/llxfer_file_test.cpp +++ b/indra/llmessage/tests/llxfer_file_test.cpp @@ -51,7 +51,7 @@ namespace tut oversized_filename += 'X'; } - LLXfer_File xff(oversized_filename, FALSE, 1); + LLXfer_File xff(oversized_filename, false, 1); ensure("oversized local_filename nul-terminated", xff.getFileName().length() < LL_MAX_PATH); } diff --git a/indra/llprimitive/tests/llprimitive_test.cpp b/indra/llprimitive/tests/llprimitive_test.cpp index 0ff0795fdc..284edc5901 100644 --- a/indra/llprimitive/tests/llprimitive_test.cpp +++ b/indra/llprimitive/tests/llprimitive_test.cpp @@ -46,7 +46,7 @@ public: if (mVolumeTest.isNull() || volume_params != mCurrParamsTest || detail != mCurrDetailTest) { F32 volume_detail = LLVolumeLODGroup::getVolumeScaleFromDetail(detail); - mVolumeTest = new LLVolume(volume_params, volume_detail, FALSE, FALSE); + mVolumeTest = new LLVolume(volume_params, volume_detail, false, false); mCurrParamsTest = volume_params; mCurrDetailTest = detail; return mVolumeTest; @@ -193,7 +193,7 @@ namespace tut ensure(!primitive.isChanged(LLXform::GEOMETRY)); // Make sure setVolume returns true - ensure(primitive.setVolume(params, 0, true) == TRUE); + ensure(primitive.setVolume(params, 0, true) == true); LLVolume* new_volume = primitive.getVolume(); // make sure new volume was actually created @@ -210,12 +210,12 @@ namespace tut ensure(primitive.isChanged(LLXform::GEOMETRY)); // Run it twice to make sure it doesn't create a different one if params are the same - ensure(primitive.setVolume(params, 0, true) == FALSE); + ensure(primitive.setVolume(params, 0, true) == false); ensure(new_volume == primitive.getVolume()); // Change the param definition and try setting it again. params.setRevolutions(4); - ensure(primitive.setVolume(params, 0, true) == TRUE); + ensure(primitive.setVolume(params, 0, true) == true); // Ensure that we now have a different volume ensure(new_volume != primitive.getVolume()); @@ -238,7 +238,7 @@ namespace tut ensure(!primitive.isChanged(LLXform::GEOMETRY)); // Make sure setVolume returns true - ensure(primitive.setVolume(params, 0, false) == TRUE); + ensure(primitive.setVolume(params, 0, false) == true); LLVolume* new_volume = primitive.getVolume(); @@ -256,12 +256,12 @@ namespace tut ensure(primitive.isChanged(LLXform::GEOMETRY)); // Run it twice to make sure it doesn't create a different one if params are the same - ensure(primitive.setVolume(params, 0, false) == FALSE); + ensure(primitive.setVolume(params, 0, false) == false); ensure(new_volume == primitive.getVolume()); // Change the param definition and try setting it again. params.setRevolutions(4); - ensure(primitive.setVolume(params, 0, false) == TRUE); + ensure(primitive.setVolume(params, 0, false) == true); // Ensure that we now have a different volume ensure(new_volume != primitive.getVolume()); diff --git a/indra/llxml/llcontrol.cpp b/indra/llxml/llcontrol.cpp index f665621b66..e626bac7d0 100644 --- a/indra/llxml/llcontrol.cpp +++ b/indra/llxml/llcontrol.cpp @@ -1002,7 +1002,7 @@ U32 LLControlGroup::loadFromFile(const std::string& filename, bool set_default_v { infile.close(); LL_WARNS("Settings") << "Unable to parse LLSD control file " << filename << ". Trying Legacy Method." << LL_ENDL; - return loadFromFileLegacy(filename, TRUE, TYPE_STRING); + return loadFromFileLegacy(filename, true, TYPE_STRING); } U32 validitems = 0; @@ -1188,7 +1188,7 @@ void main() // ...invalid data type getfoo = (F32_CONTROL) gGlobals.resolveName("gFoo"); - getfoo->set(TRUE); + getfoo->set(true); getfoo->dump(); // ...out of range data diff --git a/indra/llxml/tests/llcontrol_test.cpp b/indra/llxml/tests/llcontrol_test.cpp index f7e43d6def..0c0ef61d23 100644 --- a/indra/llxml/tests/llcontrol_test.cpp +++ b/indra/llxml/tests/llcontrol_test.cpp @@ -112,7 +112,7 @@ namespace tut LLControlGroup test_cg("foo2"); std::string temp_test_file = (mTestConfigDir + "setting_llsd_temp.xml"); mCleanups.push_back(temp_test_file); - mCG->saveToFile(temp_test_file.c_str(), TRUE); + mCG->saveToFile(temp_test_file.c_str(), true); results = test_cg.loadFromFile(temp_test_file.c_str()); ensure("number of changed settings loaded", (results == 1)); ensure("value of changed settings loaded", (test_cg.getU32("TestSetting") == 13)); @@ -129,12 +129,12 @@ namespace tut int results = mCG->loadFromFile(mTestConfigFile.c_str(), true); LLControlVariable* control = mCG->getControl("TestSetting"); LLSD new_value = 13; - control->setValue(new_value, FALSE); + control->setValue(new_value, false); ensure_equals("value of changed setting", mCG->getU32("TestSetting"), 13); LLControlGroup test_cg("foo3"); std::string temp_test_file = (mTestConfigDir + "setting_llsd_persist_temp.xml"); mCleanups.push_back(temp_test_file); - mCG->saveToFile(temp_test_file.c_str(), TRUE); + mCG->saveToFile(temp_test_file.c_str(), true); results = test_cg.loadFromFile(temp_test_file.c_str()); //If we haven't changed any settings, then we shouldn't have any settings to load ensure("number of non-persisted changed settings loaded", (results == 0)); diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp index 2afa6a1b2a..70a73b9ca8 100644 --- a/indra/newview/tests/lllogininstance_test.cpp +++ b/indra/newview/tests/lllogininstance_test.cpp @@ -345,13 +345,13 @@ namespace tut gTOSReplyPump = 0; // clear the callback. - gSavedSettings.declareBOOL("NoInventoryLibrary", FALSE, "", LLControlVariable::PERSIST_NO); - gSavedSettings.declareBOOL("ConnectAsGod", FALSE, "", LLControlVariable::PERSIST_NO); - gSavedSettings.declareBOOL("UseDebugMenus", FALSE, "", LLControlVariable::PERSIST_NO); + gSavedSettings.declareBOOL("NoInventoryLibrary", false, "", LLControlVariable::PERSIST_NO); + gSavedSettings.declareBOOL("ConnectAsGod", false, "", LLControlVariable::PERSIST_NO); + gSavedSettings.declareBOOL("UseDebugMenus", false, "", LLControlVariable::PERSIST_NO); gSavedSettings.declareString("ClientSettingsFile", "test_settings.xml", "", LLControlVariable::PERSIST_NO); gSavedSettings.declareString("NextLoginLocation", "", "", LLControlVariable::PERSIST_NO); - gSavedSettings.declareBOOL("LoginLastLocation", FALSE, "", LLControlVariable::PERSIST_NO); - gSavedSettings.declareBOOL("CmdLineSkipUpdater", TRUE, "", LLControlVariable::PERSIST_NO); + gSavedSettings.declareBOOL("LoginLastLocation", false, "", LLControlVariable::PERSIST_NO); + gSavedSettings.declareBOOL("CmdLineSkipUpdater", true, "", LLControlVariable::PERSIST_NO); LLSD authenticator = LLSD::emptyMap(); LLSD identifier = LLSD::emptyMap(); diff --git a/indra/newview/tests/llsechandler_basic_test.cpp b/indra/newview/tests/llsechandler_basic_test.cpp index 18b424c95b..c04d8cdc35 100644 --- a/indra/newview/tests/llsechandler_basic_test.cpp +++ b/indra/newview/tests/llsechandler_basic_test.cpp @@ -964,7 +964,7 @@ namespace tut // test creation of credentials my_cred = handler->createCredential("mysavedgrid", my_id, my_authenticator); // test save without saving authenticator. - handler->saveCredential(my_cred, FALSE); + handler->saveCredential(my_cred, false); my_new_cred = handler->loadCredential("mysavedgrid"); ensure_equals("saved credential without auth", (const std::string)my_new_cred->getIdentifier()["type"], "test_type"); diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp index ddcc4d8f7a..828c0da96c 100644 --- a/indra/newview/tests/llviewerhelputil_test.cpp +++ b/indra/newview/tests/llviewerhelputil_test.cpp @@ -75,7 +75,7 @@ static void substitute_string(std::string &input, const std::string &search, con #include "../llagent.h" LLAgent::LLAgent() : mAgentAccess(NULL) { } LLAgent::~LLAgent() { } -bool LLAgent::isGodlike() const { return FALSE; } +bool LLAgent::isGodlike() const { return false; } LLAgent gAgent; diff --git a/indra/test/llsaleinfo_tut.cpp b/indra/test/llsaleinfo_tut.cpp index 04af75c2d1..2973824e62 100644 --- a/indra/test/llsaleinfo_tut.cpp +++ b/indra/test/llsaleinfo_tut.cpp @@ -54,7 +54,7 @@ namespace tut LLSaleInfo saleinfo1 = ll_sale_info_from_sd(llsd_obj1); ensure("1. The getSaleType() fn failed", LLSaleInfo::FS_COPY == llsaleinfo.getSaleType()); - ensure("2. LLSaleInfo::isForSale() fn failed", TRUE == llsaleinfo.isForSale()); + ensure("2. LLSaleInfo::isForSale() fn failed", true == llsaleinfo.isForSale()); ensure("3. The getSalePrice() fn failed", sale_price == llsaleinfo.getSalePrice()); ensure("4. The getCRC32() fn failed", 235833404 == llsaleinfo.getCRC32()); ensure("5. LLSaleInfo::lookup(const char* name) fn failed", LLSaleInfo::FS_COPY == llsaleinfo.lookup(sale)); @@ -68,7 +68,7 @@ namespace tut saleinfo1 = ll_sale_info_from_sd(llsd_obj1); ensure("8. The getSaleType() and setSaleType() fn failed", LLSaleInfo::FS_ORIGINAL == llsaleinfo.getSaleType()); - ensure("9. LLSaleInfo::isForSale() fn failed", TRUE == llsaleinfo.isForSale()); + ensure("9. LLSaleInfo::isForSale() fn failed", true == llsaleinfo.isForSale()); ensure("10. The getSalePrice() fn failed", 10000000 == llsaleinfo.getSalePrice()); ensure("11. The getCRC32() fn failed", 127911702 == llsaleinfo.getCRC32()); ensure("12. LLSaleInfo::lookup(const char* name) fn failed", LLSaleInfo::FS_CONTENTS == llsaleinfo.lookup(sale)); @@ -82,7 +82,7 @@ namespace tut saleinfo1 = ll_sale_info_from_sd(llsd_obj1); ensure("15. The getSaleType() and setSaleType() fn failed", LLSaleInfo::FS_CONTENTS == llsaleinfo.getSaleType()); - ensure("16. LLSaleInfo::isForSale() fn failed", TRUE == llsaleinfo.isForSale()); + ensure("16. LLSaleInfo::isForSale() fn failed", true == llsaleinfo.isForSale()); ensure("17. The getSalePrice() fn failed", 55000550 == llsaleinfo.getSalePrice()); ensure("18. The getCRC32() fn failed", 408735656 == llsaleinfo.getCRC32()); ensure("19. LLSaleInfo::lookup(const char* name) fn failed", LLSaleInfo::FS_ORIGINAL == llsaleinfo.lookup(sale)); @@ -96,7 +96,7 @@ namespace tut saleinfo1 = ll_sale_info_from_sd(llsd_obj1); ensure("22. The getSaleType() and setSaleType() fn failed", LLSaleInfo::FS_NOT == llsaleinfo.getSaleType()); - ensure("23. LLSaleInfo::isForSale() fn failed", FALSE == llsaleinfo.isForSale()); + ensure("23. LLSaleInfo::isForSale() fn failed", false == llsaleinfo.isForSale()); ensure("24. The getSalePrice() fn failed", 0 == llsaleinfo.getSalePrice()); ensure("25. The getCRC32() fn failed", 0 == llsaleinfo.getCRC32()); ensure("26. LLSaleInfo::lookup(const char* name) fn failed", LLSaleInfo::FS_NOT == llsaleinfo.lookup(sale)); diff --git a/indra/test/lltemplatemessagebuilder_tut.cpp b/indra/test/lltemplatemessagebuilder_tut.cpp index 12a323ac4d..36968b8e0f 100644 --- a/indra/test/lltemplatemessagebuilder_tut.cpp +++ b/indra/test/lltemplatemessagebuilder_tut.cpp @@ -61,7 +61,7 @@ namespace tut 1, 0, 0, - FALSE, + false, "notasharedsecret", NULL, false, diff --git a/indra/test/message_tut.cpp b/indra/test/message_tut.cpp index 76063e6db1..0a3e6621aa 100644 --- a/indra/test/message_tut.cpp +++ b/indra/test/message_tut.cpp @@ -75,7 +75,7 @@ namespace tut 1, 0, 0, - FALSE, + false, "notasharedsecret", NULL, false, From 609831b5d244c52a21aef438785cd7c090d4b242 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 13 Feb 2024 01:37:46 +0200 Subject: [PATCH 14/15] secondlife/triage#59 Show 'Friends Only' rendering mode --- indra/newview/app_settings/settings.xml | 29 ++++------- indra/newview/llfloaterpreference.cpp | 15 ++++++ indra/newview/llfloaterpreference.h | 6 +-- .../llfloaterpreferencesgraphicsadvanced.cpp | 37 ++++++++++++-- .../llfloaterpreferencesgraphicsadvanced.h | 3 ++ indra/newview/llviewercontrol.cpp | 10 +++- indra/newview/llvoavatar.cpp | 26 +++++++--- indra/newview/llvoavatar.h | 9 +++- .../floater_preferences_graphics_advanced.xml | 36 ++++++++++++++ .../xui/en/panel_performance_nearby.xml | 41 ++++++++++++---- .../xui/en/panel_preferences_graphics1.xml | 49 ++++++++++++++----- 11 files changed, 199 insertions(+), 62 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a9b4ebcc04..a787010346 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8817,17 +8817,6 @@ Value 1 - AlwaysRenderFriends - - Comment - Always render friends regardless of max complexity - Persist - 1 - Type - Boolean - Value - 0 - RenderAvatar Comment @@ -10921,16 +10910,16 @@ Value 1 - RenderUseImpostors + RenderAvatarComplexityMode - Comment - OBSOLETE and UNUSED. See RenderAvatarMaxNonImpostors and RenderAvatarMaxComplexity. - Persist - 0 - Type - Boolean - Value - 0 + Comment + 0 - complexity limit applies to everyone, 1 - always show friends, 2 - only show friends + Persist + 0 + Type + S32 + Value + 0 RenderAvatarMaxNonImpostors diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 5b4138e2e9..93292926b6 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -437,6 +437,12 @@ bool LLFloaterPreference::postBuild() gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeMaturity, this)); + gSavedSettings.getControl("RenderAvatarComplexityMode")->getSignal()->connect( + [this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val) + { + onChangeComplexityMode(new_val); + }); + gSavedPerAccountSettings.getControl("ModelUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeModelFolder, this)); gSavedPerAccountSettings.getControl("PBRUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangePBRFolder, this)); gSavedPerAccountSettings.getControl("TextureUploadFolder")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeTextureFolder, this)); @@ -476,6 +482,9 @@ bool LLFloaterPreference::postBuild() LLSliderCtrl* fov_slider = getChild("camera_fov"); fov_slider->setMinValue(LLViewerCamera::getInstance()->getMinView()); fov_slider->setMaxValue(LLViewerCamera::getInstance()->getMaxView()); + + bool enable_complexity = gSavedSettings.getS32("RenderAvatarComplexityMode") != LLVOAvatar::AV_RENDER_ONLY_SHOW_FRIENDS; + getChild("IndirectMaxComplexity")->setEnabled(enable_complexity); // Hook up and init for filtering mFilterEdit = getChild("search_prefs_edit"); @@ -1629,6 +1638,12 @@ void LLFloaterPreference::onChangeMaturity() getChild("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT); } +void LLFloaterPreference::onChangeComplexityMode(const LLSD& newvalue) +{ + bool enable_complexity = newvalue.asInteger() != LLVOAvatar::AV_RENDER_ONLY_SHOW_FRIENDS; + getChild("IndirectMaxComplexity")->setEnabled(enable_complexity); +} + std::string get_category_path(LLUUID cat_id) { LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id); diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 8a231cc10b..c6891c61aa 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -164,7 +164,6 @@ public: void onClickLogPath(); void changeLogPath(const std::vector& filenames, std::string proposed_name); bool moveTranscriptsAndLog(); - void enableHistory(); void setPersonalInfo(const std::string& visibility); void refreshEnabledState(); void onCommitWindowedMode(); @@ -174,10 +173,8 @@ public: void refreshUI(); - void onCommitMediaEnabled(); - void onCommitMusicEnabled(); - void applyResolution(); void onChangeMaturity(); + void onChangeComplexityMode(const LLSD& newvalue); void onChangeModelFolder(); void onChangePBRFolder(); void onChangeTextureFolder(); @@ -199,7 +196,6 @@ public: void buildPopupLists(); static void refreshSkin(void* data); void selectPanel(const LLSD& name); - void saveCameraPreset(std::string& preset); void saveGraphicsPreset(std::string& preset); void setRecommendedSettings(); diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp index 77482fc75e..6741dbb7e4 100644 --- a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp +++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp @@ -51,14 +51,14 @@ LLFloaterPreferenceGraphicsAdvanced::LLFloaterPreferenceGraphicsAdvanced(const L mCommitCallbackRegistrar.add("Pref.Cancel", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onBtnCancel, this, _2)); mCommitCallbackRegistrar.add("Pref.OK", boost::bind(&LLFloaterPreferenceGraphicsAdvanced::onBtnOK, this, _2)); - - gSavedSettings.getControl("RenderAvatarMaxNonImpostors")->getSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateIndirectMaxNonImpostors, this, _2)); } LLFloaterPreferenceGraphicsAdvanced::~LLFloaterPreferenceGraphicsAdvanced() { mComplexityChangedSignal.disconnect(); + mComplexityModeChangedSignal.disconnect(); mLODFactorChangedSignal.disconnect(); + mNumImpostorsChangedSignal.disconnect(); } bool LLFloaterPreferenceGraphicsAdvanced::postBuild() @@ -78,8 +78,26 @@ bool LLFloaterPreferenceGraphicsAdvanced::postBuild() use_HiDPI->setVisible(false); #endif - mComplexityChangedSignal = gSavedSettings.getControl("RenderAvatarMaxComplexity")->getCommitSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateComplexityText, this)); - mLODFactorChangedSignal = gSavedSettings.getControl("RenderVolumeLODFactor")->getCommitSignal()->connect(boost::bind(&LLFloaterPreferenceGraphicsAdvanced::updateObjectMeshDetailText, this)); + mComplexityChangedSignal = gSavedSettings.getControl("RenderAvatarMaxComplexity")->getCommitSignal()->connect( + [this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val) + { + updateComplexityText(); + }); + mComplexityModeChangedSignal = gSavedSettings.getControl("RenderAvatarComplexityMode")->getSignal()->connect( + [this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val) + { + updateComplexityMode(new_val); + }); + mLODFactorChangedSignal = gSavedSettings.getControl("RenderVolumeLODFactor")->getCommitSignal()->connect( + [this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val) + { + updateObjectMeshDetailText(); + }); + mNumImpostorsChangedSignal = gSavedSettings.getControl("RenderAvatarMaxNonImpostors")->getSignal()->connect( + [this](LLControlVariable* control, const LLSD& new_val, const LLSD& old_val) + { + updateIndirectMaxNonImpostors(new_val); + }); return true; } @@ -144,6 +162,10 @@ void LLFloaterPreferenceGraphicsAdvanced::refresh() gSavedSettings.getU32("RenderAvatarMaxComplexity"), getChild("IndirectMaxComplexityText", true)); refreshEnabledState(); + + bool enable_complexity = gSavedSettings.getS32("RenderAvatarComplexityMode") != LLVOAvatar::AV_RENDER_ONLY_SHOW_FRIENDS; + getChild("IndirectMaxComplexity")->setEnabled(enable_complexity); + getChild("IndirectMaxNonImpostors")->setEnabled(enable_complexity); } void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledGraphics() @@ -159,6 +181,13 @@ void LLFloaterPreferenceGraphicsAdvanced::updateMaxComplexity() getChild("IndirectMaxComplexityText")); } +void LLFloaterPreferenceGraphicsAdvanced::updateComplexityMode(const LLSD& newvalue) +{ + bool enable_complexity = newvalue.asInteger() != LLVOAvatar::AV_RENDER_ONLY_SHOW_FRIENDS; + getChild("IndirectMaxComplexity")->setEnabled(enable_complexity); + getChild("IndirectMaxNonImpostors")->setEnabled(enable_complexity); +} + void LLFloaterPreferenceGraphicsAdvanced::updateComplexityText() { LLAvatarComplexityControls::setText(gSavedSettings.getU32("RenderAvatarMaxComplexity"), diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.h b/indra/newview/llfloaterpreferencesgraphicsadvanced.h index ed7c1fc926..8791bdce19 100644 --- a/indra/newview/llfloaterpreferencesgraphicsadvanced.h +++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.h @@ -48,6 +48,7 @@ public: void updateIndirectMaxNonImpostors(const LLSD& newvalue); void setMaxNonImpostorsText(U32 value, LLTextBox* text_box); void updateMaxComplexity(); + void updateComplexityMode(const LLSD& newvalue); void updateComplexityText(); void updateObjectMeshDetailText(); void refresh(); @@ -61,7 +62,9 @@ protected: void onBtnCancel(const LLSD& userdata); boost::signals2::connection mComplexityChangedSignal; + boost::signals2::connection mComplexityModeChangedSignal; boost::signals2::connection mLODFactorChangedSignal; + boost::signals2::connection mNumImpostorsChangedSignal; }; #endif //LLFLOATERPREFERENCEGRAPHICSADVANCED_H diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index a7583136eb..2a248cd120 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -638,8 +638,13 @@ void handlePerformanceStatsEnabledChanged(const LLSD& newValue) } void handleUserImpostorByDistEnabledChanged(const LLSD& newValue) { - const auto newval = gSavedSettings.getBOOL("AutoTuneImpostorByDistEnabled"); - LLPerfStats::tunables.userImpostorDistanceTuningEnabled = newval; + bool auto_tune_newval = false; + S32 mode = gSavedSettings.getS32("RenderAvatarComplexityMode"); + if (mode != LLVOAvatar::AV_RENDER_ONLY_SHOW_FRIENDS) + { + auto_tune_newval = gSavedSettings.getBOOL("AutoTuneImpostorByDistEnabled"); + } + LLPerfStats::tunables.userImpostorDistanceTuningEnabled = auto_tune_newval; } void handleUserImpostorDistanceChanged(const LLSD& newValue) { @@ -708,6 +713,7 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "RenderGlowNoise", handleSetShaderChanged); setting_setup_signal_listener(gSavedSettings, "RenderGammaFull", handleSetShaderChanged); setting_setup_signal_listener(gSavedSettings, "RenderVolumeLODFactor", handleVolumeLODChanged); + setting_setup_signal_listener(gSavedSettings, "RenderAvatarComplexityMode", handleUserImpostorByDistEnabledChanged); setting_setup_signal_listener(gSavedSettings, "RenderAvatarLODFactor", handleAvatarLODChanged); setting_setup_signal_listener(gSavedSettings, "RenderAvatarPhysicsLODFactor", handleAvatarPhysicsLODChanged); setting_setup_signal_listener(gSavedSettings, "RenderTerrainLODFactor", handleTerrainLODChanged); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 0ab0006fc9..1e785ba757 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -8344,13 +8344,17 @@ bool LLVOAvatar::isFullyLoaded() const bool LLVOAvatar::isTooComplex() const { bool too_complex; - static LLCachedControl always_render_friends(gSavedSettings, "AlwaysRenderFriends"); - bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && always_render_friends); + static LLCachedControl compelxity_render_mode(gSavedSettings, "RenderAvatarComplexityMode"); + bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY); if (isSelf() || render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER) { too_complex = false; } + else if (compelxity_render_mode == AV_RENDER_ONLY_SHOW_FRIENDS && !mIsControlAvatar) + { + too_complex = true; + } else { // Determine if visually muted or not @@ -8370,13 +8374,17 @@ bool LLVOAvatar::isTooComplex() const bool LLVOAvatar::isTooSlow() const { - static LLCachedControl always_render_friends(gSavedSettings, "AlwaysRenderFriends"); - bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && always_render_friends); + static LLCachedControl compelxity_render_mode(gSavedSettings, "RenderAvatarComplexityMode"); + bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY); if (render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER) { return false; } + else if (compelxity_render_mode == AV_RENDER_ONLY_SHOW_FRIENDS && !mIsControlAvatar) + { + return true; + } return mTooSlow; } @@ -8384,7 +8392,7 @@ bool LLVOAvatar::isTooSlow() const void LLVOAvatar::updateTooSlow() { LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR; - static LLCachedControl alwaysRenderFriends(gSavedSettings, "AlwaysRenderFriends"); + static LLCachedControl compelxity_render_mode(gSavedSettings, "RenderAvatarComplexityMode"); static LLCachedControl allowSelfImpostor(gSavedSettings, "AllowSelfImpostor"); const auto id = getID(); @@ -8417,12 +8425,14 @@ void LLVOAvatar::updateTooSlow() if(!mTooSlowWithoutShadows) // if we were not previously above the full impostor cap { - bool render_friend_or_exception = ( alwaysRenderFriends && LLAvatarTracker::instance().isBuddy( id ) ) || + bool always_render_friends = compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY; + bool render_friend_or_exception = (always_render_friends && LLAvatarTracker::instance().isBuddy( id ) ) || ( getVisualMuteSettings() == LLVOAvatar::AV_ALWAYS_RENDER ); - if( (!isSelf() || allowSelfImpostor) && !render_friend_or_exception ) + if( (!isSelf() || allowSelfImpostor) && !render_friend_or_exception) { // Note: slow rendering Friends still get their shadows zapped. - mTooSlowWithoutShadows = getGPURenderTime()*2.f >= max_art_ms; // NOTE: assumes shadow rendering doubles render time + mTooSlowWithoutShadows = (getGPURenderTime()*2.f >= max_art_ms) // NOTE: assumes shadow rendering doubles render time + || (compelxity_render_mode == AV_RENDER_ONLY_SHOW_FRIENDS && !mIsControlAvatar); } } } diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index f8b71aa364..979eac6dbc 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -487,7 +487,14 @@ public: U32 renderImpostor(LLColor4U color = LLColor4U(255,255,255,255), S32 diffuse_channel = 0); bool isVisuallyMuted(); bool isInMuteList() const; - void forceUpdateVisualMuteSettings(); + + // states for RenderAvatarComplexityMode + enum ERenderComplexityMode + { + AV_RENDER_LIMIT_BY_COMPLEXITY = 0, + AV_RENDER_ALWAYS_SHOW_FRIENDS = 1, + AV_RENDER_ONLY_SHOW_FRIENDS = 2 + }; // Visual Mute Setting is an input. Does not necessarily determine // what the avatar looks like, because it interacts with other diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml index bc237322af..af6df9dad3 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml @@ -128,6 +128,42 @@ Avatar + + Detail Mode: + + + + + + + + - - + top_pad="3" + name="AvatarComplexityModeLabel" + text_readonly_color="LabelDisabledColor" + width="128"> + Detail Mode: + + + + + + + + + Avatar Detail Mode: + + + + + + [https://community.secondlife.com/t5/Featured-News/Why-are-all-these-people-made-of-colored-jelly/ba-p/3031255 What's this?] - - -