From fbca6e1747eb8430729f0f0eb80b13f6d3d19f3a Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 7 Oct 2010 12:51:43 +0200 Subject: 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 --- src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v0.12