diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2020-02-06 10:14:24 +0100 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2020-02-11 07:45:03 +0000 |
commit | 79da236e76752c1f940036dffffebb8d2a707d66 (patch) | |
tree | 3c62aab780b93e9d5f4588c343aea610444d54d4 /src | |
parent | a0da15f2c991008ea82408840beea34995d4dea4 (diff) |
QOpenGLContext: Remove QGL helpers
They were all private, and used only by QGL* (which have been removed) so
should be safe to remove.
Task-number: QTBUG-74408
Change-Id: Ia7fdff8f0bb963449470dbd8296cbdd8652c50e2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qopenglcontext.cpp | 39 | ||||
-rw-r--r-- | src/gui/kernel/qopenglcontext.h | 6 | ||||
-rw-r--r-- | src/gui/kernel/qopenglcontext_p.h | 7 |
3 files changed, 1 insertions, 51 deletions
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index 6915433aed..ae5a98e832 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -623,7 +623,6 @@ bool QOpenGLContext::create() */ void QOpenGLContext::destroy() { - deleteQGLContext(); Q_D(QOpenGLContext); if (d->platformGLContext) emit aboutToBeDestroyed(); @@ -1177,44 +1176,6 @@ QScreen *QOpenGLContext::screen() const } /*! - internal: Needs to have a pointer to qGLContext. But since this is in Qt GUI we can't - have any type information. - - \internal -*/ -void *QOpenGLContext::qGLContextHandle() const -{ - Q_D(const QOpenGLContext); - return d->qGLContextHandle; -} - -/*! - internal: If the delete function is specified QOpenGLContext "owns" - the passed context handle and will use the delete function to destroy it. - - \internal -*/ -void QOpenGLContext::setQGLContextHandle(void *handle,void (*qGLContextDeleteFunction)(void *)) -{ - Q_D(QOpenGLContext); - d->qGLContextHandle = handle; - d->qGLContextDeleteFunction = qGLContextDeleteFunction; -} - -/*! - \internal -*/ -void QOpenGLContext::deleteQGLContext() -{ - Q_D(QOpenGLContext); - if (d->qGLContextDeleteFunction && d->qGLContextHandle) { - d->qGLContextDeleteFunction(d->qGLContextHandle); - d->qGLContextDeleteFunction = nullptr; - d->qGLContextHandle = nullptr; - } -} - -/*! Returns the platform-specific handle for the OpenGL implementation that is currently in use. (for example, a HMODULE on Windows) diff --git a/src/gui/kernel/qopenglcontext.h b/src/gui/kernel/qopenglcontext.h index f19dde465a..a96ea56d7b 100644 --- a/src/gui/kernel/qopenglcontext.h +++ b/src/gui/kernel/qopenglcontext.h @@ -218,8 +218,6 @@ Q_SIGNALS: void aboutToBeDestroyed(); private: - friend class QGLContext; - friend class QGLPixelBuffer; friend class QOpenGLContextResourceBase; friend class QOpenGLPaintDevice; friend class QOpenGLGlyphTexture; @@ -234,10 +232,6 @@ private: friend class QAbstractOpenGLFunctionsPrivate; friend class QOpenGLTexturePrivate; - void *qGLContextHandle() const; - void setQGLContextHandle(void *handle,void (*qGLContextDeleteFunction)(void *)); - void deleteQGLContext(); - QOpenGLVersionFunctionsStorage* functionsBackendStorage() const; void insertExternalFunctions(QAbstractOpenGLFunctions *f); void removeExternalFunctions(QAbstractOpenGLFunctions *f); diff --git a/src/gui/kernel/qopenglcontext_p.h b/src/gui/kernel/qopenglcontext_p.h index 7770b1ce02..d769f03fd3 100644 --- a/src/gui/kernel/qopenglcontext_p.h +++ b/src/gui/kernel/qopenglcontext_p.h @@ -197,9 +197,7 @@ class Q_GUI_EXPORT QOpenGLContextPrivate : public QObjectPrivate Q_DECLARE_PUBLIC(QOpenGLContext) public: QOpenGLContextPrivate() - : qGLContextHandle(nullptr) - , qGLContextDeleteFunction(nullptr) - , platformGLContext(nullptr) + : platformGLContext(nullptr) , shareContext(nullptr) , shareGroup(nullptr) , screen(nullptr) @@ -228,9 +226,6 @@ public: mutable QOpenGLVersionFunctionsStorage versionFunctionsStorage; mutable QSet<QAbstractOpenGLFunctions *> externalVersionFunctions; - void *qGLContextHandle; - void (*qGLContextDeleteFunction)(void *handle); - QSurfaceFormat requestedFormat; QPlatformOpenGLContext *platformGLContext; QOpenGLContext *shareContext; |