diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2010-02-18 01:19:58 (GMT) |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2010-02-24 22:16:59 (GMT) |
commit | 5e119ec1e765f1f33430632ed245242cdc9d37f1 (patch) | |
tree | 5959577f89341acaf0b09465a408417d923cfe66 /src/plugins/gfxdrivers/directfb | |
parent | 9f214d6abb0dd84110e83171bd596f56d66f00b7 (diff) | |
download | Qt-5e119ec1e765f1f33430632ed245242cdc9d37f1.zip Qt-5e119ec1e765f1f33430632ed245242cdc9d37f1.tar.gz Qt-5e119ec1e765f1f33430632ed245242cdc9d37f1.tar.bz2 |
Allow forcing premultiplied format in DFB
This was already possible in non-WM mode. I now enable using the
same connect argument to make it work for WM.
Reviewed-by: Jervey Kong <jervey.kong@nokia.com>
Diffstat (limited to 'src/plugins/gfxdrivers/directfb')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index cd4d5c2..b447967 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -1139,6 +1139,8 @@ bool QDirectFBScreen::connect(const QString &displaySpec) #endif d_ptr->dfb->SetCooperativeLevel(d_ptr->dfb, DFSCL_FULLSCREEN); + const bool forcePremultiplied = displayArgs.contains(QLatin1String("forcepremultiplied"), Qt::CaseInsensitive); + DFBSurfaceDescription description; memset(&description, 0, sizeof(DFBSurfaceDescription)); IDirectFBSurface *surface; @@ -1167,7 +1169,7 @@ bool QDirectFBScreen::connect(const QString &displaySpec) description.caps |= capabilities[i].cap; } - if (displayArgs.contains(QLatin1String("forcepremultiplied"), Qt::CaseInsensitive)) { + if (forcePremultiplied) { description.caps |= DSCAPS_PREMULTIPLIED; } @@ -1217,6 +1219,8 @@ bool QDirectFBScreen::connect(const QString &displaySpec) d_ptr->alphaPixmapFormat = QImage::Format_ARGB32_Premultiplied; break; case QImage::Format_ARGB32: + if (forcePremultiplied) + d_ptr->alphaPixmapFormat = pixelFormat = QImage::Format_ARGB32_Premultiplied; case QImage::Format_ARGB32_Premultiplied: case QImage::Format_ARGB4444_Premultiplied: case QImage::Format_ARGB8555_Premultiplied: |