summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authormread <qt-info@nokia.com>2011-12-05 13:30:31 (GMT)
committermread <qt-info@nokia.com>2011-12-05 14:54:20 (GMT)
commitbe08fa8280d95c2edda7e2aaee6a5211062b0090 (patch)
tree2122f813a270ecc1928ed46123137202bcd57e3a /src/opengl
parent147ea1d18482c1f64749db52c622dded075dc66c (diff)
downloadQt-be08fa8280d95c2edda7e2aaee6a5211062b0090.zip
Qt-be08fa8280d95c2edda7e2aaee6a5211062b0090.tar.gz
Qt-be08fa8280d95c2edda7e2aaee6a5211062b0090.tar.bz2
Symbian: allow apps to disable GL multisampling
On Symbian, QML apps had no way to disable GL multisampling if the hardware supported it. This caused some apps to run out of graphics memory and fail. This change adds a way for apps to indicate that they don't want multisampling, by setting an environment variable. For example: qputenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE", "1"); This non-public API style was used as the use case is platform and application specific, and not appropriate for public API. Task-number: ou1cimx1#947771 Reviewed-by: Gareth Stockwell
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qgl_symbian.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/opengl/qgl_symbian.cpp b/src/opengl/qgl_symbian.cpp
index 94c63fc..0148304 100644
--- a/src/opengl/qgl_symbian.cpp
+++ b/src/opengl/qgl_symbian.cpp
@@ -181,7 +181,10 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) // almost same as
d->ownsEglContext = true;
d->eglContext->setApi(QEgl::OpenGL);
- if (!QSymbianGraphicsSystemEx::hasBCM2727()) {
+ // Allow apps to override ability to use multisampling by setting an environment variable. Eg:
+ // qputenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE", "1");
+ // Added to allow camera app to start with limited memory.
+ if (!QSymbianGraphicsSystemEx::hasBCM2727() && !qgetenv("QT_SYMBIAN_DISABLE_GL_MULTISAMPLE").toInt()) {
// Most likely we have hw support for multisampling
// so let's enable it.
d->glFormat.setSampleBuffers(1);