Re-apply performance tweak in LLFlashTimer

Ansariel 2014-06-10 22:26:46 +02:00
parent d09fbe7498
commit db68b4d7ea
1 changed files with 10 additions and 2 deletions

View File

@ -40,10 +40,18 @@ LLFlashTimer::LLFlashTimer(callback_t cb, S32 count, F32 period)
// By default use settings from settings.xml to be able change them via Debug settings. See EXT-5973.
// Due to Timer is implemented as derived class from EventTimer it is impossible to change period
// in runtime. So, both settings are made as required restart.
mFlashCount = 2 * ((count > 0) ? count : LLUI::sSettingGroups["config"]->getS32("FlashCount"));
// <FS:CR>
//mFlashCount = 2 * ((count > 0) ? count : LLUI::sSettingGroups["config"]->getS32("FlashCount"));
static LLCachedControl<S32> flash_count(*LLUI::sSettingGroups["config"], "FlashCount");
mFlashCount = 2 * ((count > 0) ? count : flash_count);
// </FS:CR>
if (mPeriod <= 0)
{
mPeriod = LLUI::sSettingGroups["config"]->getF32("FlashPeriod");
//mPeriod = LLUI::sSettingGroups["config"]->getF32("FlashPeriod");
// <FS:CR>
static LLCachedControl<F32> flash_period(*LLUI::sSettingGroups["config"], "FlashPeriod");
mPeriod = flash_period;
// </FS:CR>
}
// <FS:Ansariel> Configurable at runtime