Make it possible to disable partial update at runtime

This makes it possible to disable the partial updates and the swap
buffers with damage at runtime.
This commit is contained in:
Bhushan Shah 2020-11-24 11:23:37 +05:30
parent 70393eec6f
commit 870679e46f

View file

@ -185,7 +185,12 @@ void AbstractEglBackend::initBufferAge()
setSupportsBufferAge(true);
}
setSupportsPartialUpdate(hasExtension(QByteArrayLiteral("EGL_KHR_partial_update")));
if (hasExtension(QByteArrayLiteral("EGL_KHR_partial_update"))) {
const QByteArray usePartialUpdate = qgetenv("KWIN_USE_PARTIAL_UPDATE");
if (usePartialUpdate != "0") {
setSupportsPartialUpdate(true);
}
}
setSupportsSwapBuffersWithDamage(hasExtension(QByteArrayLiteral("EGL_EXT_swap_buffers_with_damage")));
}