summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorJani Hautakangas <jani.hautakangas@nokia.com>2011-03-09 15:15:02 +0200
committerJani Hautakangas <jani.hautakangas@nokia.com>2011-03-10 17:16:46 +0200
commit555f52c498c3ba67041c880701a66224e7b321b0 (patch)
tree113703bdf342cf98f9d741185a4fb5193a78adc5 /src/opengl
parent433e4380c98b9369a7d55894e9d34f8c87ba06e9 (diff)
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 79911fb46b..35747562f5 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);
}