xcb: replace qt.xcb.glintegration logging category with qt.qpa.gl
This is more concise, consistent with Windows, and fits the pattern that all logging categories in QPA plugins should begin with qt.qpa. Change-Id: Ica169b547cb3d816e6e2c0449f0e4a0c58883b9a Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>bb10
parent
eade27bb67
commit
282ebf9bd2
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
Q_LOGGING_CATEGORY(QT_XCB_GLINTEGRATION, "qt.xcb.glintegration")
|
||||
Q_LOGGING_CATEGORY(lcQpaGl, "qt.qpa.gl")
|
||||
|
||||
QXcbGlIntegration::QXcbGlIntegration()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class QPlatformOffscreenSurface;
|
|||
class QOffscreenSurface;
|
||||
class QXcbNativeInterfaceHandler;
|
||||
|
||||
Q_XCB_EXPORT Q_DECLARE_LOGGING_CATEGORY(QT_XCB_GLINTEGRATION)
|
||||
Q_XCB_EXPORT Q_DECLARE_LOGGING_CATEGORY(lcQpaGl)
|
||||
|
||||
class Q_XCB_EXPORT QXcbGlIntegration
|
||||
{
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ QXcbEglIntegration::QXcbEglIntegration()
|
|||
: m_connection(Q_NULLPTR)
|
||||
, m_egl_display(EGL_NO_DISPLAY)
|
||||
{
|
||||
qCDebug(QT_XCB_GLINTEGRATION) << "Xcb EGL gl-integration created";
|
||||
qCDebug(lcQpaGl) << "Xcb EGL gl-integration created";
|
||||
}
|
||||
|
||||
QXcbEglIntegration::~QXcbEglIntegration()
|
||||
|
|
@ -69,13 +69,13 @@ bool QXcbEglIntegration::initialize(QXcbConnection *connection)
|
|||
bool success = eglInitialize(m_egl_display, &major, &minor);
|
||||
if (!success) {
|
||||
m_egl_display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||
qCDebug(QT_XCB_GLINTEGRATION) << "Xcb EGL gl-integration retrying with display" << m_egl_display;
|
||||
qCDebug(lcQpaGl) << "Xcb EGL gl-integration retrying with display" << m_egl_display;
|
||||
success = eglInitialize(m_egl_display, &major, &minor);
|
||||
}
|
||||
|
||||
m_native_interface_handler.reset(new QXcbEglNativeInterfaceHandler(connection->nativeInterface()));
|
||||
|
||||
qCDebug(QT_XCB_GLINTEGRATION) << "Xcb EGL gl-integration successfully initialized";
|
||||
qCDebug(lcQpaGl) << "Xcb EGL gl-integration successfully initialized";
|
||||
return success;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ QXcbGlxIntegration::QXcbGlxIntegration()
|
|||
: m_connection(Q_NULLPTR)
|
||||
, m_glx_first_event(0)
|
||||
{
|
||||
qCDebug(QT_XCB_GLINTEGRATION) << "Xcb GLX gl-integration created";
|
||||
qCDebug(lcQpaGl) << "Xcb GLX gl-integration created";
|
||||
}
|
||||
|
||||
QXcbGlxIntegration::~QXcbGlxIntegration()
|
||||
|
|
@ -118,7 +118,7 @@ bool QXcbGlxIntegration::initialize(QXcbConnection *connection)
|
|||
xcb_glx_query_version_reply_t *xglx_query = xcb_glx_query_version_reply(m_connection->xcb_connection(),
|
||||
xglx_query_cookie, &error);
|
||||
if (!xglx_query || error) {
|
||||
qCWarning(QT_XCB_GLINTEGRATION) << "QXcbConnection: Failed to initialize GLX";
|
||||
qCWarning(lcQpaGl) << "QXcbConnection: Failed to initialize GLX";
|
||||
free(error);
|
||||
return false;
|
||||
}
|
||||
|
|
@ -127,7 +127,7 @@ bool QXcbGlxIntegration::initialize(QXcbConnection *connection)
|
|||
|
||||
m_native_interface_handler.reset(new QXcbGlxNativeInterfaceHandler(connection->nativeInterface()));
|
||||
|
||||
qCDebug(QT_XCB_GLINTEGRATION) << "Xcb GLX gl-integration successfully initialized";
|
||||
qCDebug(lcQpaGl) << "Xcb GLX gl-integration successfully initialized";
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -644,7 +644,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
|
|||
glIntegrationNames << QStringLiteral("xcb_glx") << QStringLiteral("xcb_egl");
|
||||
QString glIntegrationName = QString::fromLocal8Bit(qgetenv("QT_XCB_GL_INTEGRATION"));
|
||||
if (!glIntegrationName.isEmpty()) {
|
||||
qCDebug(QT_XCB_GLINTEGRATION) << "QT_XCB_GL_INTEGRATION is set to" << glIntegrationName;
|
||||
qCDebug(lcQpaGl) << "QT_XCB_GL_INTEGRATION is set to" << glIntegrationName;
|
||||
if (glIntegrationName != QLatin1String("none")) {
|
||||
glIntegrationNames.removeAll(glIntegrationName);
|
||||
glIntegrationNames.prepend(glIntegrationName);
|
||||
|
|
@ -654,17 +654,17 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra
|
|||
}
|
||||
|
||||
if (!glIntegrationNames.isEmpty()) {
|
||||
qCDebug(QT_XCB_GLINTEGRATION) << "Choosing xcb gl-integration based on following priority\n" << glIntegrationNames;
|
||||
qCDebug(lcQpaGl) << "Choosing xcb gl-integration based on following priority\n" << glIntegrationNames;
|
||||
for (int i = 0; i < glIntegrationNames.size() && !m_glIntegration; i++) {
|
||||
m_glIntegration = QXcbGlIntegrationFactory::create(glIntegrationNames.at(i));
|
||||
if (m_glIntegration && !m_glIntegration->initialize(this)) {
|
||||
qCDebug(QT_XCB_GLINTEGRATION) << "Failed to initialize xcb gl-integration" << glIntegrationNames.at(i);
|
||||
qCDebug(lcQpaGl) << "Failed to initialize xcb gl-integration" << glIntegrationNames.at(i);
|
||||
delete m_glIntegration;
|
||||
m_glIntegration = Q_NULLPTR;
|
||||
}
|
||||
}
|
||||
if (!m_glIntegration)
|
||||
qCDebug(QT_XCB_GLINTEGRATION) << "Failed to create xcb gl-integration";
|
||||
qCDebug(lcQpaGl) << "Failed to create xcb gl-integration";
|
||||
}
|
||||
|
||||
sync();
|
||||
|
|
|
|||
Loading…
Reference in New Issue