summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-12-14 13:03:08 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-12-14 13:17:45 (GMT)
commit0727539b89898544047d32e63633790fa0c44b5a (patch)
tree2fb4db194793ffba3be14ee1aff21533caaff04f
parent0cf5055ed325ec98f4affe21e2ef5181cf0fe830 (diff)
downloadQt-0727539b89898544047d32e63633790fa0c44b5a.zip
Qt-0727539b89898544047d32e63633790fa0c44b5a.tar.gz
Qt-0727539b89898544047d32e63633790fa0c44b5a.tar.bz2
Don't delete FBO when resetting glyph cache
When the glyph cache is cleared because the max texture size has been exceeded, we shouldn't delete the fbo as this is only created in setContext() and will thus not be recreated. All subsequent resizing of the cache will fail. Task-number: QT-3971 Reviewed-by: Samuel
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index 66445cd..1b879c3 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -83,13 +83,9 @@ void QGLTextureGlyphCache::clear()
if (ctx) {
QGLShareContextScope scope(ctx);
- if (!ctx->d_ptr->workaround_brokenFBOReadBack)
- glDeleteFramebuffers(1, &m_fbo);
-
if (m_width || m_height)
glDeleteTextures(1, &m_texture);
- m_fbo = 0;
m_texture = 0;
m_width = 0;
m_height = 0;
@@ -105,6 +101,13 @@ void QGLTextureGlyphCache::clear()
QGLTextureGlyphCache::~QGLTextureGlyphCache()
{
+ if (ctx) {
+ QGLShareContextScope scope(ctx);
+
+ if (!ctx->d_ptr->workaround_brokenFBOReadBack)
+ glDeleteFramebuffers(1, &m_fbo);
+ }
+
clear();
}