Commit fc60e8f1 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii

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

This is needed to ensure that the compositor always receives swap events
even if nothing has been changed on the screen.
parent bc9df67c
......@@ -50,22 +50,6 @@ void EglBackend::endFrame(int screenId, const QRegion &renderedRegion, const QRe
{
Q_UNUSED(screenId)
if (damagedRegion.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.isEmpty())
glFlush();
m_bufferAge = 1;
return;
}
presentSurface(surface(), renderedRegion, screens()->geometry());
if (overlayWindow() && overlayWindow()->window()) { // show the window only after the first pass,
......@@ -80,9 +64,6 @@ void EglBackend::endFrame(int screenId, const QRegion &renderedRegion, const QRe
void EglBackend::presentSurface(EGLSurface surface, const QRegion &damage, const QRect &screenGeometry)
{
if (damage.isEmpty()) {
return;
}
const bool fullRepaint = supportsBufferAge() || (damage == screenGeometry);
if (fullRepaint || !havePostSubBuffer()) {
......
......@@ -665,10 +665,6 @@ void GlxBackend::setSwapInterval(int interval)
void GlxBackend::present(const QRegion &damage)
{
if (damage.isEmpty()) {
return;
}
const QSize &screenSize = screens()->size();
const QRegion displayRegion(0, 0, screenSize.width(), screenSize.height());
const bool fullRepaint = supportsBufferAge() || (damage == displayRegion);
......@@ -737,21 +733,6 @@ void GlxBackend::endFrame(int screenId, const QRegion &renderedRegion, const QRe
{
Q_UNUSED(screenId)
if (damagedRegion.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.isEmpty())
glFlush();
m_bufferAge = 1;
return;
}
present(renderedRegion);
if (overlayWindow()->window()) // show the window only after the first pass,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment