summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qt_s60_p.h
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@sosco.com>2009-10-20 11:34:55 (GMT)
committerShane Kearns <shane.kearns@sosco.com>2009-10-20 11:45:02 (GMT)
commitf7d826f1a42c912f1db15da0a1cefe13bdd54906 (patch)
tree8c230d1d670130687a4301c0d4b90e7a5052a0df /src/gui/kernel/qt_s60_p.h
parentda3e89e8d98a4d3322eae94aafd38ddb444f144e (diff)
downloadQt-f7d826f1a42c912f1db15da0a1cefe13bdd54906.zip
Qt-f7d826f1a42c912f1db15da0a1cefe13bdd54906.tar.gz
Qt-f7d826f1a42c912f1db15da0a1cefe13bdd54906.tar.bz2
Use premultiplied alpha pixel format in Symbian
Gives better performance in the raster paint engine. For Symbian 9.3 onwards, this can also be used as the native pixmap format. For 9.2, conversion is required. Reviewed-by: Sami Merila Reviewed-by: Jani Hautakangas
Diffstat (limited to 'src/gui/kernel/qt_s60_p.h')
-rw-r--r--src/gui/kernel/qt_s60_p.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index d33791b..e25bc81 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -81,6 +81,9 @@ QT_BEGIN_NAMESPACE
// system events seems to start with 0x10
const TInt KInternalStatusPaneChange = 0x50000000;
+//this macro exists because EColor16MAP enum value doesn't exist in Symbian OS 9.2
+#define Q_SYMBIAN_ECOLOR16MAP TDisplayMode(13)
+
class QS60Data
{
public:
@@ -108,6 +111,7 @@ public:
int mouseInteractionEnabled : 1;
int virtualMouseRequired : 1;
int qtOwnsS60Environment : 1;
+ int supportsPremultipliedAlpha : 1;
QApplication::QS60MainApplicationFactory s60ApplicationFactory; // typedef'ed pointer type
static inline void updateScreenSize();
static inline RWsSession& wsSession();
@@ -199,7 +203,7 @@ inline void QS60Data::updateScreenSize()
S60->screenHeightInPixels = params.iPixelSize.iHeight;
S60->screenWidthInTwips = params.iTwipsSize.iWidth;
S60->screenHeightInTwips = params.iTwipsSize.iHeight;
-
+
S60->virtualMouseMaxAccel = qMax(S60->screenHeightInPixels, S60->screenWidthInPixels) / 20;
TReal inches = S60->screenHeightInTwips / (TReal)KTwipsPerInch;
@@ -302,11 +306,9 @@ static inline QImage::Format qt_TDisplayMode2Format(TDisplayMode mode)
case EColor16MA:
format = QImage::Format_ARGB32;
break;
-#if !defined(__SERIES60_31__) && !defined(__S60_32__)
- case EColor16MAP:
+ case Q_SYMBIAN_ECOLOR16MAP:
format = QImage::Format_ARGB32_Premultiplied;
break;
-#endif
default:
format = QImage::Format_Invalid;
break;