diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-19 16:03:36 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-19 16:03:36 (GMT) |
commit | 3e12d523ce4e2839bda0c1f709134cc6d3f507b3 (patch) | |
tree | 7d34bcf037ccb727f095afa3c493a2557d83c445 /src/gui/kernel | |
parent | f9815142befe5fb312a6fea1dac43c33a3189145 (diff) | |
parent | c08eed6bec191364a31aecbf5cf33277c637bd7e (diff) | |
download | Qt-3e12d523ce4e2839bda0c1f709134cc6d3f507b3.zip Qt-3e12d523ce4e2839bda0c1f709134cc6d3f507b3.tar.gz Qt-3e12d523ce4e2839bda0c1f709134cc6d3f507b3.tar.bz2 |
Merge branch 4.7 into qt-master-from-4.7
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 3 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_p.h | 5 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 10 |
3 files changed, 14 insertions, 4 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 3ce597b..3d642d0 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1132,7 +1132,8 @@ void QSymbianControl::Draw(const TRect& controlRect) const // Do nothing break; case QWExtra::Blit: - if (qwidget->d_func()->isOpaque) + case QWExtra::BlitWriteAlpha: + if (qwidget->d_func()->isOpaque || nativePaintMode == QWExtra::BlitWriteAlpha) gc.SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha); gc.BitBlt(controlRect.iTl, bitmap, backingStoreRect); break; diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index dd9bb49..b4c4163 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -322,6 +322,11 @@ struct QWExtra { */ ZeroFill, + /** + * Blit backing store, propagating alpha channel into the framebuffer. + */ + BlitWriteAlpha, + Default = Blit }; diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 16f28c7..b031936 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -809,9 +809,14 @@ void QWidgetPrivate::s60UpdateIsOpaque() { Q_Q(QWidget); - if (!q->testAttribute(Qt::WA_WState_Created) || !q->testAttribute(Qt::WA_TranslucentBackground)) + if (!q->testAttribute(Qt::WA_WState_Created)) return; + const bool writeAlpha = extraData()->nativePaintMode == QWExtra::BlitWriteAlpha; + if (!q->testAttribute(Qt::WA_TranslucentBackground) && !writeAlpha) + return; + const bool requireAlphaChannel = !isOpaque || writeAlpha; + createTLExtra(); RWindow *const window = static_cast<RWindow *>(q->effectiveWinId()->DrawableWindow()); @@ -823,12 +828,11 @@ void QWidgetPrivate::s60UpdateIsOpaque() return; } #endif - if (!isOpaque) { + if (requireAlphaChannel) { 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") || QApplicationPrivate::graphics_system_name == QLatin1String("opengl"))) { |