From ba6c87d52843c8642395c96f2571e2a7c45f74af Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Fri, 10 Jun 2011 12:42:36 +0200 Subject: [PATCH] Handle surfaces with alpha channel in xcomposite_egl --- .../hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qt-compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp b/src/qt-compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp index 0321e07..c854530 100644 --- a/src/qt-compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp +++ b/src/qt-compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp @@ -20,7 +20,8 @@ QVector eglbuildSpec() spec.append(EGL_SURFACE_TYPE); spec.append(EGL_PIXMAP_BIT); spec.append(EGL_RENDERABLE_TYPE); spec.append(EGL_OPENGL_ES2_BIT); - spec.append(EGL_BIND_TO_TEXTURE_RGB); spec.append(EGL_TRUE); + spec.append(EGL_BIND_TO_TEXTURE_RGBA); spec.append(EGL_TRUE); + spec.append(EGL_ALPHA_SIZE); spec.append(8); spec.append(EGL_NONE); return spec; } @@ -80,7 +81,7 @@ GLuint XCompositeEglIntegration::createTextureFromBuffer(wl_buffer *buffer) QVector attribList; attribList.append(EGL_TEXTURE_FORMAT); - attribList.append(EGL_TEXTURE_RGB); + attribList.append(EGL_TEXTURE_RGBA); attribList.append(EGL_TEXTURE_TARGET); attribList.append(EGL_TEXTURE_2D); attribList.append(EGL_NONE); -- 2.7.4