summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterperformance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterperformance.cpp')
-rw-r--r--indra/newview/llfloaterperformance.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/indra/newview/llfloaterperformance.cpp b/indra/newview/llfloaterperformance.cpp
index 01579ac165..3eb0c849d3 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<LLCheckBoxCtrl>("AutoTuneContinuous");
+ mTextWIPDesc = mAutoadjustmentsPanel->getChild<LLTextBox>("wip_desc");
+ mTextDisplayDesc = mAutoadjustmentsPanel->getChild<LLTextBox>("display_desc");
+
+ mTextFPSLabel = getChild<LLTextBox>("fps_lbl");
+ mTextFPSValue = getChild<LLTextBox>("fps_value");
+
gSavedPerAccountSettings.declareBOOL("HadEnabledAutoFPS", false, "User had enabled AutoFPS at least once", LLControlVariable::PERSIST_ALWAYS);
return true;
@@ -428,15 +435,12 @@ void LLFloaterPerformance::populateNearbyList()
mNearbyList->updateColumns(true);
static LLCachedControl<U32> max_render_cost(gSavedSettings, "RenderAvatarMaxComplexity", 0);
- std::vector<LLCharacter*> valid_nearby_avs;
+ std::vector<LLVOAvatar*> valid_nearby_avs;
mNearbyMaxGPUTime = LLWorld::getInstance()->getNearbyAvatarsAndMaxGPUTime(valid_nearby_avs);
- std::vector<LLCharacter*>::iterator char_iter = valid_nearby_avs.begin();
-
- while (char_iter != valid_nearby_avs.end())
+ for (LLVOAvatar* avatar : valid_nearby_avs)
{
- LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(*char_iter);
- if (avatar && (LLVOAvatar::AOA_INVISIBLE != avatar->getOverallAppearance()))
+ if (LLVOAvatar::AOA_INVISIBLE != avatar->getOverallAppearance())
{
F32 render_av_gpu_ms = avatar->getGPURenderTime();
@@ -501,7 +505,6 @@ void LLFloaterPerformance::populateNearbyList()
}
}
}
- char_iter++;
}
mNearbyList->sortByColumnIndex(1, false);
mNearbyList->setScrollPos(prev_pos);
@@ -512,7 +515,7 @@ void LLFloaterPerformance::setFPSText()
{
const S32 NUM_PERIODS = 50;
S32 current_fps = (S32)llround(LLTrace::get_frame_recording().getPeriodMedianPerSec(LLStatViewer::FPS, NUM_PERIODS));
- getChild<LLTextBox>("fps_value")->setValue(current_fps);
+ mTextFPSValue->setValue(current_fps);
std::string fps_text = getString("fps_text");
static LLCachedControl<bool> vsync_enabled(gSavedSettings, "RenderVSyncEnable", true);
@@ -521,7 +524,7 @@ void LLFloaterPerformance::setFPSText()
{
fps_text += getString("max_text");
}
- getChild<LLTextBox>("fps_lbl")->setValue(fps_text);
+ mTextFPSLabel->setValue(fps_text);
}
void LLFloaterPerformance::detachObject(const LLUUID& obj_id)
@@ -726,10 +729,10 @@ void LLFloaterPerformance::updateAutotuneCtrls(bool autotune_enabled)
static LLCachedControl<bool> auto_tune_locked(gSavedSettings, "AutoTuneLock");
mStartAutotuneBtn->setEnabled(!autotune_enabled && !auto_tune_locked);
mStopAutotuneBtn->setEnabled(autotune_enabled && !auto_tune_locked);
- getChild<LLCheckBoxCtrl>("AutoTuneContinuous")->setEnabled(!autotune_enabled || (autotune_enabled && auto_tune_locked));
+ mCheckTuneContinous->setEnabled(!autotune_enabled || (autotune_enabled && auto_tune_locked));
- getChild<LLTextBox>("wip_desc")->setVisible(autotune_enabled && !auto_tune_locked);
- getChild<LLTextBox>("display_desc")->setVisible(LLPerfStats::tunables.vsyncEnabled);
+ mTextWIPDesc->setVisible(autotune_enabled && !auto_tune_locked);
+ mTextDisplayDesc->setVisible(LLPerfStats::tunables.vsyncEnabled);
}
void LLFloaterPerformance::enableAutotuneWarning()