From 7e82c1de5242e7dacafe7d69abb753f6fe528e0f Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Wed, 24 Jul 2024 12:59:55 -0400 Subject: Fix performance floater getChild while drawing --- indra/newview/llfloaterperformance.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'indra/newview/llfloaterperformance.cpp') diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/llfloaterperformance.cpp index 3a633a7ff8..d5782accef 100644 --- a/indra/newview/llfloaterperformance.cpp +++ b/indra/newview/llfloaterperformance.cpp @@ -152,6 +152,13 @@ bool LLFloaterPerformance::postBuild() mStartAutotuneBtn->setCommitCallback(boost::bind(&LLFloaterPerformance::startAutotune, this)); mStopAutotuneBtn->setCommitCallback(boost::bind(&LLFloaterPerformance::stopAutotune, this)); + mCheckTuneContinous = mAutoadjustmentsPanel->getChild("AutoTuneContinuous"); + mTextWIPDesc = mAutoadjustmentsPanel->getChild("wip_desc"); + mTextDisplayDesc = mAutoadjustmentsPanel->getChild("display_desc"); + + mTextFPSLabel = getChild("fps_lbl"); + mTextFPSValue = getChild("fps_value"); + gSavedPerAccountSettings.declareBOOL("HadEnabledAutoFPS", false, "User had enabled AutoFPS at least once", LLControlVariable::PERSIST_ALWAYS); return true; @@ -512,7 +519,7 @@ void LLFloaterPerformance::setFPSText() { const S32 NUM_PERIODS = 50; S32 current_fps = (S32)llround(LLTrace::get_frame_recording().getPeriodMedianPerSec(LLStatViewer::FPS, NUM_PERIODS)); - getChild("fps_value")->setValue(current_fps); + mTextFPSValue->setValue(current_fps); std::string fps_text = getString("fps_text"); static LLCachedControl vsync_enabled(gSavedSettings, "RenderVSyncEnable", true); @@ -521,7 +528,7 @@ void LLFloaterPerformance::setFPSText() { fps_text += getString("max_text"); } - getChild("fps_lbl")->setValue(fps_text); + mTextFPSLabel->setValue(fps_text); } void LLFloaterPerformance::detachItem(const LLUUID& item_id) @@ -722,10 +729,10 @@ void LLFloaterPerformance::updateAutotuneCtrls(bool autotune_enabled) static LLCachedControl auto_tune_locked(gSavedSettings, "AutoTuneLock"); mStartAutotuneBtn->setEnabled(!autotune_enabled && !auto_tune_locked); mStopAutotuneBtn->setEnabled(autotune_enabled && !auto_tune_locked); - getChild("AutoTuneContinuous")->setEnabled(!autotune_enabled || (autotune_enabled && auto_tune_locked)); + mCheckTuneContinous->setEnabled(!autotune_enabled || (autotune_enabled && auto_tune_locked)); - getChild("wip_desc")->setVisible(autotune_enabled && !auto_tune_locked); - getChild("display_desc")->setVisible(LLPerfStats::tunables.vsyncEnabled); + mTextWIPDesc->setVisible(autotune_enabled && !auto_tune_locked); + mTextDisplayDesc->setVisible(LLPerfStats::tunables.vsyncEnabled); } void LLFloaterPerformance::enableAutotuneWarning() -- cgit v1.2.3 From 5d25504f8335132d0d222b266f8772062c88b335 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Fri, 26 Jul 2024 19:32:23 +0200 Subject: #2100 BugSplat Crash #1497210: LLVOAvatar::updateImpostors()(10616) --- indra/newview/llfloaterperformance.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'indra/newview/llfloaterperformance.cpp') diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/llfloaterperformance.cpp index d5782accef..315508f22b 100644 --- a/indra/newview/llfloaterperformance.cpp +++ b/indra/newview/llfloaterperformance.cpp @@ -435,15 +435,12 @@ void LLFloaterPerformance::populateNearbyList() mNearbyList->updateColumns(true); static LLCachedControl max_render_cost(gSavedSettings, "RenderAvatarMaxComplexity", 0); - std::vector valid_nearby_avs; + std::vector valid_nearby_avs; mNearbyMaxGPUTime = LLWorld::getInstance()->getNearbyAvatarsAndMaxGPUTime(valid_nearby_avs); - std::vector::iterator char_iter = valid_nearby_avs.begin(); - - while (char_iter != valid_nearby_avs.end()) + for (LLVOAvatar* avatar : valid_nearby_avs) { - LLVOAvatar* avatar = dynamic_cast(*char_iter); - if (avatar && (LLVOAvatar::AOA_INVISIBLE != avatar->getOverallAppearance())) + if (LLVOAvatar::AOA_INVISIBLE != avatar->getOverallAppearance()) { F32 render_av_gpu_ms = avatar->getGPURenderTime(); @@ -508,7 +505,6 @@ void LLFloaterPerformance::populateNearbyList() } } } - char_iter++; } mNearbyList->sortByColumnIndex(1, false); mNearbyList->setScrollPos(prev_pos); -- cgit v1.2.3