void QVGPixmapData::destroyImages() { if (inImagePool) { QVGImagePool *pool = QVGImagePool::instance(); if (vgImage != VG_INVALID_HANDLE) pool->releaseImage(this, vgImage); if (vgImageOpacity != VG_INVALID_HANDLE) pool->releaseImage(this, vgImageOpacity); } else { if (vgImage != VG_INVALID_HANDLE) vgDestroyImage(vgImage); if (vgImageOpacity != VG_INVALID_HANDLE) vgDestroyImage(vgImageOpacity); } vgImage = VG_INVALID_HANDLE; vgImageOpacity = VG_INVALID_HANDLE; inImagePool = false; }
void QVGPixmapData::destroyImages() { if (inImagePool) { QVGImagePool *pool = QVGImagePool::instance(); if (vgImage != VG_INVALID_HANDLE) pool->releaseImage(this, vgImage); if (vgImageOpacity != VG_INVALID_HANDLE) pool->releaseImage(this, vgImageOpacity); } else { if (vgImage != VG_INVALID_HANDLE) vgDestroyImage(vgImage); if (vgImageOpacity != VG_INVALID_HANDLE) vgDestroyImage(vgImageOpacity); } vgImage = VG_INVALID_HANDLE; vgImageOpacity = VG_INVALID_HANDLE; inImagePool = false; #if defined(Q_OS_SYMBIAN) releaseNativeImageHandle(); #endif }