From be08fa8280d95c2edda7e2aaee6a5211062b0090 Mon Sep 17 00:00:00 2001 From: mread Date: Mon, 5 Dec 2011 13:30:31 +0000 Subject: 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 --- src/opengl/qgl_symbian.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- cgit v0.12