From e0f0850cd48b92ae3beb33b65a3ac936d8f38b08 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 23 Jan 2017 16:07:36 +0100 Subject: [PATCH] Use context as glyph cache key in GL paint engine Switch from ctx->shareGroup() to ctx. The original intention to use the same cache instance for sharing GL contexts is reasonable, but can only work when there are only shareable resources involved. The FBO used by QOpenGLTextureGlyphCache is not one of these. Text rendering in Qt Quick already uses the same approach and uses per-context glyph caches. Change-Id: Ie7e521769f28b4902ca714eb029acfbf52814309 Task-number: QTBUG-58276 Reviewed-by: Joni Poikelin Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/opengl/qopenglpaintengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp index 5c05a05d809..90652a5ab85 100644 --- a/src/gui/opengl/qopenglpaintengine.cpp +++ b/src/gui/opengl/qopenglpaintengine.cpp @@ -1664,7 +1664,7 @@ void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngine::GlyphFormat gly QOpenGL2PaintEngineState *s = q->state(); - void *cacheKey = ctx->shareGroup(); + void *cacheKey = ctx; // use context, not the shareGroup() -> the GL glyph cache uses FBOs which may not be shareable bool recreateVertexArrays = false; QTransform glyphCacheTransform;