diff options
Diffstat (limited to 'src/plugins/platforms/xcb/gl_integrations/xcb_glx')
11 files changed, 178 insertions, 517 deletions
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt new file mode 100644 index 0000000000..f9f78ad1eb --- /dev/null +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt @@ -0,0 +1,43 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +##################################################################### +## QXcbGlxIntegrationPlugin Plugin: +##################################################################### + +qt_internal_add_plugin(QXcbGlxIntegrationPlugin + OUTPUT_NAME qxcb-glx-integration + PLUGIN_TYPE xcbglintegrations + SOURCES + qglxintegration.cpp qglxintegration.h + qxcbglxintegration.cpp qxcbglxintegration.h + qxcbglxmain.cpp + qxcbglxnativeinterfacehandler.cpp qxcbglxnativeinterfacehandler.h + qxcbglxwindow.cpp qxcbglxwindow.h + DEFINES + QT_NO_FOREACH + INCLUDE_DIRECTORIES + .. + ../.. + LIBRARIES + Qt::Core + Qt::CorePrivate + Qt::Gui + Qt::GuiPrivate + Qt::XcbQpaPrivate + NO_UNITY_BUILD # X11 define clashes +) + +## Scopes: +##################################################################### + +qt_internal_extend_target(QXcbGlxIntegrationPlugin CONDITION QT_FEATURE_xcb_glx + LIBRARIES + XCB::GLX +) + +qt_internal_extend_target(QXcbGlxIntegrationPlugin + CONDITION QT_FEATURE_dlopen AND QT_BUILD_SHARED_LIBS + LIBRARIES + ${CMAKE_DL_LIBS} +) diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp index 2b77062b16..04eac027cd 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include <QDebug> @@ -51,12 +15,12 @@ #if QT_CONFIG(regularexpression) # include <QtCore/QRegularExpression> #endif +#include <QtGui/qguiapplication.h> #include <QtGui/QOpenGLContext> #include <QtGui/QOffscreenSurface> #include "qglxintegration.h" -#include <QtGlxSupport/private/qglxconvenience_p.h> -#include <QtPlatformHeaders/QGLXNativeContext> +#include <QtGui/private/qglxconvenience_p.h> #include "qxcbglintegration.h" @@ -219,33 +183,15 @@ static void updateFormatFromContext(QSurfaceFormat &format) } } -QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlatformOpenGLContext *share, - const QVariant &nativeHandle) +QGLXContext::QGLXContext(Display *display, QXcbScreen *screen, const QSurfaceFormat &format, QPlatformOpenGLContext *share) : QPlatformOpenGLContext() - , m_display(static_cast<Display *>(screen->connection()->xlib_display())) - , m_config(0) - , m_context(0) - , m_shareContext(0) + , m_display(display) , m_format(format) - , m_isPBufferCurrent(false) - , m_ownsContext(nativeHandle.isNull()) - , m_getGraphicsResetStatus(0) - , m_lost(false) -{ - if (nativeHandle.isNull()) - init(screen, share); - else - init(screen, share, nativeHandle); -} - -void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share) + , m_ownsContext(true) { if (m_format.renderableType() == QSurfaceFormat::DefaultRenderableType) -#if defined(QT_OPENGL_ES_2) - m_format.setRenderableType(QSurfaceFormat::OpenGLES); -#else - m_format.setRenderableType(QSurfaceFormat::OpenGL); -#endif + m_format.setRenderableType(QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL + ? QSurfaceFormat::OpenGL : QSurfaceFormat::OpenGLES); if (m_format.renderableType() != QSurfaceFormat::OpenGL && m_format.renderableType() != QSurfaceFormat::OpenGLES) return; @@ -254,14 +200,14 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share) GLXFBConfig config = qglx_findConfig(m_display, screen->screenNumber(), m_format); m_config = config; - XVisualInfo *visualInfo = 0; + XVisualInfo *visualInfo = nullptr; Window window = 0; // Temporary window used to query OpenGL context if (config) { const QByteArrayList glxExt = QByteArray(glXQueryExtensionsString(m_display, screen->screenNumber())).split(' '); // Resolve entry point for glXCreateContextAttribsARB - glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0; + glXCreateContextAttribsARBProc glXCreateContextAttribsARB = nullptr; if (glxExt.contains("GLX_ARB_create_context")) glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc) glXGetProcAddress((const GLubyte*)"glXCreateContextAttribsARB"); @@ -271,13 +217,13 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share) // Use glXCreateContextAttribsARB if available // Also, GL ES context creation requires GLX_EXT_create_context_es2_profile - if (glXCreateContextAttribsARB != 0 + if (glXCreateContextAttribsARB != nullptr && (m_format.renderableType() != QSurfaceFormat::OpenGLES || (supportsProfiles && glxExt.contains("GLX_EXT_create_context_es2_profile")))) { // Try to create an OpenGL context for each known OpenGL version in descending // order from the requested version. const int requestedVersion = m_format.majorVersion() * 10 + qMin(m_format.minorVersion(), 9); - QVector<int> glVersions; + QList<int> glVersions; if (m_format.renderableType() == QSurfaceFormat::OpenGL) { if (requestedVersion > 46) glVersions << requestedVersion; @@ -296,9 +242,9 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share) // Robustness must match that of the shared context. if (share && share->format().testOption(QSurfaceFormat::ResetNotification)) m_format.setOption(QSurfaceFormat::ResetNotification); - Q_ASSERT(glVersions.count() > 0); + Q_ASSERT(glVersions.size() > 0); - for (int i = 0; !m_context && i < glVersions.count(); i++) { + for (int i = 0; !m_context && i < glVersions.size(); i++) { const int version = glVersions[i]; if (version > requestedVersion) continue; @@ -306,7 +252,7 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share) const int majorVersion = version / 10; const int minorVersion = version % 10; - QVector<int> contextAttributes; + QList<int> contextAttributes; contextAttributes << GLX_CONTEXT_MAJOR_VERSION_ARB << majorVersion << GLX_CONTEXT_MINOR_VERSION_ARB << minorVersion; @@ -339,7 +285,7 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share) } if (supportsRobustness && m_format.testOption(QSurfaceFormat::ResetNotification)) { - QVector<int> contextAttributesWithRobustness = contextAttributes; + QList<int> contextAttributesWithRobustness = contextAttributes; contextAttributesWithRobustness << GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB << GLX_LOSE_CONTEXT_ON_RESET_ARB; if (supportsVideoMemoryPurge) contextAttributesWithRobustness << GLX_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV << GL_TRUE; @@ -358,9 +304,9 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share) m_context = glXCreateContextAttribsARB(m_display, config, m_shareContext, true, contextAttributes.data()); if (!m_context && m_shareContext) { // re-try without a shared glx context - m_context = glXCreateContextAttribsARB(m_display, config, 0, true, contextAttributes.data()); + m_context = glXCreateContextAttribsARB(m_display, config, nullptr, true, contextAttributes.data()); if (m_context) - m_shareContext = 0; + m_shareContext = nullptr; } } } @@ -375,9 +321,9 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share) m_context = glXCreateNewContext(m_display, config, GLX_RGBA_TYPE, m_shareContext, true); if (!m_context && m_shareContext) { // re-try without a shared glx context - m_context = glXCreateNewContext(m_display, config, GLX_RGBA_TYPE, 0, true); + m_context = glXCreateNewContext(m_display, config, GLX_RGBA_TYPE, nullptr, true); if (m_context) - m_shareContext = 0; + m_shareContext = nullptr; } } @@ -399,7 +345,7 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share) m_context = glXCreateContext(m_display, visualInfo, m_shareContext, true); if (!m_context && m_shareContext) { // re-try without a shared glx context - m_shareContext = 0; + m_shareContext = nullptr; m_context = glXCreateContext(m_display, visualInfo, nullptr, true); } @@ -423,85 +369,55 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share) XDestroyWindow(m_display, window); } -void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share, const QVariant &nativeHandle) +QGLXContext::QGLXContext(Display *display, GLXContext context, void *visualInfo, QPlatformOpenGLContext *share) + : QPlatformOpenGLContext() + , m_display(display) { - if (!nativeHandle.canConvert<QGLXNativeContext>()) { - qWarning("QGLXContext: Requires a QGLXNativeContext"); - return; - } - QGLXNativeContext handle = nativeHandle.value<QGLXNativeContext>(); - GLXContext context = handle.context(); - if (!context) { - qWarning("QGLXContext: No GLXContext given"); - return; - } + // Legacy contexts created using glXCreateContext are created using a + // XVisualInfo. If the user passed one we should use that. + XVisualInfo *vinfo = static_cast<XVisualInfo*>(visualInfo); - // Use the provided Display, if available. If not, use our own. It may still work. - Display *dpy = handle.display(); - if (!dpy) - dpy = m_display; - - // Legacy contexts created using glXCreateContext are created using a visual - // and the FBConfig cannot be queried. The only way to adapt these contexts - // is to figure out the visual id. - XVisualInfo *vinfo = 0; - // If the VisualID is provided use it. - VisualID vid = handle.visualId(); - if (!vid) { - // In the absence of the VisualID figure it out from the window. - Window wnd = handle.window(); - if (wnd) { - XWindowAttributes attrs; - XGetWindowAttributes(dpy, wnd, &attrs); - vid = XVisualIDFromVisual(attrs.visual); - } - } - if (vid) { - XVisualInfo v; - v.screen = screen->screenNumber(); - v.visualid = vid; - int n = 0; - vinfo = XGetVisualInfo(dpy, VisualScreenMask | VisualIDMask, &v, &n); - if (n < 1) { - XFree(vinfo); - vinfo = 0; - } - } - - // For contexts created with an FBConfig using the modern functions providing the - // visual or window is not mandatory. Just query the config from the context. - GLXFBConfig config = 0; + // Otherwise assume the context was created with an FBConfig using the modern functions if (!vinfo) { int configId = 0; - if (glXQueryContext(dpy, context, GLX_FBCONFIG_ID, &configId) != Success) { + if (glXQueryContext(m_display, context, GLX_FBCONFIG_ID, &configId) != Success) { qWarning("QGLXContext: Failed to query config from the provided context"); return; } + int screenNumber = 0; + if (glXQueryContext(m_display, context, GLX_SCREEN, &screenNumber) != Success) { + qWarning("QGLXContext: Failed to query screen from the provided context"); + screenNumber = DefaultScreen(m_display); + } + GLXFBConfig *configs; int numConfigs = 0; static const int attribs[] = { GLX_FBCONFIG_ID, configId, None }; - configs = glXChooseFBConfig(dpy, screen->screenNumber(), attribs, &numConfigs); - if (!configs || numConfigs < 1) { + configs = glXChooseFBConfig(m_display, screenNumber, attribs, &numConfigs); + if (!configs) { + qWarning("QGLXContext: Failed to find config(invalid arguments for glXChooseFBConfig)"); + return; + } else if (numConfigs < 1) { qWarning("QGLXContext: Failed to find config"); + XFree(configs); return; } if (configs && numConfigs > 1) // this is suspicious so warn but let it continue qWarning("QGLXContext: Multiple configs for FBConfig ID %d", configId); - config = configs[0]; - // Store the config. - m_config = config; + m_config = configs[0]; + XFree(configs); } - Q_ASSERT(vinfo || config); + Q_ASSERT(vinfo || m_config); - int screenNumber = DefaultScreen(dpy); + int screenNumber = DefaultScreen(m_display); Window window; if (vinfo) - window = createDummyWindow(dpy, vinfo, screenNumber, RootWindow(dpy, screenNumber)); + window = createDummyWindow(m_display, vinfo, screenNumber, RootWindow(m_display, screenNumber)); else - window = createDummyWindow(dpy, config, screenNumber, RootWindow(dpy, screenNumber)); + window = createDummyWindow(m_display, m_config, screenNumber, RootWindow(m_display, screenNumber)); if (!window) { qWarning("QGLXContext: Failed to create dummy window"); return; @@ -510,7 +426,7 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share, const // Update OpenGL version and buffer sizes in our format. GLXContext prevContext = glXGetCurrentContext(); GLXDrawable prevDrawable = glXGetCurrentDrawable(); - if (!glXMakeCurrent(dpy, window, context)) { + if (!glXMakeCurrent(m_display, window, context)) { qWarning("QGLXContext: Failed to make provided context current"); return; } @@ -519,11 +435,11 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share, const ? QSurfaceFormat::OpenGL : QSurfaceFormat::OpenGLES); updateFormatFromContext(m_format); if (vinfo) - qglx_surfaceFormatFromVisualInfo(&m_format, dpy, vinfo); + qglx_surfaceFormatFromVisualInfo(&m_format, m_display, vinfo); else - qglx_surfaceFormatFromGLXFBConfig(&m_format, dpy, config); - glXMakeCurrent(dpy, prevDrawable, prevContext); - XDestroyWindow(dpy, window); + qglx_surfaceFormatFromGLXFBConfig(&m_format, m_display, m_config); + glXMakeCurrent(m_display, prevDrawable, prevContext); + XDestroyWindow(m_display, window); if (vinfo) XFree(vinfo); @@ -552,11 +468,6 @@ static QXcbScreen *screenForPlatformSurface(QPlatformSurface *surface) return nullptr; } -QVariant QGLXContext::nativeHandle() const -{ - return QVariant::fromValue<QGLXNativeContext>(QGLXNativeContext(m_context)); -} - bool QGLXContext::makeCurrent(QPlatformSurface *surface) { bool success = false; @@ -595,8 +506,8 @@ bool QGLXContext::makeCurrent(QPlatformSurface *surface) if (interval >= 0 && interval != window->swapInterval() && screen) { typedef void (*qt_glXSwapIntervalEXT)(Display *, GLXDrawable, int); typedef void (*qt_glXSwapIntervalMESA)(unsigned int); - static qt_glXSwapIntervalEXT glXSwapIntervalEXT = 0; - static qt_glXSwapIntervalMESA glXSwapIntervalMESA = 0; + static qt_glXSwapIntervalEXT glXSwapIntervalEXT = nullptr; + static qt_glXSwapIntervalMESA glXSwapIntervalMESA = nullptr; static bool resolved = false; if (!resolved) { resolved = true; @@ -621,9 +532,9 @@ bool QGLXContext::makeCurrent(QPlatformSurface *surface) void QGLXContext::doneCurrent() { if (m_isPBufferCurrent) - glXMakeContextCurrent(m_display, 0, 0, 0); + glXMakeContextCurrent(m_display, 0, 0, nullptr); else - glXMakeCurrent(m_display, 0, 0); + glXMakeCurrent(m_display, 0, nullptr); m_isPBufferCurrent = false; } @@ -658,12 +569,12 @@ QSurfaceFormat QGLXContext::format() const bool QGLXContext::isSharing() const { - return m_shareContext != 0; + return m_shareContext != nullptr; } bool QGLXContext::isValid() const { - return m_context != 0 && !m_lost; + return m_context != nullptr && !m_lost; } bool QGLXContext::m_queriedDummyContext = false; @@ -675,7 +586,7 @@ bool QGLXContext::m_supportsThreading = true; // binary search. static const char *qglx_threadedgl_blacklist_renderer[] = { "Chromium", // QTBUG-32225 (initialization fails) - 0 + nullptr }; static const char *qglx_threadedgl_blacklist_vendor[] = { @@ -695,7 +606,7 @@ void QGLXContext::queryDummyContext() return; QOpenGLContext *oldContext = QOpenGLContext::currentContext(); - QSurface *oldSurface = 0; + QSurface *oldSurface = nullptr; if (oldContext) oldSurface = oldContext->surface(); @@ -732,7 +643,7 @@ void QGLXContext::queryDummyContext() if (const char *renderer = (const char *) glGetString(GL_RENDERER)) { for (int i = 0; qglx_threadedgl_blacklist_renderer[i]; ++i) { - if (strstr(renderer, qglx_threadedgl_blacklist_renderer[i]) != 0) { + if (strstr(renderer, qglx_threadedgl_blacklist_renderer[i]) != nullptr) { qCDebug(lcQpaGl).nospace() << "Multithreaded OpenGL disabled: " "blacklisted renderer \"" << qglx_threadedgl_blacklist_renderer[i] @@ -744,7 +655,7 @@ void QGLXContext::queryDummyContext() } if (const char *vendor = (const char *) glGetString(GL_VENDOR)) { for (int i = 0; qglx_threadedgl_blacklist_vendor[i]; ++i) { - if (strstr(vendor, qglx_threadedgl_blacklist_vendor[i]) != 0) { + if (strstr(vendor, qglx_threadedgl_blacklist_vendor[i]) != nullptr) { qCDebug(lcQpaGl).nospace() << "Multithreaded OpenGL disabled: " "blacklisted vendor \"" << qglx_threadedgl_blacklist_vendor[i] @@ -759,7 +670,7 @@ void QGLXContext::queryDummyContext() // Blacklist Mesa drivers due to QTCREATORBUG-10875 (crash in creator), // QTBUG-34492 (flickering in fullscreen) and QTBUG-38221 const char *mesaVersionStr = nullptr; - if (strstr(glxvendor, "Mesa Project") != 0) { + if (strstr(glxvendor, "Mesa Project") != nullptr) { mesaVersionStr = (const char *) glGetString(GL_VERSION); m_supportsThreading = false; } @@ -786,6 +697,10 @@ void QGLXContext::queryDummyContext() } } + static bool nomultithread = qEnvironmentVariableIsSet("QT_XCB_NO_THREADED_OPENGL"); + if (nomultithread) + m_supportsThreading = false; + context.doneCurrent(); if (oldContext && oldSurface) oldContext->makeCurrent(oldSurface); diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h index 2a88fd6e59..f46ae46b31 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QGLXINTEGRATION_H #define QGLXINTEGRATION_H @@ -53,11 +17,12 @@ QT_BEGIN_NAMESPACE -class QGLXContext : public QPlatformOpenGLContext +class QGLXContext : public QPlatformOpenGLContext, + public QNativeInterface::QGLXContext { public: - QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlatformOpenGLContext *share, - const QVariant &nativeHandle); + QGLXContext(Display *display, QXcbScreen *screen, const QSurfaceFormat &format, QPlatformOpenGLContext *share); + QGLXContext(Display *display, GLXContext context, void *visualInfo, QPlatformOpenGLContext *share); ~QGLXContext(); bool makeCurrent(QPlatformSurface *surface) override; @@ -69,27 +34,24 @@ public: bool isSharing() const override; bool isValid() const override; + GLXContext nativeContext() const override { return glxContext(); } + GLXContext glxContext() const { return m_context; } GLXFBConfig glxConfig() const { return m_config; } - QVariant nativeHandle() const; - static bool supportsThreading(); static void queryDummyContext(); private: - void init(QXcbScreen *screen, QPlatformOpenGLContext *share); - void init(QXcbScreen *screen, QPlatformOpenGLContext *share, const QVariant &nativeHandle); - - Display *m_display; - GLXFBConfig m_config; - GLXContext m_context; - GLXContext m_shareContext; + Display *m_display = nullptr; + GLXFBConfig m_config = nullptr; + GLXContext m_context = nullptr; + GLXContext m_shareContext = nullptr; QSurfaceFormat m_format; - bool m_isPBufferCurrent; - bool m_ownsContext; - GLenum (APIENTRY * m_getGraphicsResetStatus)(); - bool m_lost; + bool m_isPBufferCurrent = false; + bool m_ownsContext = false; + GLenum (APIENTRY * m_getGraphicsResetStatus)() = nullptr; + bool m_lost = false; static bool m_queriedDummyContext; static bool m_supportsThreading; }; diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp index 34895caaa2..db0de187be 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qxcbglxintegration.h" @@ -48,7 +12,9 @@ #include "qxcbscreen.h" #include "qglxintegration.h" +#include <QtCore/QVersionNumber> #include <QtGui/QOpenGLContext> +#include <QtGui/private/qopenglcontext_p.h> #include "qxcbglxnativeinterfacehandler.h" @@ -59,6 +25,9 @@ QT_BEGIN_NAMESPACE #if QT_CONFIG(xcb_glx) + #define QT_XCB_GLX_REQUIRED_MAJOR 1 + #define QT_XCB_GLX_REQUIRED_MINOR 3 + #if XCB_GLX_MAJOR_VERSION == 1 && XCB_GLX_MINOR_VERSION < 4 #define XCB_GLX_BUFFER_SWAP_COMPLETE 1 typedef struct xcb_glx_buffer_swap_complete_event_t { @@ -113,7 +82,9 @@ bool QXcbGlxIntegration::initialize(QXcbConnection *connection) auto xglx_query = Q_XCB_REPLY(xcb_glx_query_version, m_connection->xcb_connection(), XCB_GLX_MAJOR_VERSION, XCB_GLX_MINOR_VERSION); - if (!xglx_query) { + if ((!xglx_query) + || (QVersionNumber(xglx_query->major_version, xglx_query->minor_version) + < QVersionNumber(QT_XCB_GLX_REQUIRED_MAJOR, QT_XCB_GLX_REQUIRED_MINOR))) { qCWarning(lcQpaGl) << "QXcbConnection: Failed to initialize GLX"; return false; } @@ -133,7 +104,7 @@ bool QXcbGlxIntegration::handleXcbEvent(xcb_generic_event_t *event, uint respons Display *xdisplay = static_cast<Display *>(m_connection->xlib_display()); XLockDisplay(xdisplay); bool locked = true; - Bool (*proc)(Display*, XEvent*, xEvent*) = XESetWireToEvent(xdisplay, responseType, 0); + Bool (*proc)(Display*, XEvent*, xEvent*) = XESetWireToEvent(xdisplay, responseType, nullptr); if (proc) { XESetWireToEvent(xdisplay, responseType, proc); XEvent dummy; @@ -164,11 +135,7 @@ bool QXcbGlxIntegration::handleXcbEvent(xcb_generic_event_t *event, uint respons XUnlockDisplay(xdisplay); locked = false; auto eventType = m_connection->nativeInterface()->nativeEventType(); -# if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) qintptr result = 0; -# else - long result = 0; -# endif handled = dispatcher->filterNativeEvent(eventType, &ev, &result); } #endif @@ -187,10 +154,22 @@ QXcbWindow *QXcbGlxIntegration::createWindow(QWindow *window) const QPlatformOpenGLContext *QXcbGlxIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const { QXcbScreen *screen = static_cast<QXcbScreen *>(context->screen()->handle()); - QGLXContext *platformContext = new QGLXContext(screen, screen->surfaceFormatFor(context->format()), - context->shareHandle(), context->nativeHandle()); - context->setNativeHandle(platformContext->nativeHandle()); - return platformContext; + return new QGLXContext(static_cast<Display *>(m_connection->xlib_display()), + screen, screen->surfaceFormatFor(context->format()), context->shareHandle()); +} + +QOpenGLContext *QXcbGlxIntegration::createOpenGLContext(GLXContext glxContext, void *visualInfo, QOpenGLContext *shareContext) const +{ + if (!glxContext) + return nullptr; + + QPlatformOpenGLContext *shareHandle = shareContext ? shareContext->handle() : nullptr; + + auto *context = new QOpenGLContext; + auto *contextPrivate = QOpenGLContextPrivate::get(context); + auto *display = static_cast<Display *>(m_connection->xlib_display()); + contextPrivate->adopt(new QGLXContext(display, glxContext, visualInfo, shareHandle)); + return context; } QPlatformOffscreenSurface *QXcbGlxIntegration::createPlatformOffscreenSurface(QOffscreenSurface *surface) const @@ -212,7 +191,7 @@ QPlatformOffscreenSurface *QXcbGlxIntegration::createPlatformOffscreenSurface(QO if (glxPbufferUsable) return new QGLXPbuffer(surface); else - return 0; // trigger fallback to hidden QWindow + return nullptr; // trigger fallback to hidden QWindow } diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h index 26cb233a59..797f6c4b3f 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QXCBGLXINTEGRATION_H #define QXCBGLXINTEGRATION_H @@ -46,7 +10,8 @@ QT_BEGIN_NAMESPACE class QXcbNativeInterfaceHandler; -class QXcbGlxIntegration : public QXcbGlIntegration +class QXcbGlxIntegration : public QXcbGlIntegration, + public QNativeInterface::Private::QGLXIntegration { public: QXcbGlxIntegration(); @@ -58,6 +23,7 @@ public: QXcbWindow *createWindow(QWindow *window) const override; QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override; QPlatformOffscreenSurface *createPlatformOffscreenSurface(QOffscreenSurface *surface) const override; + QOpenGLContext *createOpenGLContext(GLXContext context, void *visualInfo, QOpenGLContext *shareContext) const override; bool supportsThreadedOpenGL() const override; bool supportsSwitchableWidgetComposition() const override; diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxmain.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxmain.cpp index 1883d1bc52..63ecaac0be 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxmain.cpp +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxmain.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qxcbglintegrationplugin.h" @@ -48,7 +12,7 @@ class QXcbGlxIntegrationPlugin : public QXcbGlIntegrationPlugin Q_OBJECT Q_PLUGIN_METADATA(IID QXcbGlIntegrationFactoryInterface_iid FILE "xcb_glx.json") public: - QXcbGlIntegration *create() + QXcbGlIntegration *create() override { return new QXcbGlxIntegration(); } diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxnativeinterfacehandler.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxnativeinterfacehandler.cpp index e9bb4460ff..e363dc077f 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxnativeinterfacehandler.cpp +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxnativeinterfacehandler.cpp @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qxcbglxnativeinterfacehandler.h" diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxnativeinterfacehandler.h b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxnativeinterfacehandler.h index d877732725..5ca329a368 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxnativeinterfacehandler.h +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxnativeinterfacehandler.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QXCBGLXNATIVEINTERFACEHANDLER_H #define QXCBGLXNATIVEINTERFACEHANDLER_H diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp index 5e406017ca..31bf39e400 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp @@ -1,46 +1,10 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include "qxcbglxwindow.h" #include "qxcbscreen.h" -#include <QtGlxSupport/private/qglxconvenience_p.h> +#include <QtGui/private/qglxconvenience_p.h> #include <QDebug> QT_BEGIN_NAMESPACE @@ -58,7 +22,7 @@ const xcb_visualtype_t *QXcbGlxWindow::createVisual() { QXcbScreen *scr = xcbScreen(); if (!scr) - return nullptr; + return QXcbWindow::createVisual(); qCDebug(lcQpaGl) << "Requested format before FBConfig/Visual selection:" << m_format; @@ -71,10 +35,13 @@ const xcb_visualtype_t *QXcbGlxWindow::createVisual() flags |= QGLX_SUPPORTS_SRGB; } + const auto formatBackup = m_format; XVisualInfo *visualInfo = qglx_findVisualInfo(dpy, scr->screenNumber(), &m_format, GLX_WINDOW_BIT, flags); if (!visualInfo) { - qWarning() << "No XVisualInfo for format" << m_format; - return nullptr; + qCDebug(lcQpaGl) << "No XVisualInfo for format" << m_format; + // restore initial format before requesting it again + m_format = formatBackup; + return QXcbWindow::createVisual(); } const xcb_visualtype_t *xcb_visualtype = scr->visualForId(visualInfo->visualid); XFree(visualInfo); diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.h b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.h index 14b2d5e6eb..3b39dc1ba0 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.h +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.h @@ -1,41 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QXCBGLXWINDOW_H #define QXCBGLXWINDOW_H diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro deleted file mode 100644 index 9d537b18f3..0000000000 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro +++ /dev/null @@ -1,27 +0,0 @@ -TARGET = qxcb-glx-integration - -include(../gl_integrations_plugin_base.pri) -QT += glx_support-private - -DEFINES += QT_NO_FOREACH - -qtConfig(xcb-glx): QMAKE_USE += xcb_glx - -!static:qtConfig(dlopen): QMAKE_USE += libdl - -HEADERS += \ - qxcbglxintegration.h \ - qxcbglxwindow.h \ - qglxintegration.h \ - qxcbglxnativeinterfacehandler.h - -SOURCES += \ - qxcbglxmain.cpp \ - qxcbglxintegration.cpp \ - qxcbglxwindow.cpp \ - qglxintegration.cpp \ - qxcbglxnativeinterfacehandler.cpp - -PLUGIN_CLASS_NAME = QXcbGlxIntegrationPlugin -PLUGIN_TYPE = xcbglintegrations -load(qt_plugin) |