aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-06-04 19:43:28 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-06-04 19:43:28 +0200
commit7a6bf3ed5c5338dca085c3979edc8ec8f51c7980 (patch)
tree3ac51f00add44ab871434e6d71eae7771b818181 /src/quick/scenegraph
parent0462193b6fb97fbe7ccde496c33d82d4d5fce8c0 (diff)
parent7e73dc01f85355e23a4ee07c0b624b253541acdc (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: .qmake.conf Change-Id: Ib8b5509c48a686f6e916708d83914e13e4f67e9c
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index d3710c7bd5..c47250662b 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -54,6 +54,7 @@
#include <QGuiApplication>
#include <QOpenGLContext>
+#include <QQuickWindow>
#include <QtGui/qopenglframebufferobject.h>
#include <private/qqmlglobal_p.h>
@@ -159,15 +160,13 @@ QSGContext::QSGContext(QObject *parent) :
QObject(*(new QSGContextPrivate), parent)
{
Q_D(QSGContext);
- static bool doSubpixel = qApp->arguments().contains(QLatin1String("--text-subpixel-antialiasing"));
- static bool doLowQualSubpixel = qApp->arguments().contains(QLatin1String("--text-subpixel-antialiasing-lowq"));
- static bool doGray = qApp->arguments().contains(QLatin1String("--text-gray-antialiasing"));
- if (doSubpixel)
+ QByteArray mode = qgetenv("QSG_DISTANCEFIELD_ANTIALIASING");
+ if (mode == "subpixel")
d->distanceFieldAntialiasing = QSGGlyphNode::HighQualitySubPixelAntialiasing;
- else if (doLowQualSubpixel)
+ else if (mode == "subpixel-lowq")
d->distanceFieldAntialiasing = QSGGlyphNode::LowQualitySubPixelAntialiasing;
- else if (doGray)
- d->distanceFieldAntialiasing = QSGGlyphNode::GrayAntialiasing;
+ else if (mode == "gray")
+ d->distanceFieldAntialiasing = QSGGlyphNode::GrayAntialiasing;
}
@@ -398,6 +397,8 @@ QSurfaceFormat QSGContext::defaultSurfaceFormat() const
QSurfaceFormat format;
format.setDepthBufferSize(24);
format.setStencilBufferSize(8);
+ if (QQuickWindow::hasDefaultAlphaBuffer())
+ format.setAlphaBufferSize(8);
format.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
return format;
}