summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap_blitter_p.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-12-13 12:02:32 +0100
committerJørgen Lind <jorgen.lind@nokia.com>2011-12-13 12:02:32 +0100
commitee387dcb715ebc21f63b524bb87a8ffaf198f8aa (patch)
tree3adf6ac4929ef98e081f7d61b6897cba5171e933 /src/gui/image/qpixmap_blitter_p.h
parente394dd804fa6690f6d4bd270f61ca56331cea63b (diff)
[blitter] Work on tst_QPixmap::clear()
By default QPixmap may not hasAlphaChannel(), only if setMask() or fill() with a transparent color is called a QPixmap will hasAlphaChannel(). Make the QBlittablePlatformPixmap remember if there is an alpha channel, pass this as parameter in createBlittable to make it clear that this is required and not optional. Update the DirectFB plugin to handle this parameter to create a RGB32 or ARGB Surface depending on the alpha value, also only use PreMultiplied alpha when using ARGB. Separate the two constructors for the QDirectFbBlitter to either adopt a DirectFB Surface or to create one. Cherry-picked-from: qtbase:ab50b60f5cc237d5620f3ff3b2eb44c857f8f60b Change-Id: I8abf82408ecd2d075fc6f241ace8be2a34ac56e7 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com> Merge-request: 1492 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/gui/image/qpixmap_blitter_p.h')
-rw-r--r--src/gui/image/qpixmap_blitter_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/image/qpixmap_blitter_p.h b/src/gui/image/qpixmap_blitter_p.h
index 9b809caeb4..4742a83e13 100644
--- a/src/gui/image/qpixmap_blitter_p.h
+++ b/src/gui/image/qpixmap_blitter_p.h
@@ -55,7 +55,7 @@ public:
QBlittablePixmapData();
~QBlittablePixmapData();
- virtual QBlittable *createBlittable(const QSize &size) const = 0;
+ virtual QBlittable *createBlittable(const QSize &size, bool alpha) const = 0;
QBlittable *blittable() const;
void setBlittable(QBlittable *blittable);
@@ -85,6 +85,7 @@ public:
protected:
QScopedPointer<QBlitterPaintEngine> m_engine;
QScopedPointer<QBlittable> m_blittable;
+ bool m_alpha;
#ifdef QT_BLITTER_RASTEROVERLAY
QImage *m_rasterOverlay;