Fix performance floater getChild while drawing
parent
63d32e8b32
commit
7e82c1de52
|
|
@ -152,6 +152,13 @@ bool LLFloaterPerformance::postBuild()
|
||||||
mStartAutotuneBtn->setCommitCallback(boost::bind(&LLFloaterPerformance::startAutotune, this));
|
mStartAutotuneBtn->setCommitCallback(boost::bind(&LLFloaterPerformance::startAutotune, this));
|
||||||
mStopAutotuneBtn->setCommitCallback(boost::bind(&LLFloaterPerformance::stopAutotune, 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);
|
gSavedPerAccountSettings.declareBOOL("HadEnabledAutoFPS", false, "User had enabled AutoFPS at least once", LLControlVariable::PERSIST_ALWAYS);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -512,7 +519,7 @@ void LLFloaterPerformance::setFPSText()
|
||||||
{
|
{
|
||||||
const S32 NUM_PERIODS = 50;
|
const S32 NUM_PERIODS = 50;
|
||||||
S32 current_fps = (S32)llround(LLTrace::get_frame_recording().getPeriodMedianPerSec(LLStatViewer::FPS, NUM_PERIODS));
|
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");
|
std::string fps_text = getString("fps_text");
|
||||||
static LLCachedControl<bool> vsync_enabled(gSavedSettings, "RenderVSyncEnable", true);
|
static LLCachedControl<bool> vsync_enabled(gSavedSettings, "RenderVSyncEnable", true);
|
||||||
|
|
@ -521,7 +528,7 @@ void LLFloaterPerformance::setFPSText()
|
||||||
{
|
{
|
||||||
fps_text += getString("max_text");
|
fps_text += getString("max_text");
|
||||||
}
|
}
|
||||||
getChild<LLTextBox>("fps_lbl")->setValue(fps_text);
|
mTextFPSLabel->setValue(fps_text);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterPerformance::detachItem(const LLUUID& item_id)
|
void LLFloaterPerformance::detachItem(const LLUUID& item_id)
|
||||||
|
|
@ -722,10 +729,10 @@ void LLFloaterPerformance::updateAutotuneCtrls(bool autotune_enabled)
|
||||||
static LLCachedControl<bool> auto_tune_locked(gSavedSettings, "AutoTuneLock");
|
static LLCachedControl<bool> auto_tune_locked(gSavedSettings, "AutoTuneLock");
|
||||||
mStartAutotuneBtn->setEnabled(!autotune_enabled && !auto_tune_locked);
|
mStartAutotuneBtn->setEnabled(!autotune_enabled && !auto_tune_locked);
|
||||||
mStopAutotuneBtn->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);
|
mTextWIPDesc->setVisible(autotune_enabled && !auto_tune_locked);
|
||||||
getChild<LLTextBox>("display_desc")->setVisible(LLPerfStats::tunables.vsyncEnabled);
|
mTextDisplayDesc->setVisible(LLPerfStats::tunables.vsyncEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterPerformance::enableAutotuneWarning()
|
void LLFloaterPerformance::enableAutotuneWarning()
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,9 @@
|
||||||
#include "lllistcontextmenu.h"
|
#include "lllistcontextmenu.h"
|
||||||
|
|
||||||
class LLCharacter;
|
class LLCharacter;
|
||||||
|
class LLCheckBoxCtrl;
|
||||||
class LLNameListCtrl;
|
class LLNameListCtrl;
|
||||||
|
class LLTextBox;
|
||||||
|
|
||||||
class LLFloaterPerformance : public LLFloater
|
class LLFloaterPerformance : public LLFloater
|
||||||
{
|
{
|
||||||
|
|
@ -90,6 +92,13 @@ private:
|
||||||
LLButton* mStartAutotuneBtn;
|
LLButton* mStartAutotuneBtn;
|
||||||
LLButton* mStopAutotuneBtn;
|
LLButton* mStopAutotuneBtn;
|
||||||
|
|
||||||
|
LLTextBox* mTextWIPDesc = nullptr;
|
||||||
|
LLTextBox* mTextDisplayDesc = nullptr;
|
||||||
|
LLTextBox* mTextFPSLabel = nullptr;
|
||||||
|
LLTextBox* mTextFPSValue = nullptr;
|
||||||
|
|
||||||
|
LLCheckBoxCtrl* mCheckTuneContinous = nullptr;
|
||||||
|
|
||||||
LLListContextMenu* mContextMenu;
|
LLListContextMenu* mContextMenu;
|
||||||
|
|
||||||
LLTimer* mUpdateTimer;
|
LLTimer* mUpdateTimer;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue