diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2019-12-12 08:51:20 +0100 |
---|---|---|
committer | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2020-01-24 08:57:38 +0100 |
commit | 2344e5cc3104b7d599f4d2a96bbfd8530223a08e (patch) | |
tree | 02fae8469ce67262c21c187825c370627e62991d | |
parent | 85e3e88e1e68d9834346593c6b4819694f8a1a59 (diff) | |
download | qtbase-2344e5cc3104b7d599f4d2a96bbfd8530223a08e.tar.gz |
Move QOpenGLTexture and related classes from QtGui to QtOpenGL
Task-number: QTBUG-74409
Change-Id: Ied825dd7cb92365505a4aa43fd67488024160341
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
17 files changed, 32 insertions, 26 deletions
diff --git a/src/gui/opengl/opengl.pri b/src/gui/opengl/opengl.pri index d9f0e0d6cc..f1e2019417 100644 --- a/src/gui/opengl/opengl.pri +++ b/src/gui/opengl/opengl.pri @@ -17,10 +17,6 @@ qtConfig(opengl) { opengl/qopenglversionfunctionsfactory_p.h \ opengl/qopenglvertexarrayobject.h \ opengl/qopengltextureblitter.h \ - opengl/qopengltexture.h \ - opengl/qopengltexture_p.h \ - opengl/qopengltexturehelper_p.h \ - opengl/qopenglpixeltransferoptions.h \ opengl/qopenglextrafunctions.h \ opengl/qopenglprogrambinarycache_p.h @@ -33,9 +29,6 @@ qtConfig(opengl) { opengl/qopenglversionfunctionsfactory.cpp \ opengl/qopenglvertexarrayobject.cpp \ opengl/qopengltextureblitter.cpp \ - opengl/qopengltexture.cpp \ - opengl/qopengltexturehelper.cpp \ - opengl/qopenglpixeltransferoptions.cpp \ opengl/qopenglprogrambinarycache.cpp !qtConfig(opengles2) { diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro index 6c2a969820..ba9590ec07 100644 --- a/src/opengl/opengl.pro +++ b/src/opengl/opengl.pro @@ -19,7 +19,11 @@ HEADERS += \ qopenglpaintdevice.h \ qopenglpaintdevice_p.h \ qopenglpaintengine_p.h \ + qopenglpixeltransferoptions.h \ qopenglshadercache_p.h \ + qopengltexture.h \ + qopengltexture_p.h \ + qopengltexturehelper_p.h \ qopengltexturecache_p.h \ qopengltextureglyphcache_p.h \ qopengltextureuploader_p.h \ @@ -33,6 +37,9 @@ SOURCES += \ qopenglgradientcache.cpp \ qopenglpaintdevice.cpp \ qopenglpaintengine.cpp \ + qopenglpixeltransferoptions.cpp \ + qopengltexture.cpp \ + qopengltexturehelper.cpp \ qopengltexturecache.cpp \ qopengltextureglyphcache.cpp \ qopengltextureuploader.cpp \ diff --git a/src/gui/opengl/qopenglpixeltransferoptions.cpp b/src/opengl/qopenglpixeltransferoptions.cpp index b0d953d76b..aa1af3b092 100644 --- a/src/gui/opengl/qopenglpixeltransferoptions.cpp +++ b/src/opengl/qopenglpixeltransferoptions.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB). ** Contact: https://www.qt.io/licensing/ ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the QtOpenGL module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/src/gui/opengl/qopenglpixeltransferoptions.h b/src/opengl/qopenglpixeltransferoptions.h index 195543ae90..252c2a2f1e 100644 --- a/src/gui/opengl/qopenglpixeltransferoptions.h +++ b/src/opengl/qopenglpixeltransferoptions.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB). ** Contact: https://www.qt.io/licensing/ ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the QtOpenGL module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage @@ -40,7 +40,7 @@ #ifndef QOPENGLPIXELUPLOADOPTIONS_H #define QOPENGLPIXELUPLOADOPTIONS_H -#include <QtGui/qtguiglobal.h> +#include <QtOpenGL/qtopenglglobal.h> #if !defined(QT_NO_OPENGL) @@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE class QOpenGLPixelTransferOptionsData; -class Q_GUI_EXPORT QOpenGLPixelTransferOptions +class Q_OPENGL_EXPORT QOpenGLPixelTransferOptions { public: QOpenGLPixelTransferOptions(); diff --git a/src/gui/opengl/qopengltexture.cpp b/src/opengl/qopengltexture.cpp index 35d90898e5..35d90898e5 100644 --- a/src/gui/opengl/qopengltexture.cpp +++ b/src/opengl/qopengltexture.cpp diff --git a/src/gui/opengl/qopengltexture.h b/src/opengl/qopengltexture.h index 539b6aa7b2..8eba2724df 100644 --- a/src/gui/opengl/qopengltexture.h +++ b/src/opengl/qopengltexture.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB). ** Contact: https://www.qt.io/licensing/ ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the QtOpenGL module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage @@ -40,7 +40,7 @@ #ifndef QOPENGLABSTRACTTEXTURE_H #define QOPENGLABSTRACTTEXTURE_H -#include <QtGui/qtguiglobal.h> +#include <QtOpenGL/qtopenglglobal.h> #ifndef QT_NO_OPENGL @@ -54,7 +54,7 @@ class QDebug; class QOpenGLTexturePrivate; class QOpenGLPixelTransferOptions; -class Q_GUI_EXPORT QOpenGLTexture +class Q_OPENGL_EXPORT QOpenGLTexture { Q_GADGET public: @@ -641,7 +641,7 @@ public: float levelofDetailBias() const; #ifndef QT_NO_DEBUG_STREAM - friend Q_GUI_EXPORT QDebug operator<<(QDebug dbg, const QOpenGLTexture *t); + friend Q_OPENGL_EXPORT QDebug operator<<(QDebug dbg, const QOpenGLTexture *t); #endif private: @@ -653,7 +653,7 @@ private: Q_DECLARE_OPERATORS_FOR_FLAGS(QOpenGLTexture::Features) #ifndef QT_NO_DEBUG_STREAM -Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QOpenGLTexture *t); +Q_OPENGL_EXPORT QDebug operator<<(QDebug debug, const QOpenGLTexture *t); #endif QT_END_NAMESPACE diff --git a/src/gui/opengl/qopengltexture_p.h b/src/opengl/qopengltexture_p.h index 9f3457ad0a..1dc0801644 100644 --- a/src/gui/opengl/qopengltexture_p.h +++ b/src/opengl/qopengltexture_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB). ** Contact: https://www.qt.io/licensing/ ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the QtOpenGL module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage @@ -53,7 +53,7 @@ #ifndef QT_NO_OPENGL -#include <QtGui/private/qtguiglobal_p.h> +#include <QtOpenGL/qtopenglglobal.h> #include "private/qobject_p.h" #include "qopengltexture.h" #include "qopengl.h" diff --git a/src/gui/opengl/qopengltexturehelper.cpp b/src/opengl/qopengltexturehelper.cpp index 6709edc4e2..8f1473ecc9 100644 --- a/src/gui/opengl/qopengltexturehelper.cpp +++ b/src/opengl/qopengltexturehelper.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB). ** Contact: https://www.qt.io/licensing/ ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the QtOpenGL module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/src/gui/opengl/qopengltexturehelper_p.h b/src/opengl/qopengltexturehelper_p.h index 62d0125daf..a62a47d029 100644 --- a/src/gui/opengl/qopengltexturehelper_p.h +++ b/src/opengl/qopengltexturehelper_p.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB). ** Contact: https://www.qt.io/licensing/ ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the QtOpenGL module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage @@ -51,7 +51,7 @@ // We mean it. // -#include <QtGui/private/qtguiglobal_p.h> +#include <QtOpenGL/qtopenglglobal.h> #ifndef QT_NO_OPENGL diff --git a/src/platformsupport/vkconvenience/qvkconvenience.cpp b/src/platformsupport/vkconvenience/qvkconvenience.cpp index acde1d1bda..59de335333 100644 --- a/src/platformsupport/vkconvenience/qvkconvenience.cpp +++ b/src/platformsupport/vkconvenience/qvkconvenience.cpp @@ -39,7 +39,9 @@ #include "qvkconvenience_p.h" -#include <QOpenGLTexture> +#if QT_CONFIG(opengl) +#include <QtOpenGL/QOpenGLTexture> +#endif QT_BEGIN_NAMESPACE diff --git a/src/platformsupport/vkconvenience/vkconvenience.pro b/src/platformsupport/vkconvenience/vkconvenience.pro index ee540024cf..f3ada5768a 100644 --- a/src/platformsupport/vkconvenience/vkconvenience.pro +++ b/src/platformsupport/vkconvenience/vkconvenience.pro @@ -2,6 +2,8 @@ TARGET = QtVulkanSupport MODULE = vulkan_support QT = core-private gui-private +qtConfig(opengl): QT += opengl + CONFIG += static internal_module DEFINES += QT_NO_CAST_FROM_ASCII diff --git a/src/plugins/platforms/wasm/qwasmbackingstore.cpp b/src/plugins/platforms/wasm/qwasmbackingstore.cpp index 7e8a382512..a7423e9c47 100644 --- a/src/plugins/platforms/wasm/qwasmbackingstore.cpp +++ b/src/plugins/platforms/wasm/qwasmbackingstore.cpp @@ -31,7 +31,7 @@ #include "qwasmwindow.h" #include "qwasmcompositor.h" -#include <QtGui/qopengltexture.h> +#include <QtOpenGL/qopengltexture.h> #include <QtGui/qmatrix4x4.h> #include <QtGui/qpainter.h> #include <private/qguiapplication_p.h> diff --git a/src/plugins/platforms/wasm/qwasmcompositor.cpp b/src/plugins/platforms/wasm/qwasmcompositor.cpp index e9c4559971..6bf0d69770 100644 --- a/src/plugins/platforms/wasm/qwasmcompositor.cpp +++ b/src/plugins/platforms/wasm/qwasmcompositor.cpp @@ -31,7 +31,7 @@ #include "qwasmwindow.h" #include "qwasmstylepixmaps_p.h" -#include <QtGui/qopengltexture.h> +#include <QtOpenGL/qopengltexture.h> #include <QtGui/private/qwindow_p.h> #include <QtGui/qopenglcontext.h> diff --git a/src/plugins/platforms/wasm/qwasmcompositor.h b/src/plugins/platforms/wasm/qwasmcompositor.h index 98f4a79b27..6b59d87a0a 100644 --- a/src/plugins/platforms/wasm/qwasmcompositor.h +++ b/src/plugins/platforms/wasm/qwasmcompositor.h @@ -34,7 +34,6 @@ #include <qpa/qplatformwindow.h> #include <QtGui/qopengltextureblitter.h> -#include <QtGui/qopengltexture.h> #include <QtGui/qpalette.h> #include <QtGui/qpainter.h> @@ -43,6 +42,7 @@ QT_BEGIN_NAMESPACE class QWasmWindow; class QWasmScreen; class QOpenGLContext; +class QOpenGLTexture; class QOpenGLTextureBlitter; class QWasmCompositedWindow diff --git a/src/plugins/platforms/wasm/wasm.pro b/src/plugins/platforms/wasm/wasm.pro index f8c8175525..9087c484d5 100644 --- a/src/plugins/platforms/wasm/wasm.pro +++ b/src/plugins/platforms/wasm/wasm.pro @@ -50,6 +50,7 @@ wasmfonts.base = ../../../3rdparty/wasm RESOURCES += wasmfonts qtConfig(opengl) { + QT += opengl SOURCES += qwasmbackingstore.cpp HEADERS += qwasmbackingstore.h } diff --git a/src/src.pro b/src/src.pro index 0b8ae6d308..3445ca0fab 100644 --- a/src/src.pro +++ b/src/src.pro @@ -221,6 +221,7 @@ qtConfig(gui) { SUBDIRS += src_openglextensions SUBDIRS += src_opengl src_plugins.depends += src_opengl + src_platformsupport.depends += src_opengl } src_plugins.depends += src_gui src_platformsupport src_platformheaders src_testlib.depends += src_gui # if QtGui is enabled, QtTest requires QtGui's headers diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp index 3b39c8c474..3a7ad6dad5 100644 --- a/tests/auto/gui/qopengl/tst_qopengl.cpp +++ b/tests/auto/gui/qopengl/tst_qopengl.cpp @@ -27,13 +27,13 @@ ****************************************************************************/ #include <QtOpenGL/QOpenGLPaintDevice> +#include <QtOpenGL/QOpenGLTexture> #include <QtGui/private/qopenglcontext_p.h> #include <QtGui/QOpenGLFramebufferObject> #include <QtGui/QOpenGLFunctions> #include <QtGui/QOpenGLFunctions_4_2_Core> #include <QtGui/QOpenGLVertexArrayObject> #include <QtGui/QOpenGLBuffer> -#include <QtGui/QOpenGLTexture> #include <QtGui/QPainter> #include <QtGui/QScreen> #include <QtGui/QWindow> |