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:
parent
5fff9923ec
commit
ffc4bc5040
1 changed files with 5 additions and 0 deletions
|
@ -314,6 +314,11 @@ void Workspace::performCompositing()
|
||||||
|| !overlay_visible ) // nothing is visible anyway
|
|| !overlay_visible ) // nothing is visible anyway
|
||||||
{
|
{
|
||||||
scene->idle();
|
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;
|
return;
|
||||||
}
|
}
|
||||||
// create a list of all windows in the stacking order
|
// create a list of all windows in the stacking order
|
||||||
|
|
Loading…
Reference in a new issue