From dc685cf6331f5fb46285cf10d6464c2ecf41f73e Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 24 Mar 2014 20:09:11 +0100 Subject: eglfs: Print the chosen config in debug mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/platformsupport/eglconvenience/qeglplatformcontext.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/platformsupport/eglconvenience/qeglplatformcontext.cpp') 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 #include +#include 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[] = { -- cgit v1.2.3