Fix regression in text rendering in OpenGL2 engine
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Tue, 4 Jan 2011 14:35:58 +0000 (15:35 +0100)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Wed, 5 Jan 2011 09:17:00 +0000 (10:17 +0100)
commit7a54885b1df9baf793374e3cb9fdf8be93ee7c80
treebe8d551eec51af40f1c8fc0bfd0245ac2d893528
parentc01231089fe396689310f56529d06ab4136296fa
Fix regression in text rendering in OpenGL2 engine

Change 532115bcaa370af827a5cbad017b272842c5aacf introduced a regression
by fixing a typo in the QT_OPENGL_ES_2 macro. This caused a broken
and untested code path to be used in the GLES2 case. Since the QImage
scanlines are 32 bit aligned, QImage::width() cannot be used when
copying the data. Rather than pass in bytesPerLine() to the GL function,
I opted to revert to the proven behavior, where the pad bytes are never
read by GL but each scanline is copied separately, to avoid further
regressions on different hardware. This also seems like the more correct
approach, as the pad bytes should ideally not be copied into the cache
texture.

Reviewed-by: Samuel
src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp