From 870679e46fa82b76a8a9daef75a6ef87700a6ddd Mon Sep 17 00:00:00 2001 From: Bhushan Shah Date: Tue, 24 Nov 2020 11:23:37 +0530 Subject: [PATCH] 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. --- platformsupport/scenes/opengl/abstract_egl_backend.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/platformsupport/scenes/opengl/abstract_egl_backend.cpp b/platformsupport/scenes/opengl/abstract_egl_backend.cpp index 542b973d51..74874e9336 100644 --- a/platformsupport/scenes/opengl/abstract_egl_backend.cpp +++ b/platformsupport/scenes/opengl/abstract_egl_backend.cpp @@ -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"))); }