From 2978b7ed19c577bcf6beca9f3db27b5a12e7afdf Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 8 Jul 2014 18:29:29 +0200 Subject: Use RGBA8888 always in the eglfs backingstore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do not try to be clever, this format works always. Using RGBX8888 for windows without alpha buffer was a bad idea because it broke renderToTexture widgets (QQuickWidget, QOpenGLWidget) which failed to properly draw the transparent rect with this format. Change-Id: I295d2f8c17490b59cc5e6b9d81035360da28ab3d Reviewed-by: Jørgen Lind --- src/platformsupport/eglconvenience/qeglplatformbackingstore.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/platformsupport') diff --git a/src/platformsupport/eglconvenience/qeglplatformbackingstore.cpp b/src/platformsupport/eglconvenience/qeglplatformbackingstore.cpp index 8abfbf2763..3cb31e36ec 100644 --- a/src/platformsupport/eglconvenience/qeglplatformbackingstore.cpp +++ b/src/platformsupport/eglconvenience/qeglplatformbackingstore.cpp @@ -231,14 +231,7 @@ void QEGLPlatformBackingStore::resize(const QSize &size, const QRegion &staticCo if (!dstWin || (!dstWin->isRaster() && dstWin->window()->surfaceType() != QSurface::RasterGLSurface)) return; - // Child windows do not get real native surfaces and so share the same - // format as the parent, regardless of what has been requested. The - // exception is WA_TranslucentBackground that sets alphaBufferSize in the - // requested format, this has to be taken into account when compositing. - const bool translucent = m_window->window()->requestedFormat().alphaBufferSize() > 0; - const QImage::Format format = translucent ? QImage::Format_RGBA8888 : QImage::Format_RGBX8888; - - m_image = QImage(size, format); + m_image = QImage(size, QImage::Format_RGBA8888); m_window->create(); -- cgit v1.2.3