summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-05-12 16:06:44 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-05-12 16:06:44 (GMT)
commitb205fca78bcede0b2eefc8c0b12fed040e77eff1 (patch)
treed2d836324535d5e9961be5e401dc47bde580750c /src/opengl
parent2bb185d5e65be09b4e1f73eadd0ab87f9d6aecbb (diff)
parentbfa6ac28c57d62f9add7fa27f029eac7f3835fab (diff)
downloadQt-b205fca78bcede0b2eefc8c0b12fed040e77eff1.zip
Qt-b205fca78bcede0b2eefc8c0b12fed040e77eff1.tar.gz
Qt-b205fca78bcede0b2eefc8c0b12fed040e77eff1.tar.bz2
Merge branch 4.7 into qt-4.8-from-4.7
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qgl_symbian.cpp30
1 files changed, 21 insertions, 9 deletions
diff --git a/src/opengl/qgl_symbian.cpp b/src/opengl/qgl_symbian.cpp
index 1b41db4..ab37977 100644
--- a/src/opengl/qgl_symbian.cpp
+++ b/src/opengl/qgl_symbian.cpp
@@ -49,6 +49,9 @@
#include <private/qpaintengine_opengl_p.h>
#include <private/qwidget_p.h> // to access QWExtra
#include <private/qnativeimagehandleprovider_p.h>
+#include <private/qapplication_p.h>
+#include <private/qgraphicssystem_p.h>
+#include <private/qgraphicssystemex_symbian_p.h>
#include "qgl_egl_p.h"
#include "qpixmapdata_gl_p.h"
#include "qgltexturepool_p.h"
@@ -180,6 +183,15 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) // almost same as
d->ownsEglContext = true;
d->eglContext->setApi(QEgl::OpenGL);
+ QGraphicsSystemEx *ex = QApplicationPrivate::graphicsSystem()->platformExtension();
+ QSymbianGraphicsSystemEx *symex = static_cast<QSymbianGraphicsSystemEx*>(ex);
+ if (symex && !symex->hasBCM2727()) {
+ // Most likely we have hw support for multisampling
+ // so let's enable it.
+ d->glFormat.setSampleBuffers(1);
+ d->glFormat.setSamples(4);
+ }
+
// If the device is a widget with WA_TranslucentBackground set, make sure the glFormat
// has the alpha channel option set:
if (devType == QInternal::Widget) {
@@ -229,20 +241,20 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) // almost same as
d->eglSurface = QEgl::createSurface(device(), d->eglContext->config());
- eglGetError(); // Clear error state first.
+ eglGetError(); // Clear error state first.
#ifdef QGL_NO_PRESERVED_SWAP
- eglSurfaceAttrib(QEgl::display(), d->eglSurface,
- EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED);
+ eglSurfaceAttrib(QEgl::display(), d->eglSurface,
+ EGL_SWAP_BEHAVIOR, EGL_BUFFER_DESTROYED);
- if (eglGetError() != EGL_SUCCESS)
- qWarning("QGLContext: could not enable destroyed swap behaviour");
+ if (eglGetError() != EGL_SUCCESS)
+ qWarning("QGLContext: could not enable destroyed swap behaviour");
#else
- eglSurfaceAttrib(QEgl::display(), d->eglSurface,
- EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED);
+ eglSurfaceAttrib(QEgl::display(), d->eglSurface,
+ EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED);
- if (eglGetError() != EGL_SUCCESS)
- qWarning("QGLContext: could not enable preserved swap behaviour");
+ if (eglGetError() != EGL_SUCCESS)
+ qWarning("QGLContext: could not enable preserved swap behaviour");
#endif
setWindowCreated(true);