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.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp
index 3f67c79860..ea93748685 100644
--- a/src/openvg/qpixmapdata_vg.cpp
+++ b/src/openvg/qpixmapdata_vg.cpp
@@ -51,6 +51,7 @@
#include <QImageReader>
#include <QtGui/private/qimage_p.h>
#include <QtGui/private/qnativeimagehandleprovider_p.h>
+#include <QtGui/private/qfont_p.h>
QT_BEGIN_NAMESPACE
@@ -458,7 +459,7 @@ void QVGPixmapData::hibernate()
if (skipHibernate)
return;
- forceToImage();
+ forceToImage(false); // no readback allowed here
destroyImageAndContext();
}
@@ -470,9 +471,6 @@ void QVGPixmapData::reclaimImages()
destroyImages();
}
-Q_GUI_EXPORT int qt_defaultDpiX();
-Q_GUI_EXPORT int qt_defaultDpiY();
-
int QVGPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
{
switch (metric) {
@@ -502,12 +500,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());