diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-06-25 14:31:00 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-06-25 14:31:00 (GMT) |
commit | 3e36b311710009039e8ffdfa46702e012f25785b (patch) | |
tree | e02a30a76a9e036bdc4fe85f35ba946d1a7d5389 /src/plugins | |
parent | 9d8f5dcb46f64ee2f5e205100b603f6d01f1381b (diff) | |
parent | 4b9784fcdd7321a5d82b8ae73edd1ae52786d7ad (diff) | |
download | Qt-3e36b311710009039e8ffdfa46702e012f25785b.zip Qt-3e36b311710009039e8ffdfa46702e012f25785b.tar.gz Qt-3e36b311710009039e8ffdfa46702e012f25785b.tar.bz2 |
Merge branch '4.5'
Conflicts:
src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | 25 | ||||
-rw-r--r-- | src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp | 5 |
2 files changed, 21 insertions, 9 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index 1b499b6..3185664 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -378,7 +378,7 @@ void QDirectFBPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op) Q_D(QDirectFBPaintEngine); d->dirtyClip = true; const QPoint bottom = d->transform.map(QPoint(0, int(path.controlPointRect().bottom()))); - if (bottom.y() >= d->lastLockedHeight) + if (bottom.y() > d->lastLockedHeight) d->lock(); QRasterPaintEngine::clip(path, op); } @@ -389,7 +389,7 @@ void QDirectFBPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) d->dirtyClip = true; if (d->clip() && !d->clip()->hasRectClip && d->clip()->enabled) { const QPoint bottom = d->transform.map(QPoint(0, rect.bottom())); - if (bottom.y() >= d->lastLockedHeight) + if (bottom.y() > d->lastLockedHeight) d->lock(); } @@ -567,6 +567,7 @@ void QDirectFBPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pixmap, QPixmapData *data = pixmap.pixmapData(); Q_ASSERT(data->classId() == QPixmapData::DirectFBClass); QDirectFBPixmapData *dfbData = static_cast<QDirectFBPixmapData*>(data); + dfbData->unlockDirectFB(); IDirectFBSurface *s = dfbData->directFBSurface(); d->blit(r, s, sr); } @@ -598,6 +599,10 @@ void QDirectFBPaintEngine::drawTiledPixmap(const QRectF &r, QRasterPaintEngine::drawTiledPixmap(r, pix, sp); } else { d->unlock(); + QPixmapData *data = pixmap.pixmapData(); + Q_ASSERT(data->classId() == QPixmapData::DirectFBClass); + QDirectFBPixmapData *dfbData = static_cast<QDirectFBPixmapData*>(data); + dfbData->unlockDirectFB(); d->drawTiledPixmap(r, pixmap); } } @@ -913,11 +918,17 @@ void QDirectFBPaintEnginePrivate::end() void QDirectFBPaintEnginePrivate::setPen(const QPen &p) { pen = p; - simplePen = (pen.style() == Qt::NoPen) || - (pen.style() == Qt::SolidLine - && !antialiased - && (pen.brush().style() == Qt::SolidPattern) - && (pen.widthF() <= 1 && scale != NoScale)); + if (pen.style() == Qt::NoPen) { + simplePen = true; + } else if (pen.style() == Qt::SolidLine + && !antialiased + && pen.brush().style() == Qt::SolidPattern + && pen.widthF() <= 1.0 + && (scale == NoScale || pen.isCosmetic())) { + simplePen = true; + } else { + simplePen = false; + } } void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode mode) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp index 9dc7818..c9d5d7c 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp @@ -90,7 +90,6 @@ void QDirectFBPixmapData::resize(int width, int height) setSerialNumber(++global_ser_no); } - // mostly duplicated from qimage.cpp (QImageData::checkForAlphaPixels) static bool checkForAlphaPixels(const QImage &img) { @@ -209,6 +208,7 @@ void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect) QPixmapData::copy(data, rect); return; } + unlockDirectFB(); const QDirectFBPixmapData *otherData = static_cast<const QDirectFBPixmapData*>(data); IDirectFBSurface *src = otherData->directFBSurface(); @@ -296,10 +296,10 @@ void QDirectFBPixmapData::fill(const QColor &color) QPixmap QDirectFBPixmapData::transformed(const QTransform &transform, Qt::TransformationMode mode) const { + QDirectFBPixmapData *that = const_cast<QDirectFBPixmapData*>(this); if (!dfbSurface || transform.type() != QTransform::TxScale || mode != Qt::FastTransformation) { - QDirectFBPixmapData *that = const_cast<QDirectFBPixmapData*>(this); const QImage *image = that->buffer(); Q_ASSERT(image); const QImage transformed = image->transformed(transform, mode); @@ -308,6 +308,7 @@ QPixmap QDirectFBPixmapData::transformed(const QTransform &transform, data->fromImage(transformed, Qt::AutoColor); return QPixmap(data); } + that->unlockDirectFB(); const QSize size = transform.mapRect(QRect(0, 0, w, h)).size(); if (size.isEmpty()) |