aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2013-10-16 13:02:41 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-16 13:12:39 +0200
commitddd9c93b084c5168d7b12396450125e7a0929c28 (patch)
treea56dc0d9618e28f602d56b554ae7237f1a70b255
parent2f83bdbe5d536464c39d5e914efb1531e562eee7 (diff)
Avoid infinite loop with distance fields disabled
createGlyphNode() and createNativeGlyphNode() kept calling each other on GLES whenever QML_DISABLE_DISTANCEFIELD was set. Change-Id: Ic1c2cfe0c4c7301f82cbbcce1cb512bd515b52ef Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index caa0d032a4..bb8e3c4b36 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -408,7 +408,11 @@ QSGDistanceFieldGlyphCache *QSGContext::distanceFieldGlyphCache(const QRawFont &
QSGGlyphNode *QSGContext::createNativeGlyphNode()
{
#if defined(QT_OPENGL_ES) && !defined(QT_OPENGL_ES_2_ANGLE)
- return createGlyphNode();
+ Q_D(QSGContext);
+ if (d->distanceFieldDisabled)
+ return new QSGDefaultGlyphNode;
+ else
+ return createGlyphNode();
#else
return new QSGDefaultGlyphNode;
#endif