From e0893c1eb7b1081f4a83fa097ca53dd3aebee502 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Sun, 13 Nov 2011 12:50:43 +0100 Subject: [PATCH] set alpha flags after converto32 in eglcreatesurface TODO: this patch is probably wrong --- src/gui/egl/qegl_x11.cpp | 1 + src/gui/image/qpixmap_x11.cpp | 4 ++++ src/gui/image/qpixmap_x11_p.h | 2 ++ 3 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp index c0f8a24..0b601d1 100644 --- a/src/gui/egl/qegl_x11.cpp +++ b/src/gui/egl/qegl_x11.cpp @@ -440,6 +440,7 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEg qWarning("Warning: EGLConfig's depth (32) != pixmap's depth (%d), converting to ARGB32", x11PixmapData->depth()); x11PixmapData->convertToARGB32(true); + x11PixmapData->setFlagsWithAlpha(); } else #endif { diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp index 0e1401c..4b6afeb 100644 --- a/src/gui/image/qpixmap_x11.cpp +++ b/src/gui/image/qpixmap_x11.cpp @@ -2423,5 +2423,9 @@ QPixmap QPixmap::fromX11Pixmap(Qt::HANDLE pixmap, QPixmap::ShareMode mode) return QPixmap(data); } +void QX11PixmapData::setFlagsWithAlpha(){ + flags |= QX11PixmapData::GlSurfaceCreatedWithAlpha; +} + QT_END_NAMESPACE diff --git a/src/gui/image/qpixmap_x11_p.h b/src/gui/image/qpixmap_x11_p.h index 7cd80e6..2665932 100644 --- a/src/gui/image/qpixmap_x11_p.h +++ b/src/gui/image/qpixmap_x11_p.h @@ -101,6 +101,8 @@ public: #ifndef QT_NO_XRENDER void convertToARGB32(bool preserveContents = true); #endif + void setFlagsWithAlpha(); + protected: int metric(QPaintDevice::PaintDeviceMetric metric) const; -- 1.7.7.4