summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_s60.cpp
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2011-03-16 15:53:45 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2011-03-18 15:50:43 (GMT)
commit31514ab488c610056973318f5a950d925155d480 (patch)
treebfc9c2082edc5e6e5dbe1978c7bb61ff659d5aca /src/gui/kernel/qapplication_s60.cpp
parent59373dd338cb9428514b67c21d0e03b8dc189eef (diff)
downloadQt-31514ab488c610056973318f5a950d925155d480.zip
Qt-31514ab488c610056973318f5a950d925155d480.tar.gz
Qt-31514ab488c610056973318f5a950d925155d480.tar.bz2
Add flag for forcibly propagating backing store alpha to framebuffer
Previously, the following rules applies to the creation and blitting of the Symbian raster backing store: 1. Creation of backing store with an alpha channel: Backing store has an alpha channel only if !QWidget::isOpaque. 2. Pre-filling of backing store prior to paint loop: Backing store is filled with transparent pixels if !QWidget::isOpaque. 3. Blitting of backing store: CGraphicsContext::EDrawModeWriteAlpha is used (meaning that backing store alpha values are propagated into the frame buffer), if QWidget::isOpaque. In order for the direct camera viewfinder to be visible on DSA devices, alpha=0 must be written into the framebuffer in the region where the viewfinder will be displayed. This requires a backing store with an alpha channel (1), use of CGraphicsContext::EDrawModeWriteAlpha (3), but not pre-filling of the entire backing store (2). This patch adds a new enum value, QWExtra::BlitWriteAlpha, which can be used by camera backends to achieve the desired behaviour. Task-number: QTMOBILITY-1278 Reviewed-by: Jani Hautakangas
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 43b9b01..2b10d63 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;