diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-03-24 20:09:11 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-25 12:50:47 +0100 |
commit | dc685cf6331f5fb46285cf10d6464c2ecf41f73e (patch) | |
tree | 3ac017efe2a2b8e5ef9ba7e781bf08117e377969 /src/platformsupport/eglconvenience/qeglplatformcontext.cpp | |
parent | ebcb5c176fa3552960f3b96c2fcbd7aaa2b29e50 (diff) |
eglfs: Print the chosen config in debug mode
q_printEglConfig has been left unused. Start using it again,
in case QT_QPA_EGLFS_DEBUG is set. This will, similarly to QSG_INFO,
help debugging, especially on embedded devices.
Change-Id: I1448632ed055dd71e98259f042d3cac64620a4ce
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/platformsupport/eglconvenience/qeglplatformcontext.cpp')
-rw-r--r-- | src/platformsupport/eglconvenience/qeglplatformcontext.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp index 9c3b9b539c..0dcb9f68bb 100644 --- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp +++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp @@ -44,6 +44,7 @@ #include "qeglpbuffer_p.h" #include <qpa/qplatformwindow.h> #include <QOpenGLContext> +#include <QDebug> QT_BEGIN_NAMESPACE @@ -191,6 +192,12 @@ void QEGLPlatformContext::init(const QSurfaceFormat &format, QPlatformOpenGLCont return; } + static const bool printConfig = qgetenv("QT_QPA_EGLFS_DEBUG").toInt(); + if (printConfig) { + qDebug() << "Created context for format" << format << "with config:"; + q_printEglConfig(m_eglDisplay, m_eglConfig); + } + #ifndef QT_NO_OPENGL // Make the context current to ensure the GL version query works. This needs a surface too. const EGLint pbufferAttributes[] = { |