diff options
author | Anders Bakken <anders.bakken@nokia.com> | 2009-08-20 22:54:02 (GMT) |
---|---|---|
committer | Anders Bakken <anders.bakken@nokia.com> | 2009-08-20 22:54:02 (GMT) |
commit | d7f8581fff438bb03ca9eae1748704c9ccaa3bd7 (patch) | |
tree | 201c2e664d105a7cb1bba51f1d7212f765ddec75 /src/plugins | |
parent | e90a5e819478b656963de0492a1b234c8863a12b (diff) | |
download | Qt-d7f8581fff438bb03ca9eae1748704c9ccaa3bd7.zip Qt-d7f8581fff438bb03ca9eae1748704c9ccaa3bd7.tar.gz Qt-d7f8581fff438bb03ca9eae1748704c9ccaa3bd7.tar.bz2 |
Support RGB32 in DirectFB again
If I make sure all surfaces that Qt may paint on are ARGB instead of
RGB32 the problem that was solved by
cef63710576571405b4eed7b225e6c895a633d6a is still solved.
Reviewed-by: Donald <qt-info@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index dc53847..45de07a 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -1029,10 +1029,10 @@ bool QDirectFBScreen::connect(const QString &displaySpec) surface = createDFBSurface(description, DontTrackSurface); #endif // Work out what format we're going to use for surfaces with an alpha channel - d_ptr->alphaPixmapFormat = QDirectFBScreen::getImageFormat(surface); + QImage::Format pixelFormat = QDirectFBScreen::getImageFormat(surface); + d_ptr->alphaPixmapFormat = pixelFormat; - setPixelFormat(d_ptr->alphaPixmapFormat); - switch (d_ptr->alphaPixmapFormat) { + switch (pixelFormat) { case QImage::Format_RGB666: d_ptr->alphaPixmapFormat = QImage::Format_ARGB6666_Premultiplied; break; @@ -1040,9 +1040,9 @@ bool QDirectFBScreen::connect(const QString &displaySpec) d_ptr->alphaPixmapFormat = QImage::Format_ARGB4444_Premultiplied; break; case QImage::Format_RGB32: - qWarning("QDirectFBScreen::connect(). Qt/DirectFB does not work with the RGB32 pixelformat. " - "We recommmend using ARGB instead"); - return false; + pixelFormat = d_ptr->alphaPixmapFormat = QImage::Format_ARGB32_Premultiplied; + // ### Format_RGB32 doesn't work so well with Qt. Force ARGB32 for windows/pixmaps + break; case QImage::Format_Indexed8: qWarning("QDirectFBScreen::connect(). Qt/DirectFB does not work with the LUT8 pixelformat."); return false; @@ -1064,8 +1064,8 @@ bool QDirectFBScreen::connect(const QString &displaySpec) // works already break; } - - QScreen::d = ::depth(pixelFormat()); + setPixelFormat(pixelFormat); + QScreen::d = ::depth(pixelFormat); data = 0; lstep = 0; size = 0; |