From 05563678aae259909b89fe203e5095756d65bc91 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Mon, 6 Jun 2011 07:43:51 +0200 Subject: Fixed up command line options a bit --- src/declarative/scenegraph/qsgcontext.cpp | 13 +++++++++++-- 1 file 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); } -- cgit v1.2.3