summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.cpp
diff options
context:
space:
mode:
authorWater-Team <water@pad.test.qt.nokia.com>2011-10-27 23:00:13 (GMT)
committerWater-Team <water@pad.test.qt.nokia.com>2011-10-27 23:00:13 (GMT)
commita1e3906c5d4b4c25356b56292b650a20e4895f41 (patch)
treeb537a8e1a2e42da68728d18b8e7c9599b95ac651 /src/opengl/qgl.cpp
parent287c150aac9e4892801b6117fb6fa11a616b05a1 (diff)
parentfadd87f448d3dd4133d1a6ec022ee6db42eb9723 (diff)
downloadQt-a1e3906c5d4b4c25356b56292b650a20e4895f41.zip
Qt-a1e3906c5d4b4c25356b56292b650a20e4895f41.tar.gz
Qt-a1e3906c5d4b4c25356b56292b650a20e4895f41.tar.bz2
Merge branch '4.8-upstream' into master-water
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r--src/opengl/qgl.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 6d95713..08b9ca3 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -5726,6 +5726,11 @@ void QGLContextGroupResourceBase::cleanup(const QGLContext *ctx)
}
}
+void QGLContextGroupResourceBase::contextDeleted(const QGLContext *ctx)
+{
+ Q_UNUSED(ctx);
+}
+
void QGLContextGroupResourceBase::cleanup(const QGLContext *ctx, void *value)
{
#ifdef QT_GL_CONTEXT_RESOURCE_DEBUG
@@ -5741,12 +5746,16 @@ void QGLContextGroupResourceBase::cleanup(const QGLContext *ctx, void *value)
void QGLContextGroup::cleanupResources(const QGLContext *context)
{
+ // Notify all resources that a context has been deleted
+ QHash<QGLContextGroupResourceBase *, void *>::ConstIterator it;
+ for (it = m_resources.begin(); it != m_resources.end(); ++it)
+ it.key()->contextDeleted(context);
+
// If there are still shares, then no cleanup to be done yet.
if (m_shares.size() > 1)
return;
// Iterate over all resources and free each in turn.
- QHash<QGLContextGroupResourceBase *, void *>::ConstIterator it;
for (it = m_resources.begin(); it != m_resources.end(); ++it)
it.key()->cleanup(context, it.value());
}