diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-07-08 18:29:29 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-07-09 19:07:00 +0200 |
commit | 2978b7ed19c577bcf6beca9f3db27b5a12e7afdf (patch) | |
tree | 498dc825d7b6447132c1246a8bd7f17a82a13d87 /src/platformsupport/eglconvenience/qeglplatformbackingstore.cpp | |
parent | 91ae8cd044d9039212a1a71ede91afd5f8cb3ac5 (diff) |
Use RGBA8888 always in the eglfs backingstore
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 <jorgen.lind@digia.com>
Diffstat (limited to 'src/platformsupport/eglconvenience/qeglplatformbackingstore.cpp')
-rw-r--r-- | src/platformsupport/eglconvenience/qeglplatformbackingstore.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
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(); |