summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers/directfb
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/gfxdrivers/directfb')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp8
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp2
2 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index 2e18b48..1b499b6 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -686,8 +686,11 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush)
if (!d->unsupportedCompositionMode && d->dfbCanHandleClip(rect) && !d->matrixRotShear) {
switch (brush.style()) {
case Qt::SolidPattern: {
+ const QColor color = brush.color();
+ if (!color.isValid())
+ return;
d->unlock();
- d->setDFBColor(brush.color());
+ d->setDFBColor(color);
const QRect r = d->transform.mapRect(rect).toRect();
d->surface->FillRectangle(d->surface, r.x(), r.y(),
r.width(), r.height());
@@ -711,6 +714,8 @@ void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QBrush &brush)
void QDirectFBPaintEngine::fillRect(const QRectF &rect, const QColor &color)
{
+ if (!color.isValid())
+ return;
Q_D(QDirectFBPaintEngine);
d->updateClip();
if (d->unsupportedCompositionMode || !d->dfbCanHandleClip() || d->matrixRotShear) {
@@ -892,7 +897,6 @@ void QDirectFBPaintEnginePrivate::begin(QPaintDevice *device)
setCompositionMode(q->state()->compositionMode());
dirtyClip = true;
setPen(q->state()->pen);
- setDFBColor(pen.color());
}
void QDirectFBPaintEnginePrivate::end()
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index 62fef5b..76064ad 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -725,7 +725,7 @@ void QDirectFBScreenPrivate::setFlipFlags(const QStringList &args)
const QStringList flips = flipRegexp.cap(1).split(QLatin1Char(','),
QString::SkipEmptyParts);
flipFlags = DSFLIP_NONE;
- foreach (QString flip, flips) {
+ foreach(const QString &flip, flips) {
if (flip == QLatin1String("wait"))
flipFlags = DFBSurfaceFlipFlags(flipFlags | DSFLIP_WAIT);
else if (flip == QLatin1String("blit"))