Example #1
0
void LLPerfStats::updatePerFrameStats()
{
    (void) LLStatsConfigFile::instance().checkAndReload();
	static LLFrameTimer performance_stats_timer;
	if ( frameStatsIsRunning() )
	{
		if ( mReportPerformanceStatInterval == 0 )
		{	// Record info every frame
			if ( mSkipFirstFrameStats )
			{	// Skip the first time - was started this frame
				mSkipFirstFrameStats = FALSE;
			}
			else
			{
				dumpIntervalPerformanceStats();
			}
		}
		else
		{
			performance_stats_timer.setTimerExpirySec( getReportPerformanceInterval() );
			if (performance_stats_timer.checkExpirationAndReset( mReportPerformanceStatInterval ))
			{
				dumpIntervalPerformanceStats();
			}
		}
		
		if ( LLFrameTimer::getElapsedSeconds() > mReportPerformanceStatEnd )
		{	// Reached end of time, clear it to stop reporting
			setReportPerformanceDuration(0.f);			// Don't set mReportPerformanceStatEnd directly	
            llinfos << "Recording performance stats completed" << llendl;
		}
	}
}
void LLFloaterAvatarPicker::draw()
{
	// sometimes it is hard to determine when Select/Ok button should be disabled (see LLAvatarActions::shareWithAvatars).
	// lets check this via mOkButtonValidateSignal callback periodically.
	static LLFrameTimer timer;
	if (timer.hasExpired())
	{
		timer.setTimerExpirySec(0.33f); // three times per second should be enough.

		// simulate list changes.
		onList();
		timer.start();
	}

	LLFloater::draw();

// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-1.0.0e
	// TODO-RLVa: this code needs revisiting
	if (rlv_handler_t::isEnabled())
	{
		LLPanel* pNearMePanel = getChild<LLPanel>("NearMePanel");
		if ( (pNearMePanel) && (childGetVisibleTab("ResidentChooserTabs") == pNearMePanel) )
		{
			if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
			{
				if (mNearMeListComplete)
				{
					getChild<LLScrollListCtrl>("NearMe")->deleteAllItems();
					childSetEnabled("Select", false);
				}
				mNearMeListComplete = FALSE;
				pNearMePanel->setCtrlsEnabled(FALSE);
				return;
			}
			pNearMePanel->setCtrlsEnabled(TRUE);
		}
	}
// [/RLVa:KB]

	if (!mNearMeListComplete &&  getChild<LLTabContainer>("ResidentChooserTabs")->getCurrentPanel() == getChild<LLPanel>("NearMePanel"))
	{
		populateNearMe();
	}
}
void LLFloaterAvatarPicker::draw()
{
	// sometimes it is hard to determine when Select/Ok button should be disabled (see LLAvatarActions::shareWithAvatars).
	// lets check this via mOkButtonValidateSignal callback periodically.
	static LLFrameTimer timer;
	if (timer.hasExpired())
	{
		timer.setTimerExpirySec(0.33f); // three times per second should be enough.

		// simulate list changes.
		onList();
		timer.start();
	}

	LLFloater::draw();
	if (!mNearMeListComplete && getChild<LLTabContainer>("ResidentChooserTabs")->getCurrentPanel() == getChild<LLPanel>("NearMePanel"))
	{
		populateNearMe();
	}
}