summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qemulationpaintengine.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eblomfel@trolltech.com>2009-08-21 14:29:44 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-01-14 13:05:08 (GMT)
commitbf919e06127962836a6b566bf119cf248c6a999b (patch)
tree789ca79fa342cf741513cb21e6d4d3728345a511 /src/gui/painting/qemulationpaintengine.cpp
parent7fbffd29e5904151a3a249004031d0502a16f4fc (diff)
downloadQt-bf919e06127962836a6b566bf119cf248c6a999b.zip
Qt-bf919e06127962836a6b566bf119cf248c6a999b.tar.gz
Qt-bf919e06127962836a6b566bf119cf248c6a999b.tar.bz2
Implement drawStaticTextItem() in OpenGL paint engines
The OpenGL and OpenGL2 engines now have support for static text, as well as the QEmulationPaintEngine. Also contains an optimization: Instead of passing both the position and glyph positions to drawStaticTextItem() we add the position into the glyph position and update it only when it changes. Otherwise we would have to do this work in all engines for every call. This means we have to cache the position in QStaticTextPrivate as well, but it seems like a small price to pay, since it's a per-text overhead and only 16 bytes.
Diffstat (limited to 'src/gui/painting/qemulationpaintengine.cpp')
-rw-r--r--src/gui/painting/qemulationpaintengine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/painting/qemulationpaintengine.cpp b/src/gui/painting/qemulationpaintengine.cpp
index f2f0c73..4067b97 100644
--- a/src/gui/painting/qemulationpaintengine.cpp
+++ b/src/gui/painting/qemulationpaintengine.cpp
@@ -175,6 +175,11 @@ void QEmulationPaintEngine::drawTextItem(const QPointF &p, const QTextItem &text
real_engine->drawTextItem(p, textItem);
}
+void QEmulationPaintEngine::drawStaticTextItem(QStaticTextItem *item)
+{
+ real_engine->drawStaticTextItem(item);
+}
+
void QEmulationPaintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s)
{
if (state()->bgMode == Qt::OpaqueMode && pixmap.isQBitmap())