summaryrefslogtreecommitdiffstats
path: root/src/openvg/qpixmapdata_vg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvg/qpixmapdata_vg.cpp')
-rw-r--r--src/openvg/qpixmapdata_vg.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp
index 3f67c79..80f5b2f 100644
--- a/src/openvg/qpixmapdata_vg.cpp
+++ b/src/openvg/qpixmapdata_vg.cpp
@@ -458,7 +458,7 @@ void QVGPixmapData::hibernate()
if (skipHibernate)
return;
- forceToImage();
+ forceToImage(false); // no readback allowed here
destroyImageAndContext();
}
@@ -502,12 +502,13 @@ int QVGPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
// Ensures that the pixmap is backed by some valid data and forces the data to
// be re-uploaded to the VGImage when toVGImage() is called next time.
-void QVGPixmapData::forceToImage()
+void QVGPixmapData::forceToImage(bool allowReadback)
{
if (!isValid())
return;
- ensureReadback(false);
+ if (allowReadback)
+ ensureReadback(false);
if (source.isNull())
source = QVolatileImage(w, h, sourceFormat());