summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2011-03-14 10:08:26 (GMT)
committerSami Merila <sami.merila@nokia.com>2011-03-14 10:08:26 (GMT)
commit8f59ff17926e246ff732ce40890a3a7625b8e826 (patch)
treecc1da34e767b7b6dd2121ab09f199775c8acae4f /src/gui
parent8b7c98123eadf9263c6bde4b1263bd64fc388c8d (diff)
parent2ecb0ea77c04424f6f557ca8a13c1d86666763df (diff)
downloadQt-8f59ff17926e246ff732ce40890a3a7625b8e826.zip
Qt-8f59ff17926e246ff732ce40890a3a7625b8e826.tar.gz
Qt-8f59ff17926e246ff732ce40890a3a7625b8e826.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qvolatileimagedata_symbian.cpp3
-rw-r--r--src/gui/kernel/qapplication_p.h2
-rw-r--r--src/gui/kernel/qapplication_s60.cpp27
-rw-r--r--src/gui/kernel/qwidget_s60.cpp15
4 files changed, 40 insertions, 7 deletions
diff --git a/src/gui/image/qvolatileimagedata_symbian.cpp b/src/gui/image/qvolatileimagedata_symbian.cpp
index 474d0ef..6e2909b 100644
--- a/src/gui/image/qvolatileimagedata_symbian.cpp
+++ b/src/gui/image/qvolatileimagedata_symbian.cpp
@@ -392,6 +392,9 @@ void QVolatileImageData::initWithBitmap(CFbsBitmap *source)
} else if (needsCopy) {
// Rasterize extended and compressed bitmaps.
bitmap = rasterizeBitmap(source, EColor16MAP);
+ } else if (source->DisplayMode() == EGray2) {
+ // The pixels will be inverted, must make a copy.
+ bitmap = rasterizeBitmap(source, source->DisplayMode());
} else {
// Efficient path: no pixel data copying. Just duplicate. This of course
// means the original bitmap's data may get modified, but that's fine
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index 43634ef..3d2c9d6 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -599,6 +599,8 @@ public:
int pressureSupported;
int maxTouchPressure;
QList<QTouchEvent::TouchPoint> appAllTouchPoints;
+
+ bool useTranslucentEGLSurfaces;
#endif
private:
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 6e43c8b..43b9b01 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -100,7 +100,6 @@ static const int KGoomMemoryGoodEvent = 0x20026790;
static const int KSplitViewOpenEvent = 0x2001E2C0;
static const int KSplitViewCloseEvent = 0x2001E2C1;
-
#if defined(QT_DEBUG)
static bool appNoGrab = false; // Grabbing enabled
#endif
@@ -1665,6 +1664,32 @@ void qt_init(QApplicationPrivate * /* priv */, int)
QObject::connect(qApp, SIGNAL(aboutToQuit()), qApp, SLOT(_q_aboutToQuit()));
#endif
+#ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
+ QApplicationPrivate::instance()->useTranslucentEGLSurfaces = true;
+
+ 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 /*chip type*/, chipType) == KErrNone) {
+ if (chipType == EVCBCM2727B1) {
+ // We have only 32MB GPU memory. Use raster surfaces
+ // for transparent TLWs.
+ QApplicationPrivate::instance()->useTranslucentEGLSurfaces = false;
+ }
+ } else {
+ QApplicationPrivate::instance()->useTranslucentEGLSurfaces = false;
+ }
+#else
+ QApplicationPrivate::instance()->useTranslucentEGLSurfaces = false;
+#endif
/*
### Commented out for now as parameter handling not needed in SOS(yet). Code below will break testlib with -o flag
int argc = priv->argc;
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index be212fb..62d09fe 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -813,17 +813,21 @@ void QWidgetPrivate::s60UpdateIsOpaque()
RWindow *const window = static_cast<RWindow *>(q->effectiveWinId()->DrawableWindow());
#ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
- window->SetSurfaceTransparency(!isOpaque);
- extra->topextra->nativeWindowTransparencyEnabled = !isOpaque;
-#else
+ if (QApplicationPrivate::instance()->useTranslucentEGLSurfaces) {
+ window->SetSurfaceTransparency(!isOpaque);
+ extra->topextra->nativeWindowTransparencyEnabled = !isOpaque;
+ return;
+ }
+#endif
if (!isOpaque) {
const TDisplayMode displayMode = static_cast<TDisplayMode>(window->SetRequiredDisplayMode(EColor16MA));
if (window->SetTransparencyAlphaChannel() == KErrNone) {
window->SetBackgroundColor(TRgb(255, 255, 255, 0));
extra->topextra->nativeWindowTransparencyEnabled = 1;
- if (extra->topextra->backingStore.data() &&
- QApplicationPrivate::graphics_system_name == QLatin1String("openvg")) {
+ if (extra->topextra->backingStore.data() && (
+ QApplicationPrivate::graphics_system_name == QLatin1String("openvg")
+ || QApplicationPrivate::graphics_system_name == QLatin1String("opengl"))) {
// Semi-transparent EGL surfaces aren't supported. We need to
// recreate backing store to get translucent surface (raster surface).
extra->topextra->backingStore.create(q);
@@ -834,7 +838,6 @@ void QWidgetPrivate::s60UpdateIsOpaque()
window->SetTransparentRegion(TRegionFix<1>());
extra->topextra->nativeWindowTransparencyEnabled = 0;
}
-#endif
}
void QWidgetPrivate::setWindowIcon_sys(bool forceReset)