summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qgraphicssystemex_symbian.cpp
diff options
context:
space:
mode:
authorJani Hautakangas <jani.hautakangas@nokia.com>2011-05-30 11:02:15 (GMT)
committerJani Hautakangas <jani.hautakangas@nokia.com>2011-05-30 11:36:02 (GMT)
commit8fb90ce32dde5d4045c23ff44f29d19054db0d9b (patch)
tree923d373a4fde13ed38c150f6febc787db5d072a2 /src/gui/painting/qgraphicssystemex_symbian.cpp
parenta9c76a7403b573ebe69d324d0b2f16f367c3a458 (diff)
downloadQt-8fb90ce32dde5d4045c23ff44f29d19054db0d9b.zip
Qt-8fb90ce32dde5d4045c23ff44f29d19054db0d9b.tar.gz
Qt-8fb90ce32dde5d4045c23ff44f29d19054db0d9b.tar.bz2
Fix for BCM2727 chip detection on Symbian
QSymbianGraphcisSystemEx::hasBCM2727() uses bool QApplicationPrivate::useTranslucentEGLSurfaces to decide if Symbian is running on BCM2727 chip which is not entirely correct. bool QApplicationPrivate::useTranslucentEGLSurfaces should be assigned according to QSymbianGraphcisSystemEx::hasBCM2727() and QSymbianGraphcisSystemEx::hasBCM2727() should be also static function. Task-number: QTBUG-19578 Reviewed-by: Laszlo Agocs
Diffstat (limited to 'src/gui/painting/qgraphicssystemex_symbian.cpp')
-rw-r--r--src/gui/painting/qgraphicssystemex_symbian.cpp36
1 files changed, 30 insertions, 6 deletions
diff --git a/src/gui/painting/qgraphicssystemex_symbian.cpp b/src/gui/painting/qgraphicssystemex_symbian.cpp
index 980f72c..dc4dd92 100644
--- a/src/gui/painting/qgraphicssystemex_symbian.cpp
+++ b/src/gui/painting/qgraphicssystemex_symbian.cpp
@@ -45,10 +45,39 @@
#include "private/qapplication_p.h"
#include "qwidget_p.h"
-#include <QDebug>
+#include <e32property.h>
QT_BEGIN_NAMESPACE
+static bool bcm2727Initialized = false;
+static bool bcm2727 = false;
+
+bool QSymbianGraphicsSystemEx::hasBCM2727()
+{
+ if (bcm2727Initialized)
+ return bcm2727;
+
+ const TUid KIvePropertyCat = {0x2726beef};
+ enum TIvePropertyChipType {
+ EVCBCM2727B1 = 0x00000000,
+ EVCBCM2763A0 = 0x04000100,
+ EVCBCM2763B0 = 0x04000102,
+ EVCBCM2763C0 = 0x04000103,
+ EVCBCM2763C1 = 0x04000104,
+ EVCBCMUnknown = 0x7fffffff
+ };
+
+ TInt chipType = EVCBCMUnknown;
+ if (RProperty::Get(KIvePropertyCat, 0, chipType) == KErrNone) {
+ if (chipType == EVCBCM2727B1)
+ bcm2727 = true;
+ }
+
+ bcm2727Initialized = true;
+
+ return bcm2727;
+}
+
void QSymbianGraphicsSystemEx::releaseCachedGpuResources()
{
// Do nothing here
@@ -65,11 +94,6 @@ void QSymbianGraphicsSystemEx::releaseAllGpuResources()
}
}
-bool QSymbianGraphicsSystemEx::hasBCM2727()
-{
- return !QApplicationPrivate::instance()->useTranslucentEGLSurfaces;
-}
-
void QSymbianGraphicsSystemEx::forceToRaster(QWidget *window)
{
if (window && window->isWindow()) {