From cd786ac3223a515c57222ac78dac568601bc6d2e Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 21 Mar 2011 12:05:48 +0200 Subject: Add missing bitmap locking to QVGPixmapData::fromNativeType. Reviewed-by: Jani Hautakangas --- src/openvg/qvg_symbian.cpp | 6 ++++-- 1 file 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(pixmap); resize(img->width(), img->height()); source = *img; - source.ensureFormat(idealFormat(&source.imageRef(), Qt::AutoColor)); recreate = true; } else if (type == QPixmapData::NativeImageHandleProvider && pixmap) { destroyImages(); -- cgit v0.12