summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qstatictext_p.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-06-01 11:31:18 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-06-01 12:03:17 (GMT)
commitff57057bc6844eb3c10ab0eadff292a10ef493f8 (patch)
tree638f0272653e58cf0b29e510f40272fa7e797ede /src/gui/text/qstatictext_p.h
parent6750d0dcbf5a2e88fab2e127dc3e057f0d68bf71 (diff)
downloadQt-ff57057bc6844eb3c10ab0eadff292a10ef493f8.zip
Qt-ff57057bc6844eb3c10ab0eadff292a10ef493f8.tar.gz
Qt-ff57057bc6844eb3c10ab0eadff292a10ef493f8.tar.bz2
Speed up QStaticText with affine transformation on GL2 engine
Since the OpenGL2 paint engine supports transforming the prerendered glyphs rather than rasterizing the glyphs with the transformation applied, we don't need to recalculate the QStaticText layout whenever the transformation changes. This means that we can do fast animated transforms for QStaticText on this paint engine. A quick test yields something like 100x speed-up on Windows. This also give visually better results, as we previously would animate the hinting of the glyphs, thus causing jittering. The autotest has been updated to reflect the fact that drawText() and drawStaticText() now go through identical paths on GL, also when transforms are set on the painter. However, the scale was changed in one test, because it was so great that drawText() would fall back to paths. With QStaticText the idea is speed, so you'll get a poor, but fast result instead, which is better than tricking people. Reviewed-by: Samuel
Diffstat (limited to 'src/gui/text/qstatictext_p.h')
-rw-r--r--src/gui/text/qstatictext_p.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/text/qstatictext_p.h b/src/gui/text/qstatictext_p.h
index 2ab5579..1a96291 100644
--- a/src/gui/text/qstatictext_p.h
+++ b/src/gui/text/qstatictext_p.h
@@ -148,9 +148,10 @@ public:
QFixedPoint *positionPool; // 4 bytes per text
QChar *charPool; // 4 bytes per text
- unsigned char needsRelayout : 1;
- unsigned char useBackendOptimizations : 1; // 1 byte per text
- unsigned char textFormat : 2;
+ unsigned char needsRelayout : 1; // 1 byte per text
+ unsigned char useBackendOptimizations : 1;
+ unsigned char textFormat : 2;
+ unsigned char untransformedCoordinates : 1;
// ================
// 167 bytes per text