summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp')
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index 919c542..28e8c40 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -54,11 +54,18 @@ extern Q_GUI_EXPORT bool qt_cleartype_enabled;
QGLTextureGlyphCache::QGLTextureGlyphCache(QGLContext *context, QFontEngineGlyphCache::Type type, const QTransform &matrix)
: QImageTextureGlyphCache(type, matrix)
- , ctx(context)
+ , ctx(0)
, m_width(0)
, m_height(0)
, m_filterMode(Nearest)
{
+ setContext(context);
+}
+
+void QGLTextureGlyphCache::setContext(QGLContext *context)
+{
+ ctx = context;
+
// broken FBO readback is a bug in the SGX 1.3 and 1.4 drivers for the N900 where
// copying between FBO's is broken if the texture is either GL_ALPHA or POT. The
// workaround is to use a system-memory copy of the glyph cache for this device.