diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2010-12-09 11:44:58 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2010-12-09 11:58:20 (GMT) |
commit | 99938908456a422ebced06744deec6333546bf6b (patch) | |
tree | a47d28f19f591b49561b33b924931f6d961e1cc7 /src | |
parent | e195adf461ae81f1fedd75cc8907f823edd1f8f7 (diff) | |
download | Qt-99938908456a422ebced06744deec6333546bf6b.zip Qt-99938908456a422ebced06744deec6333546bf6b.tar.gz Qt-99938908456a422ebced06744deec6333546bf6b.tar.bz2 |
Fixed missing text in GL 2 engine after recreating a context.
If we recreate the texture glyph cache, we also need to repopulate.
Reviewed-by: Eskil Abrahamsen Blomfeldt
Diffstat (limited to 'src')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 3ddc15a..ac41c04 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1477,16 +1477,18 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp QOpenGL2PaintEngineState *s = q->state(); + bool recreateVertexArrays = false; + QGLTextureGlyphCache *cache = (QGLTextureGlyphCache *) staticTextItem->fontEngine()->glyphCache(ctx, glyphType, QTransform()); if (!cache || cache->cacheType() != glyphType) { cache = new QGLTextureGlyphCache(ctx, glyphType, QTransform()); staticTextItem->fontEngine()->setGlyphCache(ctx, cache); + recreateVertexArrays = true; } else if (cache->context() == 0) { // Old context has been destroyed, new context has same ptr value cache->setContext(ctx); } - bool recreateVertexArrays = false; if (staticTextItem->userDataNeedsUpdate) recreateVertexArrays = true; else if (staticTextItem->userData() == 0) |