diff options
author | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-10-27 09:19:20 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond.kjernasen@nokia.com> | 2010-10-27 09:19:20 (GMT) |
commit | 9a9b891db491953c5b2d922aacb25aba0dce6771 (patch) | |
tree | 2a4801a07fdf639700b2244639d05a780a616589 /src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp | |
parent | 5c92ff774eadca40e6f33b5e096df01ecc5da717 (diff) | |
download | Qt-9a9b891db491953c5b2d922aacb25aba0dce6771.zip Qt-9a9b891db491953c5b2d922aacb25aba0dce6771.tar.gz Qt-9a9b891db491953c5b2d922aacb25aba0dce6771.tar.bz2 |
Fixes unstability caused by a dangling pointer in GL text rendering
Reviewed-by: eskil
Diffstat (limited to 'src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp')
-rw-r--r-- | src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp index b8576cb..f185f9a 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp @@ -54,11 +54,11 @@ extern Q_GUI_EXPORT bool qt_cleartype_enabled; #endif QGLTextureGlyphCache::QGLTextureGlyphCache(const QGLContext *context, QFontEngineGlyphCache::Type type, const QTransform &matrix) - : QImageTextureGlyphCache(type, matrix) + : QImageTextureGlyphCache(type, matrix), QGLContextGroupResourceBase() , ctx(context) , pex(0) - , m_filterMode(Nearest) , m_blitProgram(0) + , m_filterMode(Nearest) { #ifdef QT_GL_TEXTURE_GLYPH_CACHE_DEBUG qDebug(" -> QGLTextureGlyphCache() %p for context %p.", this, ctx); @@ -208,8 +208,8 @@ void QGLTextureGlyphCache::resizeTextureData(int width, int height) { QString source; - source.append(qglslMainWithTexCoordsVertexShader); - source.append(qglslUntransformedPositionVertexShader); + source.append(QLatin1String(qglslMainWithTexCoordsVertexShader)); + source.append(QLatin1String(qglslUntransformedPositionVertexShader)); QGLShader *vertexShader = new QGLShader(QGLShader::Vertex, m_blitProgram); vertexShader->compileSourceCode(source); @@ -219,8 +219,8 @@ void QGLTextureGlyphCache::resizeTextureData(int width, int height) { QString source; - source.append(qglslMainFragmentShader); - source.append(qglslImageSrcFragmentShader); + source.append(QLatin1String(qglslMainFragmentShader)); + source.append(QLatin1String(qglslImageSrcFragmentShader)); QGLShader *fragmentShader = new QGLShader(QGLShader::Fragment, m_blitProgram); fragmentShader->compileSourceCode(source); |