summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-03-21 10:05:48 (GMT)
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-03-21 10:39:06 (GMT)
commitcd786ac3223a515c57222ac78dac568601bc6d2e (patch)
treeb374ab691a318ce0933a6261dd780955043de754 /src/openvg
parent4ff9f1394f0cc527864ecba29bc7f6a9c3210fea (diff)
downloadQt-cd786ac3223a515c57222ac78dac568601bc6d2e.zip
Qt-cd786ac3223a515c57222ac78dac568601bc6d2e.tar.gz
Qt-cd786ac3223a515c57222ac78dac568601bc6d2e.tar.bz2
Add missing bitmap locking to QVGPixmapData::fromNativeType.
Reviewed-by: Jani Hautakangas
Diffstat (limited to 'src/openvg')
-rw-r--r--src/openvg/qvg_symbian.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/openvg/qvg_symbian.cpp b/src/openvg/qvg_symbian.cpp
index 2924d41..24b31a2 100644
--- a/src/openvg/qvg_symbian.cpp
+++ b/src/openvg/qvg_symbian.cpp
@@ -195,14 +195,16 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
if (!conversionLessFormat(source.format())) {
// Here we may need to copy if the formats do not match.
// (e.g. for display modes other than EColor16MAP and EColor16MU)
- source.ensureFormat(idealFormat(&source.imageRef(), Qt::AutoColor));
+ source.beginDataAccess();
+ QImage::Format format = idealFormat(&source.imageRef(), Qt::AutoColor);
+ source.endDataAccess(true);
+ source.ensureFormat(format);
}
recreate = true;
} else if (type == QPixmapData::VolatileImage && pixmap) {
QVolatileImage *img = static_cast<QVolatileImage *>(pixmap);
resize(img->width(), img->height());
source = *img;
- source.ensureFormat(idealFormat(&source.imageRef(), Qt::AutoColor));
recreate = true;
} else if (type == QPixmapData::NativeImageHandleProvider && pixmap) {
destroyImages();