diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-01-14 12:48:00 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2010-01-14 13:07:25 (GMT) |
commit | d01179752907fa441ca1ae6f6e7e7b351e2a60f8 (patch) | |
tree | c0be2b20915d926da4e3c0d814d194a8f8100e5d /src/plugins/graphicssystems | |
parent | 645f29c727f33cc9f8b00b8efcb658a050ac6a26 (diff) | |
download | Qt-d01179752907fa441ca1ae6f6e7e7b351e2a60f8.zip Qt-d01179752907fa441ca1ae6f6e7e7b351e2a60f8.tar.gz Qt-d01179752907fa441ca1ae6f6e7e7b351e2a60f8.tar.bz2 |
minimaldfb: Set the correct SetDstBlendFunction
Diffstat (limited to 'src/plugins/graphicssystems')
-rw-r--r-- | src/plugins/graphicssystems/minimaldfb/qblitter_directfb.cpp | 14 | ||||
-rw-r--r-- | src/plugins/graphicssystems/minimaldfb/qwindowsurface_minimaldfb.cpp | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/graphicssystems/minimaldfb/qblitter_directfb.cpp b/src/plugins/graphicssystems/minimaldfb/qblitter_directfb.cpp index 3772131..c2e4b4f 100644 --- a/src/plugins/graphicssystems/minimaldfb/qblitter_directfb.cpp +++ b/src/plugins/graphicssystems/minimaldfb/qblitter_directfb.cpp @@ -50,11 +50,6 @@ void QDirectFbBlitter::fillRect(const QRectF &rect, const QColor &color) void QDirectFbBlitter::drawPixmap(const QRectF &rect, const QPixmap &pixmap, const QRectF &srcRect) { - quint32 blittingFlags = pixmap.hasAlphaChannel() ? DSBLIT_BLEND_ALPHACHANNEL : DSBLIT_NOFX; - - m_surface->SetBlittingFlags(m_surface, DFBSurfaceBlittingFlags(blittingFlags)); - m_surface->SetColor(m_surface, 0xff, 0xff, 0xff, 255); - QPixmapData *data = pixmap.pixmapData(); Q_ASSERT(data->width() && data->height()); Q_ASSERT(data->classId() == QPixmapData::BlitterClass); @@ -62,6 +57,14 @@ void QDirectFbBlitter::drawPixmap(const QRectF &rect, const QPixmap &pixmap, con QDirectFbBlitter *dfbBlitter = static_cast<QDirectFbBlitter *>(blitPm->blittable()); IDirectFBSurface *s = dfbBlitter->m_surface; + + quint32 blittingFlags = pixmap.hasAlpha()? DSBLIT_BLEND_ALPHACHANNEL : DSBLIT_NOFX; + + s->SetBlittingFlags(s, DFBSurfaceBlittingFlags(blittingFlags)); + m_surface->SetBlittingFlags(m_surface, DFBSurfaceBlittingFlags(blittingFlags)); + m_surface->SetPorterDuff(m_surface,DSPD_SRC_OVER); + m_surface->SetDstBlendFunction(m_surface,DSBF_INVSRCALPHA); + const DFBRectangle sRect = { srcRect.x(), srcRect.y(), rect.width(), rect.height() }; DFBResult result; @@ -73,7 +76,6 @@ void QDirectFbBlitter::drawPixmap(const QRectF &rect, const QPixmap &pixmap, con } if (result != DFB_OK) DirectFBError("QDirectFBBlitter::drawPixmap()", result); - } QImage *QDirectFbBlitter::doLock() diff --git a/src/plugins/graphicssystems/minimaldfb/qwindowsurface_minimaldfb.cpp b/src/plugins/graphicssystems/minimaldfb/qwindowsurface_minimaldfb.cpp index 5f03b78..7f3e165 100644 --- a/src/plugins/graphicssystems/minimaldfb/qwindowsurface_minimaldfb.cpp +++ b/src/plugins/graphicssystems/minimaldfb/qwindowsurface_minimaldfb.cpp @@ -47,8 +47,6 @@ #include <QtCore/qdebug.h> -#include <wait.h> - QT_BEGIN_NAMESPACE QDirectFbWindowSurface::QDirectFbWindowSurface(QDirectFbGraphicsSystemScreen *screen, QWidget *window) |