platforms/wayland: Present buffers even if nothing has been changed

Present buffers event if nothing has been changed on the screen because
we want to receive the frame callback.
This commit is contained in:
Vlad Zahorodnii 2020-11-20 12:33:57 +02:00
parent 58cb4de1b8
commit bc9df67c79

View file

@ -378,22 +378,6 @@ void EglWaylandBackend::endFrame(int screenId, const QRegion &renderedRegion, co
{
EglWaylandOutput *output = m_outputs[screenId];
QRegion damage = damagedRegion.intersected(output->m_waylandOutput->geometry());
if (damage.isEmpty()) {
// If the damaged region of a window is fully occluded, the only
// rendering done, if any, will have been to repair a reused back
// buffer, making it identical to the front buffer.
//
// In this case we won't post the back buffer. Instead we'll just
// set the buffer age to 1, so the repaired regions won't be
// rendered again in the next frame.
if (!renderedRegion.intersected(output->m_waylandOutput->geometry()).isEmpty()) {
glFlush();
}
output->m_bufferAge = 1;
return;
}
presentOnSurface(output, damage);
if (supportsBufferAge()) {