summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-06-24 21:29:32 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-06-24 21:51:18 (GMT)
commit9d66697a72dd3c26ed744ffecab50722eb9adaee (patch)
treedfdb825ea0a2f3c4446636da7035d38e63803e1e /src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
parent592d9767f4299d7ad8a3b923cf0d272ec9c32861 (diff)
downloadQt-9d66697a72dd3c26ed744ffecab50722eb9adaee.zip
Qt-9d66697a72dd3c26ed744ffecab50722eb9adaee.tar.gz
Qt-9d66697a72dd3c26ed744ffecab50722eb9adaee.tar.bz2
Fix a rendering issue
Make sure surfaces always are locked when used as source for something. Reviewed-by: TrustMe
Diffstat (limited to 'src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index c2048d8..ce3d6e4 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -81,11 +81,9 @@ void QDirectFBPixmapData::resize(int width, int height)
qWarning("QDirectFBPixmapData::resize(): Unable to allocate surface");
return;
}
-
setSerialNumber(++global_ser_no);
}
-
// mostly duplicated from qimage.cpp (QImageData::checkForAlphaPixels)
static bool checkForAlphaPixels(const QImage &img)
{
@@ -200,6 +198,7 @@ void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect)
QPixmapData::copy(data, rect);
return;
}
+ unlockDirectFB();
IDirectFBSurface *src = static_cast<const QDirectFBPixmapData*>(data)->directFBSurface();
alpha = data->hasAlphaChannel();
@@ -282,10 +281,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);
@@ -294,6 +293,7 @@ QPixmap QDirectFBPixmapData::transformed(const QTransform &transform,
data->fromImage(transformed, Qt::AutoColor);
return QPixmap(data);
}
+ that->unlockDirectFB();
int w, h;
dfbSurface->GetSize(dfbSurface, &w, &h);