aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/scenegraph/qsgcontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/scenegraph/qsgcontext.cpp')
-rw-r--r--src/declarative/scenegraph/qsgcontext.cpp13
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);
}