summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-10-08 13:27:44 (GMT)
committeraxis <qt-info@nokia.com>2010-10-08 13:27:44 (GMT)
commita7eab236ca29a06180faa43f982365ae646bb9a3 (patch)
tree82fe55a8aa3932f4f64700a12ff4bb1e13eaafea /src/openvg
parentf8596b2269631b9522e51bb0a68d86588d4696c7 (diff)
parent4ee912a752a4b7f129e98e180328f1f46f053d4f (diff)
downloadQt-a7eab236ca29a06180faa43f982365ae646bb9a3.zip
Qt-a7eab236ca29a06180faa43f982365ae646bb9a3.tar.gz
Qt-a7eab236ca29a06180faa43f982365ae646bb9a3.tar.bz2
Merge branch '4.7-s60' into master-s60
Conflicts: src/openvg/qvg_symbian.cpp
Diffstat (limited to 'src/openvg')
-rw-r--r--src/openvg/qvg_symbian.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/openvg/qvg_symbian.cpp b/src/openvg/qvg_symbian.cpp
index e97ade8..45138f6 100644
--- a/src/openvg/qvg_symbian.cpp
+++ b/src/openvg/qvg_symbian.cpp
@@ -229,8 +229,7 @@ void* QVGPixmapData::toNativeType(NativeType type)
sgInfo.iSizeInPixels.SetSize(w, h);
sgInfo.iUsage = ESgUsageBitOpenVgImage | ESgUsageBitOpenVgSurface;
- RSgImage *sgImage = new RSgImage();
- Q_CHECK_PTR(sgImage);
+ QScopedPointer<RSgImage> sgImage(new RSgImage());
err = sgImage->Create(sgInfo, NULL, NULL);
if (err != KErrNone) {
driver.Close();
@@ -241,7 +240,7 @@ void* QVGPixmapData::toNativeType(NativeType type)
EGLImageKHR eglImage = QEgl::eglCreateImageKHR(QEgl::display(),
EGL_NO_CONTEXT,
EGL_NATIVE_PIXMAP_KHR,
- (EGLClientBuffer)sgImage,
+ (EGLClientBuffer)sgImage.data(),
(EGLint*)KEglImageAttribs);
if (!eglImage || eglGetError() != EGL_SUCCESS) {
sgImage->Close();
@@ -263,13 +262,14 @@ void* QVGPixmapData::toNativeType(NativeType type)
if (vgGetError() != VG_NO_ERROR) {
sgImage->Close();
- sgImage = 0;
+ sgImage.reset();
}
+
// release stuff
vgDestroyImage(dstVgImage);
QEgl::eglDestroyImageKHR(QEgl::display(), eglImage);
driver.Close();
- return reinterpret_cast<void*>(sgImage);
+ return reinterpret_cast<void*>(sgImage.take());
#endif
} else if (type == QPixmapData::FbsBitmap) {
CFbsBitmap *bitmap = new CFbsBitmap;