Based on EGL implementation, the back buffer contents may or may not be
preserved on eglSwapBuffers ().

Compiz currently relies on preserving back buffer contents for
accumulated damage based rendering updates.

Try to set the eglSwapbuffers () behaviour to preserve back buffer
contents.

Signed-off-by: Pekka Paalanen <[email protected]>
---
 plugins/opengl/src/screen.cpp |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/plugins/opengl/src/screen.cpp b/plugins/opengl/src/screen.cpp
index 5680f23..cc68ecc 100644
--- a/plugins/opengl/src/screen.cpp
+++ b/plugins/opengl/src/screen.cpp
@@ -201,6 +201,9 @@ GLScreen::GLScreen (CompScreen *s) :
        return;
     }
 
+    // Currently we rely unconditionally on preserving the buffer contents.
+    eglSurfaceAttrib (dpy, priv->surface, EGL_SWAP_BEHAVIOR, 
EGL_BUFFER_PRESERVED);
+
     priv->ctx = eglCreateContext (dpy, config, EGL_NO_CONTEXT, 
context_attribs);
     if (priv->ctx == EGL_NO_CONTEXT)
     {
-- 
1.7.3.4

_______________________________________________
dev mailing list
[email protected]
http://lists.compiz.org/mailman/listinfo/dev

Reply via email to