summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2010-03-22 15:41:42 (GMT)
committerJason Barron <jbarron@trolltech.com>2010-03-22 15:46:28 (GMT)
commitfec5410f350e4d67b7991f15da94775f97bce0bb (patch)
tree20813ce5ea1bf0c2743263e744f685e37dd3e477 /src/openvg
parent97701a9e002593b0cc17afc6ce32925464f8b2fc (diff)
downloadQt-fec5410f350e4d67b7991f15da94775f97bce0bb.zip
Qt-fec5410f350e4d67b7991f15da94775f97bce0bb.tar.gz
Qt-fec5410f350e4d67b7991f15da94775f97bce0bb.tar.bz2
Fix #ifdef logic for Symbian conversion functions in QVGPixmapData.
The previous #ifdef logic had the entire body of fromNativeType() and toNativeType() #ifdef'ed out meaning that the OpenVG graphics system could not convert CFbsBitmap instances to VGImage instances. This was obviously incorrect because this code has no dependancy on RSgImage (or EGL) and should therefore be outside of the #ifdef. Reviewed-by: TrustMe
Diffstat (limited to 'src/openvg')
-rw-r--r--src/openvg/qpixmapdata_vg.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp
index cb5255d..d602790 100644
--- a/src/openvg/qpixmapdata_vg.cpp
+++ b/src/openvg/qpixmapdata_vg.cpp
@@ -464,8 +464,8 @@ void QVGPixmapData::cleanup()
void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
{
-#if defined(QT_SYMBIAN_SUPPORTS_SGIMAGE) && !defined(QT_NO_EGL)
if (type == QPixmapData::SgImage && pixmap) {
+#if defined(QT_SYMBIAN_SUPPORTS_SGIMAGE) && !defined(QT_NO_EGL)
RSgImage *sgImage = reinterpret_cast<RSgImage*>(pixmap);
destroyImages();
@@ -536,6 +536,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
// release stuff
eglDestroyImageKHR(QEglContext::display(), eglImage);
driver.Close();
+#endif
} else if (type == QPixmapData::FbsBitmap) {
CFbsBitmap *bitmap = reinterpret_cast<CFbsBitmap*>(pixmap);
@@ -581,16 +582,12 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type)
if(deleteSourceBitmap)
delete bitmap;
}
-#else
- Q_UNUSED(pixmap);
- Q_UNUSED(type);
-#endif
}
void* QVGPixmapData::toNativeType(NativeType type)
{
-#if defined(QT_SYMBIAN_SUPPORTS_SGIMAGE) && !defined(QT_NO_EGL)
if (type == QPixmapData::SgImage) {
+#if defined(QT_SYMBIAN_SUPPORTS_SGIMAGE) && !defined(QT_NO_EGL)
toVGImage();
if (!isValid() || vgImage == VG_INVALID_HANDLE)
@@ -657,6 +654,7 @@ void* QVGPixmapData::toNativeType(NativeType type)
eglDestroyImageKHR(QEglContext::display(), eglImage);
driver.Close();
return reinterpret_cast<void*>(sgImage);
+#endif
} else if (type == QPixmapData::FbsBitmap) {
CFbsBitmap *bitmap = q_check_ptr(new CFbsBitmap);
@@ -678,10 +676,7 @@ void* QVGPixmapData::toNativeType(NativeType type)
return reinterpret_cast<void*>(bitmap);
}
-#else
- Q_UNUSED(type);
return 0;
-#endif
}
#endif //Q_OS_SYMBIAN