summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorJani Hautakangas <jani.hautakangas@nokia.com>2011-03-09 13:15:02 (GMT)
committerJani Hautakangas <jani.hautakangas@nokia.com>2011-03-10 15:16:46 (GMT)
commit555f52c498c3ba67041c880701a66224e7b321b0 (patch)
tree113703bdf342cf98f9d741185a4fb5193a78adc5 /src/opengl
parent433e4380c98b9369a7d55894e9d34f8c87ba06e9 (diff)
downloadQt-555f52c498c3ba67041c880701a66224e7b321b0.zip
Qt-555f52c498c3ba67041c880701a66224e7b321b0.tar.gz
Qt-555f52c498c3ba67041c880701a66224e7b321b0.tar.bz2
Don't use EGL surfaces for translucency with 32MB GPU chip.
Add dynamic GPU chip detection on Symbian to decide if translucent EGL surfaces can be used. With 32MB GPU memory there is not enough memory to create for example transparent video overlay widgets and that's why hw surfaces must not be used. Task-number: QTBUG-18024 Reviewed-by: Jason Barron
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qgraphicssystem_gl.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/opengl/qgraphicssystem_gl.cpp b/src/opengl/qgraphicssystem_gl.cpp
index 79911fb..3574756 100644
--- a/src/opengl/qgraphicssystem_gl.cpp
+++ b/src/opengl/qgraphicssystem_gl.cpp
@@ -53,6 +53,10 @@
#include "private/qwindowsurface_x11gl_p.h"
#endif
+#if defined(Q_OS_SYMBIAN)
+#include <QtGui/private/qapplication_p.h>
+#endif
+
QT_BEGIN_NAMESPACE
extern QGLWidget *qt_gl_getShareWidget();
@@ -86,6 +90,14 @@ QWindowSurface *QGLGraphicsSystem::createWindowSurface(QWidget *widget) const
}
#endif
+#if defined(Q_OS_SYMBIAN)
+ if (!QApplicationPrivate::instance()->useTranslucentEGLSurfaces) {
+ QWidgetPrivate *d = qt_widget_private(widget);
+ if (!d->isOpaque && widget->testAttribute(Qt::WA_TranslucentBackground))
+ return d->createDefaultWindowSurface_sys();
+ }
+#endif
+
return new QGLWindowSurface(widget);
}