From 52c35c1ce798e6ec3aef86d5081d211cabe5daaf Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 19 Jun 2015 10:34:24 +0200 Subject: xcb: make it possible to disable gl integrations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By setting QT_XCB_GL_INTEGRATION to the special value "none", no plugins will be considered for loading. This matches what eglfs does with QT_QPA_EGLFS_INTEGRATION. This allows widget or raster-QWindow-only apps to start up faster by not spending time on plugin loading and potential initialization steps there. Task-number: QTBUG-46765 Change-Id: Ifeec3548a9b58f619a18e0be75fe4a9f489677a9 Reviewed-by: Jørgen Lind --- src/plugins/platforms/xcb/qxcbconnection.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 80c844e658..b8b665157b 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -532,9 +532,14 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra QStringList glIntegrationNames; glIntegrationNames << QStringLiteral("xcb_glx") << QStringLiteral("xcb_egl"); QString glIntegrationName = QString::fromLocal8Bit(qgetenv("QT_XCB_GL_INTEGRATION")); - if (glIntegrationName.size()) { - glIntegrationNames.removeAll(glIntegrationName); - glIntegrationNames.prepend(glIntegrationName); + if (!glIntegrationName.isEmpty()) { + qCDebug(QT_XCB_GLINTEGRATION) << "QT_XCB_GL_INTEGRATION is set to" << glIntegrationName; + if (glIntegrationName != QStringLiteral("none")) { + glIntegrationNames.removeAll(glIntegrationName); + glIntegrationNames.prepend(glIntegrationName); + } else { + glIntegrationNames.clear(); + } } qCDebug(QT_XCB_GLINTEGRATION) << "Choosing xcb gl-integration based on following priority\n" << glIntegrationNames; -- cgit v1.2.3