diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2009-04-07 05:16:13 (GMT) |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2009-04-07 05:16:13 (GMT) |
commit | 6ee9fd3cdb932dd8d7a2ad6a5ac61300aefc1058 (patch) | |
tree | 5a52bc59754ab69d38effaaae52e803ba74f70ce /src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp | |
parent | 3eb0951fa7664e39c74df8edfca51c2a1199209b (diff) | |
download | Qt-6ee9fd3cdb932dd8d7a2ad6a5ac61300aefc1058.zip Qt-6ee9fd3cdb932dd8d7a2ad6a5ac61300aefc1058.tar.gz Qt-6ee9fd3cdb932dd8d7a2ad6a5ac61300aefc1058.tar.bz2 |
Make sure to set blitting flags
Need to set blitting flags before blitting from a surface with alpha
channel. Otherwise alpha areas become white.
For some reason setting the porterduff to DSPD_SRC does not fix this.
Reviewed-by: TrustMe
Diffstat (limited to 'src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp index 9df3051..923025a 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp @@ -187,30 +187,13 @@ bool QDirectFBPixmapData::hasAlphaChannel() const { if (!serialNumber()) return false; + DFBSurfacePixelFormat format; + dfbSurface->GetPixelFormat(dfbSurface, &format); + return QDirectFBScreen::hasAlpha(format); // We don't need to ask DFB for this really. Can just keep track // of what image format this has. It should always have either // QDirectFBScreen::alphaPixmapFormat() or QScreen::pixelFormat() - - DFBSurfacePixelFormat format; - dfbSurface->GetPixelFormat(dfbSurface, &format); - switch (format) { - case DSPF_ARGB1555: - case DSPF_ARGB: - case DSPF_LUT8: - case DSPF_AiRGB: - case DSPF_A1: - case DSPF_ARGB2554: - case DSPF_ARGB4444: - case DSPF_AYUV: - case DSPF_A4: - case DSPF_ARGB1666: - case DSPF_ARGB6666: - case DSPF_LUT2: - return true; - default: - return false; - } } QPixmap QDirectFBPixmapData::transformed(const QTransform &transform, |