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.
BUG: 154270
CCBUG: 155694


svn path=/trunk/KDE/kdebase/workspace/; revision=850941
This commit is contained in:
Luboš Luňák 2008-08-22 15:57:31 +00:00
parent 5fff9923ec
commit ffc4bc5040

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