summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-05 21:59:12 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-05 21:59:12 (GMT)
commit2458cb45665b0fe3144266122f876bd541de9c42 (patch)
tree5c729240b4847c886796ca688488634aca93b42c
parente99a9e6b8ef0521e46742fe876766a6021f0121d (diff)
parent888e05cc903c4a03a6571bb0e0befb86fd9443d5 (diff)
downloadQt-2458cb45665b0fe3144266122f876bd541de9c42.zip
Qt-2458cb45665b0fe3144266122f876bd541de9c42.tar.gz
Qt-2458cb45665b0fe3144266122f876bd541de9c42.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Compile with DirectFB version >= 1.2.0 && < 1.2.9 QDirectFBPaintEngine optimization Add some warnings when using DISABLE/WARN in DFB
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp32
1 files changed, 24 insertions, 8 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index 537baf5..7dce516 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -204,21 +204,36 @@ static void initRasterFallbacksMasks(int *warningMask, int *disableMask)
{ 0, ALL }
};
- const QStringList warning = QString::fromLatin1(qgetenv("QT_DIRECTFB_WARN_ON_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'));
- const QStringList disable = QString::fromLatin1(qgetenv("QT_DIRECTFB_DISABLE_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'));
+ QStringList warning = QString::fromLatin1(qgetenv("QT_DIRECTFB_WARN_ON_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'),
+ QString::SkipEmptyParts);
+ QStringList disable = QString::fromLatin1(qgetenv("QT_DIRECTFB_DISABLE_RASTERFALLBACKS")).toUpper().split(QLatin1Char('|'),
+ QString::SkipEmptyParts);
*warningMask = 0;
*disableMask = 0;
if (!warning.isEmpty() || !disable.isEmpty()) {
for (int i=0; operations[i].name; ++i) {
const QString name = QString::fromLatin1(operations[i].name);
- if (warning.contains(name)) {
+ int idx = warning.indexOf(name);
+ if (idx != -1) {
*warningMask |= operations[i].operation;
+ warning.remove(warning.begin() + idx);
}
- if (disable.contains(name)) {
+ idx = disable.indexOf(name);
+ if (idx != -1) {
*disableMask |= operations[i].operation;
+ disable.remove(disable.begin() + idx);
}
}
}
+ if (!warning.isEmpty()) {
+ qWarning("QDirectFBPaintEngine QT_DIRECTFB_WARN_ON_RASTERFALLBACKS Unknown operation(s): %s",
+ qPrintable(warning.join(QLatin1String("|"))));
+ }
+ if (!disable.isEmpty()) {
+ qWarning("QDirectFBPaintEngine QT_DIRECTFB_DISABLE_RASTERFALLBACKS Unknown operation(s): %s",
+ qPrintable(disable.join(QLatin1String("|"))));
+ }
+
}
#endif
@@ -790,13 +805,14 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush)
if (d->clipType != QDirectFBPaintEnginePrivate::ComplexClip) {
switch (brush.style()) {
case Qt::SolidPattern: {
+ const QColor color = brush.color();
+ if (!color.isValid())
+ return;
+
if (d->transformationType & QDirectFBPaintEnginePrivate::Matrix_RectsUnsupported
|| !(d->compositionModeStatus & QDirectFBPaintEnginePrivate::PorterDuff_Supported)) {
break;
}
- const QColor color = brush.color();
- if (!color.isValid())
- return;
d->setDFBColor(color);
const QRect r = state()->matrix.mapRect(rect).toRect();
CLIPPED_PAINT(d->surface->FillRectangle(d->surface, r.x(), r.y(), r.width(), r.height()));
@@ -989,7 +1005,7 @@ void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode m
case QPainter::CompositionMode_DestinationOut:
surface->SetPorterDuff(surface, DSPD_DST_OUT);
break;
-#if (Q_DIRECTFB_VERSION >= 0x010200)
+#if (Q_DIRECTFB_VERSION >= 0x010209)
case QPainter::CompositionMode_Destination:
surface->SetPorterDuff(surface, DSPD_DST);
break;