summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-07-08 14:23:51 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-07-08 19:34:10 +0200
commite3ce7c87e2969d0b35352dadc8e4fb44776dc140 (patch)
treeace9a8a24a7b8996be843418eda4110fb0bc0564
parentd6a724a9b2e8bab1ee35e637887b8968ee66bc26 (diff)
Move qglxconvenience to QtOpenGL
Task-number: QTBUG-83255 Change-Id: I7640caf8afbae0a7310a264f333bb3a6cfa3c6ed Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r--src/opengl/.prev_CMakeLists.txt10
-rw-r--r--src/opengl/CMakeLists.txt6
-rw-r--r--src/opengl/opengl.pro2
-rw-r--r--src/opengl/platform/platform.pri2
-rw-r--r--src/opengl/platform/unix/qglxconvenience.cpp (renamed from src/platformsupport/glxconvenience/qglxconvenience.cpp)21
-rw-r--r--src/opengl/platform/unix/qglxconvenience_p.h (renamed from src/platformsupport/glxconvenience/qglxconvenience_p.h)45
-rw-r--r--src/opengl/platform/unix/unix.pri9
-rw-r--r--src/platformsupport/.prev_CMakeLists.txt3
-rw-r--r--src/platformsupport/CMakeLists.txt3
-rw-r--r--src/platformsupport/glxconvenience/.prev_CMakeLists.txt21
-rw-r--r--src/platformsupport/glxconvenience/CMakeLists.txt23
-rw-r--r--src/platformsupport/glxconvenience/glxconvenience.pro14
-rw-r--r--src/platformsupport/platformsupport.pro2
-rw-r--r--src/plugins/platforms/offscreen/.prev_CMakeLists.txt2
-rw-r--r--src/plugins/platforms/offscreen/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/offscreen/offscreen.pro2
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp2
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt2
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp2
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp2
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro2
21 files changed, 82 insertions, 95 deletions
diff --git a/src/opengl/.prev_CMakeLists.txt b/src/opengl/.prev_CMakeLists.txt
index 7fac433205..a477bf2f6b 100644
--- a/src/opengl/.prev_CMakeLists.txt
+++ b/src/opengl/.prev_CMakeLists.txt
@@ -98,6 +98,16 @@ qt_extend_target(OpenGL CONDITION QT_FEATURE_egl
qopenglcompositor.cpp qopenglcompositor_p.h
qopenglcompositorbackingstore.cpp qopenglcompositorbackingstore_p.h
)
+
+qt_extend_target(OpenGL CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2
+ SOURCES
+ platform/unix/qglxconvenience.cpp platform/unix/qglxconvenience_p.h
+ PUBLIC_LIBRARIES
+ X11::X11
+)
+
+
+qt_create_tracepoints(OpenGL qtopengl.tracepoints)
qt_add_docs(OpenGL
doc/qtopengl.qdocconf
)
diff --git a/src/opengl/CMakeLists.txt b/src/opengl/CMakeLists.txt
index 1d8544ab8e..5fc9adb103 100644
--- a/src/opengl/CMakeLists.txt
+++ b/src/opengl/CMakeLists.txt
@@ -99,6 +99,12 @@ qt_extend_target(OpenGL CONDITION QT_FEATURE_egl
qopenglcompositorbackingstore.cpp qopenglcompositorbackingstore_p.h
)
+qt_extend_target(OpenGL CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2
+ SOURCES
+ platform/unix/qglxconvenience.cpp platform/unix/qglxconvenience_p.h
+ PUBLIC_LIBRARIES
+ X11::X11
+)
qt_create_tracepoints(OpenGL qtopengl.tracepoints)
qt_add_docs(OpenGL
diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro
index 0dd3d33552..97871c3757 100644
--- a/src/opengl/opengl.pro
+++ b/src/opengl/opengl.pro
@@ -151,6 +151,8 @@ qtConfig(egl) {
qopenglcompositor_p.h
}
+include(platform/platform.pri)
+
load(qt_module)
TRACEPOINT_PROVIDER = $$PWD/qtopengl.tracepoints
diff --git a/src/opengl/platform/platform.pri b/src/opengl/platform/platform.pri
new file mode 100644
index 0000000000..4255f09a4e
--- /dev/null
+++ b/src/opengl/platform/platform.pri
@@ -0,0 +1,2 @@
+qtConfig(xlib):qtConfig(opengl):!qtConfig(opengles2): \
+ include(unix/unix.pri)
diff --git a/src/platformsupport/glxconvenience/qglxconvenience.cpp b/src/opengl/platform/unix/qglxconvenience.cpp
index 574789358c..94781aac3d 100644
--- a/src/platformsupport/glxconvenience/qglxconvenience.cpp
+++ b/src/opengl/platform/unix/qglxconvenience.cpp
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
-** This file is part of the plugins of the Qt Toolkit.
+** This file is part of the QtOpenGL module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -39,21 +39,18 @@
// We have to include this before the X11 headers dragged in by
// qglxconvenience_p.h.
-#include <QtCore/QByteArray>
-#include <QtCore/QScopedPointer>
+#include <QtCore/qbytearray.h>
+#include <QtCore/qscopedpointer.h>
#include <QtCore/qmetatype.h>
#include <QtCore/qtextstream.h>
#include "qglxconvenience_p.h"
-#include <QtCore/QList>
-#include <QtCore/QLoggingCategory>
-#include <QtCore/QVarLengthArray>
+#include <QtCore/qloggingcategory.h>
+#include <QtCore/qvarlengtharray.h>
#include <GL/glxext.h>
-Q_LOGGING_CATEGORY(lcGlx, "qt.glx")
-
enum {
XFocusOut = FocusOut,
XFocusIn = FocusIn,
@@ -81,6 +78,10 @@ enum {
#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2
#endif
+QT_BEGIN_NAMESPACE
+
+Q_LOGGING_CATEGORY(lcGlx, "qt.glx")
+
QList<int> qglx_buildSpec(const QSurfaceFormat &format, int drawableBit, int flags)
{
QList<int> spec;
@@ -461,3 +462,5 @@ bool qglx_reduceFormat(QSurfaceFormat *format)
return false;
}
+
+QT_END_NAMESPACE
diff --git a/src/platformsupport/glxconvenience/qglxconvenience_p.h b/src/opengl/platform/unix/qglxconvenience_p.h
index bf35d016bd..ed7b522f8d 100644
--- a/src/platformsupport/glxconvenience/qglxconvenience_p.h
+++ b/src/opengl/platform/unix/qglxconvenience_p.h
@@ -1,9 +1,9 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
-** This file is part of the plugins of the Qt Toolkit.
+** This file is part of the QtOpenGL module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
@@ -44,29 +44,50 @@
// W A R N I N G
// -------------
//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
-#include <QList>
-#include <QSurfaceFormat>
+#include <QtOpenGL/qtopenglglobal.h>
+#include <QtCore/qlist.h>
+#include <QtGui/qsurfaceformat.h>
#include <X11/Xlib.h>
#include <GL/glx.h>
+QT_BEGIN_NAMESPACE
+
enum QGlxFlags
{
QGLX_SUPPORTS_SRGB = 0x01
};
-QList<int> qglx_buildSpec(const QSurfaceFormat &format, int drawableBit = GLX_WINDOW_BIT, int flags = 0);
-XVisualInfo *qglx_findVisualInfo(Display *display, int screen, QSurfaceFormat *format, int drawableBit = GLX_WINDOW_BIT, int flags = 0);
-GLXFBConfig qglx_findConfig(Display *display, int screen, QSurfaceFormat format, bool highestPixelFormat = false, int drawableBit = GLX_WINDOW_BIT, int flags = 0);
-void qglx_surfaceFormatFromGLXFBConfig(QSurfaceFormat *format, Display *display, GLXFBConfig config, int flags = 0);
-void qglx_surfaceFormatFromVisualInfo(QSurfaceFormat *format, Display *display, XVisualInfo *visualInfo, int flags = 0);
-bool qglx_reduceFormat(QSurfaceFormat *format);
+Q_OPENGL_EXPORT QList<int> qglx_buildSpec(const QSurfaceFormat &format,
+ int drawableBit = GLX_WINDOW_BIT,
+ int flags = 0);
+
+Q_OPENGL_EXPORT XVisualInfo *qglx_findVisualInfo(Display *display, int screen,
+ QSurfaceFormat *format,
+ int drawableBit = GLX_WINDOW_BIT,
+ int flags = 0);
+
+Q_OPENGL_EXPORT GLXFBConfig qglx_findConfig(Display *display, int screen,
+ QSurfaceFormat format,
+ bool highestPixelFormat = false,
+ int drawableBit = GLX_WINDOW_BIT,
+ int flags = 0);
+
+Q_OPENGL_EXPORT void qglx_surfaceFormatFromGLXFBConfig(QSurfaceFormat *format, Display *display,
+ GLXFBConfig config, int flags = 0);
+
+Q_OPENGL_EXPORT void qglx_surfaceFormatFromVisualInfo(QSurfaceFormat *format, Display *display,
+ XVisualInfo *visualInfo, int flags = 0);
+
+Q_OPENGL_EXPORT bool qglx_reduceFormat(QSurfaceFormat *format);
+
+QT_END_NAMESPACE
#endif // QGLXCONVENIENCE_H
diff --git a/src/opengl/platform/unix/unix.pri b/src/opengl/platform/unix/unix.pri
new file mode 100644
index 0000000000..1cdf0ca22d
--- /dev/null
+++ b/src/opengl/platform/unix/unix.pri
@@ -0,0 +1,9 @@
+QMAKE_USE += xlib
+
+HEADERS += \
+ platform/unix/qglxconvenience_p.h
+
+SOURCES += \
+ platform/unix/qglxconvenience.cpp
+
+QMAKE_USE += xlib
diff --git a/src/platformsupport/.prev_CMakeLists.txt b/src/platformsupport/.prev_CMakeLists.txt
index 9e2f19bee6..75ae100805 100644
--- a/src/platformsupport/.prev_CMakeLists.txt
+++ b/src/platformsupport/.prev_CMakeLists.txt
@@ -9,9 +9,6 @@ endif()
if(QT_FEATURE_egl)
add_subdirectory(eglconvenience)
endif()
-if(QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2)
- add_subdirectory(glxconvenience)
-endif()
if(QT_FEATURE_kms)
add_subdirectory(kmsconvenience)
endif()
diff --git a/src/platformsupport/CMakeLists.txt b/src/platformsupport/CMakeLists.txt
index db2fb62261..8aca4e5e19 100644
--- a/src/platformsupport/CMakeLists.txt
+++ b/src/platformsupport/CMakeLists.txt
@@ -13,9 +13,6 @@ endif()
if(QT_FEATURE_egl)
add_subdirectory(eglconvenience)
endif()
-if(QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2)
- add_subdirectory(glxconvenience)
-endif()
if(QT_FEATURE_kms)
add_subdirectory(kmsconvenience)
endif()
diff --git a/src/platformsupport/glxconvenience/.prev_CMakeLists.txt b/src/platformsupport/glxconvenience/.prev_CMakeLists.txt
deleted file mode 100644
index d3d2c87910..0000000000
--- a/src/platformsupport/glxconvenience/.prev_CMakeLists.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-# Generated from glxconvenience.pro.
-
-#####################################################################
-## GlxSupport Module:
-#####################################################################
-
-qt_add_module(GlxSupport
- STATIC
- INTERNAL_MODULE
- SOURCES
- qglxconvenience.cpp qglxconvenience_p.h
- DEFINES
- QT_NO_CAST_FROM_ASCII
- PUBLIC_LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
- X11::X11
-)
-
-#### Keys ignored in scope 1:.:.:glxconvenience.pro:<TRUE>:
-# MODULE = "glx_support"
diff --git a/src/platformsupport/glxconvenience/CMakeLists.txt b/src/platformsupport/glxconvenience/CMakeLists.txt
deleted file mode 100644
index 00d2e6c754..0000000000
--- a/src/platformsupport/glxconvenience/CMakeLists.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-# Generated from glxconvenience.pro.
-
-qt_find_package(X11) # special case
-
-#####################################################################
-## GlxSupport Module:
-#####################################################################
-
-qt_add_module(GlxSupport
- STATIC
- INTERNAL_MODULE
- SOURCES
- qglxconvenience.cpp qglxconvenience_p.h
- DEFINES
- QT_NO_CAST_FROM_ASCII
- PUBLIC_LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
- X11::X11
-)
-
-#### Keys ignored in scope 1:.:.:glxconvenience.pro:<TRUE>:
-# MODULE = "glx_support"
diff --git a/src/platformsupport/glxconvenience/glxconvenience.pro b/src/platformsupport/glxconvenience/glxconvenience.pro
deleted file mode 100644
index 1b9cf79080..0000000000
--- a/src/platformsupport/glxconvenience/glxconvenience.pro
+++ /dev/null
@@ -1,14 +0,0 @@
-TARGET = QtGlxSupport
-MODULE = glx_support
-
-QT = core-private gui-private
-CONFIG += static internal_module
-
-DEFINES += QT_NO_CAST_FROM_ASCII
-
-QMAKE_USE += xlib
-
-HEADERS += qglxconvenience_p.h
-SOURCES += qglxconvenience.cpp
-
-load(qt_module)
diff --git a/src/platformsupport/platformsupport.pro b/src/platformsupport/platformsupport.pro
index 5a73a0edfb..06c1a15d4e 100644
--- a/src/platformsupport/platformsupport.pro
+++ b/src/platformsupport/platformsupport.pro
@@ -12,8 +12,6 @@ qtConfig(evdev)|qtConfig(tslib)|qtConfig(libinput)|qtConfig(integrityhid)|qtConf
qtConfig(egl): \
SUBDIRS += eglconvenience
-qtConfig(xlib):qtConfig(opengl):!qtConfig(opengles2): \
- SUBDIRS += glxconvenience
qtConfig(kms): \
SUBDIRS += kmsconvenience
diff --git a/src/plugins/platforms/offscreen/.prev_CMakeLists.txt b/src/plugins/platforms/offscreen/.prev_CMakeLists.txt
index 68abfbdea5..8d2a62d2bc 100644
--- a/src/plugins/platforms/offscreen/.prev_CMakeLists.txt
+++ b/src/plugins/platforms/offscreen/.prev_CMakeLists.txt
@@ -31,7 +31,7 @@ qt_extend_target(QOffscreenIntegrationPlugin CONDITION QT_FEATURE_opengl AND QT_
SOURCES
qoffscreenintegration_x11.cpp qoffscreenintegration_x11.h
PUBLIC_LIBRARIES
- Qt::GlxSupportPrivate
+ Qt::OpenGLPrivate
)
#### Keys ignored in scope 3:.:.:offscreen.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
diff --git a/src/plugins/platforms/offscreen/CMakeLists.txt b/src/plugins/platforms/offscreen/CMakeLists.txt
index 52d2b829d8..40783206e0 100644
--- a/src/plugins/platforms/offscreen/CMakeLists.txt
+++ b/src/plugins/platforms/offscreen/CMakeLists.txt
@@ -32,7 +32,7 @@ qt_extend_target(QOffscreenIntegrationPlugin CONDITION QT_FEATURE_opengl AND QT_
SOURCES
qoffscreenintegration_x11.cpp qoffscreenintegration_x11.h
PUBLIC_LIBRARIES
- Qt::GlxSupportPrivate
+ Qt::OpenGLPrivate
)
#### Keys ignored in scope 3:.:.:offscreen.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
diff --git a/src/plugins/platforms/offscreen/offscreen.pro b/src/plugins/platforms/offscreen/offscreen.pro
index 5683b5e8ce..9364775c27 100644
--- a/src/plugins/platforms/offscreen/offscreen.pro
+++ b/src/plugins/platforms/offscreen/offscreen.pro
@@ -19,7 +19,7 @@ OTHER_FILES += offscreen.json
qtConfig(xlib):qtConfig(opengl):!qtConfig(opengles2) {
SOURCES += qoffscreenintegration_x11.cpp
HEADERS += qoffscreenintegration_x11.h
- QT += glx_support-private
+ QT += opengl-private
}
PLUGIN_TYPE = platforms
diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp
index bcf996f708..4b37aac468 100644
--- a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp
+++ b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp
@@ -45,7 +45,7 @@
#include <X11/Xlib.h>
#include <GL/glx.h>
-#include <QtGlxSupport/private/qglxconvenience_p.h>
+#include <QtOpenGL/private/qglxconvenience_p.h>
#include <qpa/qplatformsurface.h>
#include <qsurface.h>
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt
index b8ed160b09..769ac953a6 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt
@@ -21,9 +21,9 @@ qt_internal_add_plugin(QXcbGlxIntegrationPlugin
PUBLIC_LIBRARIES
Qt::Core
Qt::CorePrivate
- Qt::GlxSupportPrivate
Qt::Gui
Qt::GuiPrivate
+ Qt::OpenGLPrivate
Qt::XcbQpaPrivate
)
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 6318501662..8efd10aa32 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
@@ -55,7 +55,7 @@
#include <QtGui/QOffscreenSurface>
#include "qglxintegration.h"
-#include <QtGlxSupport/private/qglxconvenience_p.h>
+#include <QtOpenGL/private/qglxconvenience_p.h>
#include "qxcbglintegration.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..2ccaa5b80b 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp
@@ -40,7 +40,7 @@
#include "qxcbglxwindow.h"
#include "qxcbscreen.h"
-#include <QtGlxSupport/private/qglxconvenience_p.h>
+#include <QtOpenGL/private/qglxconvenience_p.h>
#include <QDebug>
QT_BEGIN_NAMESPACE
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
index 9d537b18f3..c8bed1bfb4 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro
@@ -1,7 +1,7 @@
TARGET = qxcb-glx-integration
include(../gl_integrations_plugin_base.pri)
-QT += glx_support-private
+QT += opengl-private
DEFINES += QT_NO_FOREACH