diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-06-06 07:43:51 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2011-06-06 07:43:51 +0200 |
commit | 05563678aae259909b89fe203e5095756d65bc91 (patch) | |
tree | 3888416cf583c2d24a2e76c4a15a696708cb2430 /src/declarative | |
parent | 4d0e5d954497f565ebe0d91becad094890bf8f90 (diff) |
Fixed up command line options a bit
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/scenegraph/qsgcontext.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/declarative/scenegraph/qsgcontext.cpp b/src/declarative/scenegraph/qsgcontext.cpp index e36d432e40..55942bebe4 100644 --- a/src/declarative/scenegraph/qsgcontext.cpp +++ b/src/declarative/scenegraph/qsgcontext.cpp @@ -281,10 +281,17 @@ QSGImageNode *QSGContext::createImageNode() */ QSGGlyphNode *QSGContext::createGlyphNode() { + // ### Do something with these before final release... + static bool doSubpixel = qApp->arguments().contains(QLatin1String("--text-subpixel-antialiasing")); + static bool doGray = qApp->arguments().contains(QLatin1String("--text-gray-antialiasing")); + if (QSGDistanceFieldGlyphCache::distanceFieldEnabled()) { QSGGlyphNode *node = new QSGDistanceFieldGlyphNode; - if (qApp->arguments().contains(QLatin1String("--subpixel-antialiasing"))) + + if (doSubpixel) node->setPreferredAntialiasingMode(QSGGlyphNode::SubPixelAntialiasing); + else if (doGray) + node->setPreferredAntialiasingMode(QSGGlyphNode::GrayAntialiasing); return node; } else { return new QSGDefaultGlyphNode; @@ -299,8 +306,10 @@ QSGGlyphNode *QSGContext::createGlyphNode() */ QSGRenderer *QSGContext::createRenderer() { + // ### Do something with this before release... + static bool doFrontToBack = qApp->arguments().contains(QLatin1String("--opaque-front-to-back")); QMLRenderer *renderer = new QMLRenderer(this); - if (qApp->arguments().contains(QLatin1String("--opaque-front-to-back"))) { + if (doFrontToBack) { printf("QSGContext: Sorting opaque nodes front to back...\n"); renderer->setSortFrontToBackEnabled(true); } |