diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-03-24 20:03:22 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-25 12:50:55 +0100 |
commit | 11a6270079657e40ff57d47be1eef6cb09a40d23 (patch) | |
tree | f1066a180e63b02d8728c02687705af03b068d5b /src/plugins | |
parent | dc685cf6331f5fb46285cf10d6464c2ecf41f73e (diff) |
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>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfshooks_stub.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp index dfb766db32..4aa3f29260 100644 --- a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp +++ b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp @@ -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 |