diff options
author | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-06-17 12:46:27 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-07-02 10:25:24 (GMT) |
commit | b2de72a51124333b639fdfbda829f54088dff838 (patch) | |
tree | b28b3b601351ae05d413315fe88781cefb7d98c8 /src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h | |
parent | 76a14c8254f4f8beb16de897f31bab13dc7609a4 (diff) | |
download | Qt-b2de72a51124333b639fdfbda829f54088dff838.zip Qt-b2de72a51124333b639fdfbda829f54088dff838.tar.gz Qt-b2de72a51124333b639fdfbda829f54088dff838.tar.bz2 |
Rework the internal GL resource system yet again.
Instead of having to sub-class QGLContextResource, we now have two
template classes:
1. 'QGLContextResource' to handle context specific resources that are
*not* shared in a group, even though the context itself is in a sharing
group
2. 'QGLContextGroupResource' to handle resources shared in a context
group.
Classes used as the template class type must have a constructor with
the following signature:
T(const QGLContext *);
The resources that the templates wrap are freed up when the context
or context group it is tied to is destroyed. The resource is also
freed when the QGLContext<Group>Resource object is destroyed, which
might lead to context switches, depending on where and in how many
non-sharing contexts the resource is used.
The templates wrap some boiler plate code that were common for all the
use cases.
Diffstat (limited to 'src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h')
-rw-r--r-- | src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h index 710a12d..1a78eed 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE class QGL2PaintEngineExPrivate; -class Q_OPENGL_EXPORT QGLTextureGlyphCache : public QGLContextResource, public QImageTextureGlyphCache +class Q_OPENGL_EXPORT QGLTextureGlyphCache : public QGLContextGroupResourceBase, public QImageTextureGlyphCache { public: QGLTextureGlyphCache(const QGLContext *context, QFontEngineGlyphCache::Type type, const QTransform &matrix); |