diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2012-08-06 11:51:09 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-09-28 16:15:31 +0200 |
commit | e03363dfd1aeddd085c4c86d9a1964da769d7980 (patch) | |
tree | 9bffd1443a010a418e306cdd06642df7f3f48cbf /src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h | |
parent | 5bd0e08063fcacba0c2b63528712968c7d74e7f9 (diff) |
Fix potential crash when using text and more than 1 QQuickView
We need to use a resource guard for the FBO in case there is no
current context when the glyph cache is deleted.
This reverts commit b3264e2cb6a8fe87754aa1335ab9f8d5e3910c14 which
was implemented as a band-aid for this crash.
Change-Id: I5b3a09a3998da38836ea851cd0978d3ddadcd2cc
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h')
-rw-r--r-- | src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h index 2fc706cff5..decac2cc0f 100644 --- a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h +++ b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h @@ -50,6 +50,7 @@ QT_BEGIN_NAMESPACE +class QOpenGLSharedResourceGuard; class Q_QUICK_PRIVATE_EXPORT QSGDefaultDistanceFieldGlyphCache : public QSGDistanceFieldGlyphCache { public: @@ -122,7 +123,6 @@ private: QList<TextureInfo> m_textures; QHash<glyph_t, TextureInfo *> m_glyphsTexture; - GLuint m_fbo; QSet<glyph_t> m_unusedGlyphs; QSGAreaAllocator *m_areaAllocator; @@ -130,6 +130,8 @@ private: QOpenGLShaderProgram *m_blitProgram; GLfloat m_blitVertexCoordinateArray[8]; GLfloat m_blitTextureCoordinateArray[8]; + + QOpenGLSharedResourceGuard *m_fboGuard; }; QT_END_NAMESPACE |