https://bugs.kde.org/show_bug.cgi?id=356992

--- Comment #16 from Thomas Lübking <thomas.luebk...@gmail.com> ---
We need to pre-fetch egl extensions init to know wheter BA is supported,
untested patch:

diff --git a/eglonxbackend.cpp b/eglonxbackend.cpp
index 480e533..abacdaa 100644
--- a/eglonxbackend.cpp
+++ b/eglonxbackend.cpp
@@ -89,6 +89,8 @@ EglOnXBackend::~EglOnXBackend()

 void EglOnXBackend::init()
 {
+    initEgl();       // required to toggle
+    initBufferAge(); // EGL_SWAP_BEHAVIOR_PRESERVED_BIT
     if (!initRenderingContext()) {
         setFailed(QStringLiteral("Could not initialize rendering context"));
         return;
@@ -267,7 +269,7 @@ EGLSurface EglOnXBackend::createSurface(xcb_window_t
window)
 bool EglOnXBackend::initBufferConfigs()
 {
     const EGLint config_attribs[] = {
-        EGL_SURFACE_TYPE,        
EGL_WINDOW_BIT|EGL_SWAP_BEHAVIOR_PRESERVED_BIT,
+        EGL_SURFACE_TYPE,         EGL_WINDOW_BIT|(supportsBufferAge() ? 0 :
EGL_SWAP_BEHAVIOR_PRESERVED_BIT),
         EGL_RED_SIZE,             1,
         EGL_GREEN_SIZE,           1,
         EGL_BLUE_SIZE,            1,

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to