diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-07-12 19:43:47 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-07-13 18:18:30 +0200 |
commit | 12f8b583cfd083f52b95248a798184f43314955a (patch) | |
tree | 18d10f15ab6d2292783a830432b50aa7736f3c35 /src/gui/kernel/qopenglcontext.cpp | |
parent | b36d7076e4c6f566a296215816111cf4d71606a0 (diff) |
QOpenGLContext: de-inline virtual dtors of private classes
... pinning the vtables to a single TU instead of duplicating them for
every user.
Pick-to: 6.4
Task-number: QTBUG-45582
Change-Id: I728a5c47edaafe7ef4fdca1db8d0247ed4be9713
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/gui/kernel/qopenglcontext.cpp')
-rw-r--r-- | src/gui/kernel/qopenglcontext.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp index 5849c7318e..99c13257a3 100644 --- a/src/gui/kernel/qopenglcontext.cpp +++ b/src/gui/kernel/qopenglcontext.cpp @@ -360,6 +360,14 @@ bool QOpenGLContext::create() return isValid(); } +QOpenGLContextPrivate::~QOpenGLContextPrivate() +{ + //do not delete the QOpenGLContext handle here as it is deleted in + //QWidgetPrivate::deleteTLSysExtra() + + delete versionFunctions; +} + void QOpenGLContextPrivate::adopt(QPlatformOpenGLContext *context) { Q_Q(QOpenGLContext); @@ -995,6 +1003,9 @@ QOpenGLContextGroup *QOpenGLContextGroup::currentContextGroup() return current ? current->shareGroup() : nullptr; } +QOpenGLContextGroupPrivate::~QOpenGLContextGroupPrivate() + = default; + void QOpenGLContextGroupPrivate::addContext(QOpenGLContext *ctx) { const auto locker = qt_scoped_lock(m_mutex); @@ -1136,6 +1147,10 @@ void QOpenGLSharedResource::free() \inmodule QtGui */ + +QOpenGLSharedResourceGuard::~QOpenGLSharedResourceGuard() + = default; + void QOpenGLSharedResourceGuard::freeResource(QOpenGLContext *context) { if (m_id) { @@ -1235,6 +1250,9 @@ void QOpenGLMultiGroupSharedResource::cleanup(QOpenGLContextGroup *group, QOpenG m_groups.removeOne(group); } +QOpenGLContextVersionFunctionHelper::~QOpenGLContextVersionFunctionHelper() + = default; + #ifndef QT_NO_DEBUG_STREAM QDebug operator<<(QDebug debug, const QOpenGLContext *ctx) { |