diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-10-01 07:24:27 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-10-01 07:24:27 (GMT) |
commit | 3c06efd09075c08fd9753f226a4342ea7a8356f8 (patch) | |
tree | 7c5761e283227e232eab7854b3225733b954ad29 | |
parent | 73bd68a35193f59a58be091270a5530b4d4755c0 (diff) | |
download | Qt-3c06efd09075c08fd9753f226a4342ea7a8356f8.zip Qt-3c06efd09075c08fd9753f226a4342ea7a8356f8.tar.gz Qt-3c06efd09075c08fd9753f226a4342ea7a8356f8.tar.bz2 |
Only cache textlayout in paint engines that support transformations
Task-number: QTBUG-14050
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextlayout.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextlayout.cpp b/src/declarative/graphicsitems/qdeclarativetextlayout.cpp index 5972f92..722378e 100644 --- a/src/declarative/graphicsitems/qdeclarativetextlayout.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextlayout.cpp @@ -273,7 +273,12 @@ void QDeclarativeTextLayout::draw(QPainter *painter, const QPointF &p) { QPainterPrivate *priv = QPainterPrivate::get(painter); - if (!priv->extended) { + bool paintEngineSupportsTransformations = priv->extended && + (priv->extended->type() == QPaintEngine::OpenGL2 || + priv->extended->type() == QPaintEngine::OpenVG || + priv->extended->type() == QPaintEngine::OpenGL); + + if (!paintEngineSupportsTransformations) { QTextLayout::draw(painter, p); return; } |