summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-08-21 06:00:08 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-08-21 06:00:08 (GMT)
commitf11fc8f62558543dac1eca9d52a4801196c55221 (patch)
treee7236141e946dae9cc791a240896c640999d6fd7 /src/plugins
parentd63d0c10c0eeef0d2f93f3d0b197e09399087b00 (diff)
parent95c116a562c6d488caf5f2222af3c261c304587f (diff)
downloadQt-f11fc8f62558543dac1eca9d52a4801196c55221.zip
Qt-f11fc8f62558543dac1eca9d52a4801196c55221.tar.gz
Qt-f11fc8f62558543dac1eca9d52a4801196c55221.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into qtscript-jsc-backend
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp7
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp16
2 files changed, 15 insertions, 8 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index 26a2374..956189c 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -847,6 +847,13 @@ void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode m
{
if (!surface)
return;
+
+ static const bool forceRasterFallBack = qgetenv("QT_DIRECTFB_FORCE_RASTER").toInt() > 0;
+ if (forceRasterFallBack) {
+ compositionModeStatus = 0;
+ return;
+ }
+
compositionModeStatus = PorterDuff_SupportedBlits;
switch (mode) {
case QPainter::CompositionMode_Clear:
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;