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>
This commit is contained in:
parent
a0da15f2c9
commit
79da236e76
@ -623,7 +623,6 @@ bool QOpenGLContext::create()
|
|||||||
*/
|
*/
|
||||||
void QOpenGLContext::destroy()
|
void QOpenGLContext::destroy()
|
||||||
{
|
{
|
||||||
deleteQGLContext();
|
|
||||||
Q_D(QOpenGLContext);
|
Q_D(QOpenGLContext);
|
||||||
if (d->platformGLContext)
|
if (d->platformGLContext)
|
||||||
emit aboutToBeDestroyed();
|
emit aboutToBeDestroyed();
|
||||||
@ -1176,44 +1175,6 @@ QScreen *QOpenGLContext::screen() const
|
|||||||
return d->screen;
|
return d->screen;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
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
|
Returns the platform-specific handle for the OpenGL implementation that
|
||||||
is currently in use. (for example, a HMODULE on Windows)
|
is currently in use. (for example, a HMODULE on Windows)
|
||||||
|
@ -218,8 +218,6 @@ Q_SIGNALS:
|
|||||||
void aboutToBeDestroyed();
|
void aboutToBeDestroyed();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class QGLContext;
|
|
||||||
friend class QGLPixelBuffer;
|
|
||||||
friend class QOpenGLContextResourceBase;
|
friend class QOpenGLContextResourceBase;
|
||||||
friend class QOpenGLPaintDevice;
|
friend class QOpenGLPaintDevice;
|
||||||
friend class QOpenGLGlyphTexture;
|
friend class QOpenGLGlyphTexture;
|
||||||
@ -234,10 +232,6 @@ private:
|
|||||||
friend class QAbstractOpenGLFunctionsPrivate;
|
friend class QAbstractOpenGLFunctionsPrivate;
|
||||||
friend class QOpenGLTexturePrivate;
|
friend class QOpenGLTexturePrivate;
|
||||||
|
|
||||||
void *qGLContextHandle() const;
|
|
||||||
void setQGLContextHandle(void *handle,void (*qGLContextDeleteFunction)(void *));
|
|
||||||
void deleteQGLContext();
|
|
||||||
|
|
||||||
QOpenGLVersionFunctionsStorage* functionsBackendStorage() const;
|
QOpenGLVersionFunctionsStorage* functionsBackendStorage() const;
|
||||||
void insertExternalFunctions(QAbstractOpenGLFunctions *f);
|
void insertExternalFunctions(QAbstractOpenGLFunctions *f);
|
||||||
void removeExternalFunctions(QAbstractOpenGLFunctions *f);
|
void removeExternalFunctions(QAbstractOpenGLFunctions *f);
|
||||||
|
@ -197,9 +197,7 @@ class Q_GUI_EXPORT QOpenGLContextPrivate : public QObjectPrivate
|
|||||||
Q_DECLARE_PUBLIC(QOpenGLContext)
|
Q_DECLARE_PUBLIC(QOpenGLContext)
|
||||||
public:
|
public:
|
||||||
QOpenGLContextPrivate()
|
QOpenGLContextPrivate()
|
||||||
: qGLContextHandle(nullptr)
|
: platformGLContext(nullptr)
|
||||||
, qGLContextDeleteFunction(nullptr)
|
|
||||||
, platformGLContext(nullptr)
|
|
||||||
, shareContext(nullptr)
|
, shareContext(nullptr)
|
||||||
, shareGroup(nullptr)
|
, shareGroup(nullptr)
|
||||||
, screen(nullptr)
|
, screen(nullptr)
|
||||||
@ -228,9 +226,6 @@ public:
|
|||||||
mutable QOpenGLVersionFunctionsStorage versionFunctionsStorage;
|
mutable QOpenGLVersionFunctionsStorage versionFunctionsStorage;
|
||||||
mutable QSet<QAbstractOpenGLFunctions *> externalVersionFunctions;
|
mutable QSet<QAbstractOpenGLFunctions *> externalVersionFunctions;
|
||||||
|
|
||||||
void *qGLContextHandle;
|
|
||||||
void (*qGLContextDeleteFunction)(void *handle);
|
|
||||||
|
|
||||||
QSurfaceFormat requestedFormat;
|
QSurfaceFormat requestedFormat;
|
||||||
QPlatformOpenGLContext *platformGLContext;
|
QPlatformOpenGLContext *platformGLContext;
|
||||||
QOpenGLContext *shareContext;
|
QOpenGLContext *shareContext;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user