summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-03-24 20:03:22 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-25 12:50:55 +0100
commit11a6270079657e40ff57d47be1eef6cb09a40d23 (patch)
treef1066a180e63b02d8728c02687705af03b068d5b /src/plugins
parentdc685cf6331f5fb46285cf10d6464c2ecf41f73e (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.cpp11
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