call drawdevices only every 500ms, added profiling code

This commit is contained in:
louis
2014-11-02 17:32:22 +01:00
parent ef4502cc02
commit 037e8e0cb1
7 changed files with 52 additions and 8 deletions

View File

@@ -18,6 +18,7 @@ cSDDisplayChannel::cSDDisplayChannel(cTemplate *channelTemplate, bool WithInfo)
currentLast = 0;
channelChange = false;
initial = true;
devicesLast = cTimeMs::Now();
channelView = new cDisplayChannelView(channelTemplate->GetRootView());
if (!channelView->createOsd()) {
@@ -185,7 +186,10 @@ void cSDDisplayChannel::Flush(void) {
channelView->DrawScreenResolution();
channelView->DrawSignal();
channelView->DrawAudioInfo();
channelView->DrawDevices(initial);
if (initial || cTimeMs::Now() - devicesLast > 500) {
channelView->DrawDevices(initial);
devicesLast = cTimeMs::Now();
}
} else {
channelView->ClearStatusIcons();
channelView->ClearScreenResolution();