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>
This commit is contained in:
parent
91ae8cd044
commit
2978b7ed19
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user