summaryrefslogtreecommitdiffstats
path: root/src/plugins/graphicssystems/openvg
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/plugins/graphicssystems/openvg
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/plugins/graphicssystems/openvg')
-rw-r--r--src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp b/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp
index 1da58e1..4b4f677 100644
--- a/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp
+++ b/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp
@@ -43,7 +43,7 @@
#include <QtOpenVG/private/qpixmapdata_vg_p.h>
#include <QtOpenVG/private/qwindowsurface_vg_p.h>
#include <QtOpenVG/private/qvgimagepool_p.h>
-#if defined(Q_OS_SYMBIAN) && !defined(Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE)
+#if defined(Q_OS_SYMBIAN)
#include <QtGui/private/qwidget_p.h>
#endif
#include <QtGui/private/qapplication_p.h>
@@ -70,10 +70,12 @@ QPixmapData *QVGGraphicsSystem::createPixmapData(QPixmapData::PixelType type) co
QWindowSurface *QVGGraphicsSystem::createWindowSurface(QWidget *widget) const
{
-#if defined(Q_OS_SYMBIAN) && !defined(Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE)
- QWidgetPrivate *d = qt_widget_private(widget);
- if (!d->isOpaque && widget->testAttribute(Qt::WA_TranslucentBackground))
- return d->createDefaultWindowSurface_sys();
+#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 QVGWindowSurface(widget);
}