summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-02-05 12:03:42 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-02-05 12:03:42 (GMT)
commit29a48b2d76b855b2f7401a25d6114339208fd4d4 (patch)
tree467556bd3dc3664a2745535753d560647436f8aa /src/opengl/gl2paintengineex
parent6d14ccae6d532a8560da05cdc85d7646ea2744e6 (diff)
downloadQt-29a48b2d76b855b2f7401a25d6114339208fd4d4.zip
Qt-29a48b2d76b855b2f7401a25d6114339208fd4d4.tar.gz
Qt-29a48b2d76b855b2f7401a25d6114339208fd4d4.tar.bz2
Add explanatory comment to QGL2PaintEngineExPrivate::drawCachedGlyphs
A small hack to turn off the current matrix when drawing QStaticText, since its coordinates are already transformed.
Diffstat (limited to 'src/opengl/gl2paintengineex')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index ed0f708..917a1a2 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1451,6 +1451,9 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp
QBrush pensBrush = q->state()->pen.brush();
setBrush(pensBrush);
+ // When painting a QStaticTextItem, the glyph positions are already in device coordinates,
+ // therefore we temporarily set an identity matrix on the painter for the draw call to
+ // avoid transforming the positions twice.
QTransform old = s->matrix;
if (includeMatrixInCache)
s->matrix = QTransform();