core/renderloop: fix triple buffering hysteresis
The way it was implemented it only changed the target pageflip, but not the time at which KWin would start compositing, which could make it skip scheduling a frame for each second vblank and drop the refresh rate to half of what it should be that way CCBUG: 488843
This commit is contained in:
parent
d12a93f9fb
commit
d0f0481860
1 changed files with 2 additions and 0 deletions
|
@ -79,9 +79,11 @@ void RenderLoopPrivate::scheduleRepaint(std::chrono::nanoseconds lastTargetTimes
|
|||
// also don't switch back if render times are just barely enough for double buffering
|
||||
pageflipsInAdvance = 2;
|
||||
doubleBufferingCounter = 0;
|
||||
expectedCompositingTime = vblankInterval;
|
||||
} else {
|
||||
doubleBufferingCounter++;
|
||||
pageflipsInAdvance = 2;
|
||||
expectedCompositingTime = vblankInterval;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue