diff options
Diffstat (limited to 'src/openvg/qpaintengine_vg.cpp')
-rw-r--r-- | src/openvg/qpaintengine_vg.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index a082e08..d8b45de 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -3343,15 +3343,9 @@ void QVGPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF else drawVGImage(d, r, vgpd->toVGImage(d->opacity), vgpd->size(), sr); - if(!vgpd->failedToAlloc) + if (vgpd->vgImage != VG_INVALID_HANDLE) return; - // try to reallocate next time if reasonable small pixmap - QSize screenSize = QApplication::desktop()->screenGeometry().size(); - if (pm.size().width() <= screenSize.width() - && pm.size().height() <= screenSize.height()) - vgpd->failedToAlloc = false; - vgpd->source.beginDataAccess(); drawImage(r, vgpd->source.imageRef(), sr, Qt::AutoColor); vgpd->source.endDataAccess(true); @@ -3375,15 +3369,9 @@ void QVGPaintEngine::drawPixmap(const QPointF &pos, const QPixmap &pm) else drawVGImage(d, pos, vgpd->toVGImage(d->opacity)); - if (!vgpd->failedToAlloc) + if (vgpd->vgImage != VG_INVALID_HANDLE) return; - // try to reallocate next time if reasonable small pixmap - QSize screenSize = QApplication::desktop()->screenGeometry().size(); - if (pm.size().width() <= screenSize.width() - && pm.size().height() <= screenSize.height()) - vgpd->failedToAlloc = false; - vgpd->source.beginDataAccess(); drawImage(pos, vgpd->source.imageRef()); vgpd->source.endDataAccess(true); |