Make sure idling does not actually cause big load by a repeating

quick timer caused by dynamically adjusting the next repaint
when using vsync. Ideally there should be no idle ticks at all,
somewhen later.


svn path=/branches/KDE/4.1/kdebase/workspace/; revision=850943
This commit is contained in:
Luboš Luňák 2008-08-22 15:58:34 +00:00
parent 0500b240be
commit ad60dbfdb9

View file

@ -314,6 +314,11 @@ void Workspace::performCompositing()
|| !overlay_visible ) // nothing is visible anyway
{
scene->idle();
// With vsync, next repaint is scheduled dynamically at the end of this function,
// and it can have a very short timeout. If we now idle here, make sure the idling
// does not actually caused heavy load by firing the timer often too quickly.
if( compositeTimer.interval() != compositeRate )
compositeTimer.start( compositeRate );
return;
}
// create a list of all windows in the stacking order