diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-10-02 01:38:10 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-10-02 01:38:10 (GMT) |
commit | ad90350d0ba3971591554f871ec17544be414038 (patch) | |
tree | 4a60d321ee52242f092d0a96fed5e114d8147ff3 /src/opengl/qgl_p.h | |
parent | 53b3a0572242d0a425e74848afba1293f195d29b (diff) | |
download | Qt-ad90350d0ba3971591554f871ec17544be414038.zip Qt-ad90350d0ba3971591554f871ec17544be414038.tar.gz Qt-ad90350d0ba3971591554f871ec17544be414038.tar.bz2 |
Remove QHash overhead from QGLShareRegister
Move the list of shared contexts from QGLShareRegister into
QGLContextGroup. There is then no need for the QHash.
Reviewed-by: trustme
Diffstat (limited to 'src/opengl/qgl_p.h')
-rw-r--r-- | src/opengl/qgl_p.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 991c948..1957429 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -233,6 +233,7 @@ private: QGLExtensionFuncs m_extensionFuncs; const QGLContext *m_context; // context group's representative + QList<const QGLContext *> m_shares; QAtomicInt m_refs; friend class QGLShareRegister; @@ -401,16 +402,11 @@ class Q_AUTOTEST_EXPORT QGLShareRegister { public: QGLShareRegister() {} - ~QGLShareRegister() { reg.clear(); } + ~QGLShareRegister() {} void addShare(const QGLContext *context, const QGLContext *share); QList<const QGLContext *> shares(const QGLContext *context); void removeShare(const QGLContext *context); -private: - // Use a context's 'group' pointer to uniquely identify a group. - typedef QList<const QGLContext *> ContextList; - typedef QHash<const QGLContextGroup *, ContextList> SharingHash; - SharingHash reg; }; extern Q_OPENGL_EXPORT QGLShareRegister* qgl_share_reg(); |