summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-10-07 10:51:43 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-10-07 10:54:29 (GMT)
commitfbca6e1747eb8430729f0f0eb80b13f6d3d19f3a (patch)
tree149449da7bab45fffb7065867667387dc11621da /src/opengl/gl2paintengineex
parent345ea61326100c70328e4ff0783fd4c3ee8ae441 (diff)
downloadQt-fbca6e1747eb8430729f0f0eb80b13f6d3d19f3a.zip
Qt-fbca6e1747eb8430729f0f0eb80b13f6d3d19f3a.tar.gz
Qt-fbca6e1747eb8430729f0f0eb80b13f6d3d19f3a.tar.bz2
Fix text rendering in GL when using the broken-fbo-fallback
This is a backport of 3874cd95e203da40d5205ef6455d7f56cba6923a which was committed to qt:master. Since the patch that originally exposed the bug was added to 4.7.2, this patch is required there as well. Bug is visible when resizing the glyph cache on devices where QGLContext::brokenFBOReadback defaults to true, or by setting this to true on desktop. Reviewed-by: Gunnar
Diffstat (limited to 'src/opengl/gl2paintengineex')
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index 9a5bac0..919c542 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -137,7 +137,7 @@ void QGLTextureGlyphCache::resizeTextureData(int width, int height)
if (ctx->d_ptr->workaround_brokenFBOReadBack) {
QImageTextureGlyphCache::resizeTextureData(width, height);
Q_ASSERT(image().depth() == 8);
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, oldWidth, oldHeight, GL_ALPHA, GL_UNSIGNED_BYTE, image().constBits());
+ glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, oldHeight, GL_ALPHA, GL_UNSIGNED_BYTE, image().constBits());
glDeleteTextures(1, &oldTexture);
return;
}