eglfs: Add a way to force 24/32 bit configs
Some embedded devices do not play nicely with 16-bit (565) EGL configurations, resulting in ugly banding in Quick apps. Add a QT_QPA_EGLFS_FORCE888 environment variable that can be set on systems where it is known that only 24 or 32 bit configs provide acceptable results. Change-Id: I7b8d7b9a2cd40b51a844d0795b7156b735e18ebb Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
This commit is contained in:
parent
dc685cf633
commit
11a6270079
@ -141,7 +141,16 @@ QImage::Format QEglFSHooks::screenFormat() const
|
||||
|
||||
QSurfaceFormat QEglFSHooks::surfaceFormatFor(const QSurfaceFormat &inputFormat) const
|
||||
{
|
||||
return inputFormat;
|
||||
QSurfaceFormat format = inputFormat;
|
||||
|
||||
static const bool force888 = qgetenv("QT_QPA_EGLFS_FORCE888").toInt();
|
||||
if (force888) {
|
||||
format.setRedBufferSize(8);
|
||||
format.setGreenBufferSize(8);
|
||||
format.setBlueBufferSize(8);
|
||||
}
|
||||
|
||||
return format;
|
||||
}
|
||||
|
||||
bool QEglFSHooks::filterConfig(EGLDisplay, EGLConfig) const
|
||||
|
Loading…
Reference in New Issue
Block a user