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)
committerJason McDonald <jason.mcdonald@nokia.com>
Tue, 11 Jan 2011 09:47:44 +0000 (19:47 +1000)
commit414b50fa6f436d04e5d709d337c04a380662bf40
tree5d43957e7358f2cd9e5f7bc6eb618f525c528d59
parent9179d3f6910283758147bc62f156829f72ae0a9d
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
(cherry picked from commit 7a54885b1df9baf793374e3cb9fdf8be93ee7c80)
src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp