summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
authoraavit <qt-info@nokia.com>2011-06-27 13:43:22 (GMT)
committeraavit <qt-info@nokia.com>2011-06-27 13:43:22 (GMT)
commit4e25c4e1e2f648bcda55b2dca0857ff3e73245bf (patch)
treea6a5e21ac53271215d015480204849590e044ecc /src/openvg
parent514941c71b69ab967bdd18ae758f953de05f5480 (diff)
parentc7fbfa24ede337a7e38d4436a927368d8d461621 (diff)
downloadQt-4e25c4e1e2f648bcda55b2dca0857ff3e73245bf.zip
Qt-4e25c4e1e2f648bcda55b2dca0857ff3e73245bf.tar.gz
Qt-4e25c4e1e2f648bcda55b2dca0857ff3e73245bf.tar.bz2
Merge remote-tracking branch 'qt-mainline/4.8'
Diffstat (limited to 'src/openvg')
-rw-r--r--src/openvg/qpaintengine_vg.cpp9
-rw-r--r--src/openvg/qpixmapdata_vg.cpp3
-rw-r--r--src/openvg/qpixmapdata_vg_p.h2
-rw-r--r--src/openvg/qvg_symbian.cpp5
4 files changed, 16 insertions, 3 deletions
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 8bf329d..de8ea88 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -3213,7 +3213,7 @@ static void drawImageTiled(QVGPaintEnginePrivate *d,
VGImage tileWithOpacity = VG_INVALID_HANDLE;
if (d->opacity != 1) {
tileWithOpacity = pool->createPermanentImage(VG_sARGB_8888_PRE,
- tileWidth, tileHeight, VG_IMAGE_QUALITY_FASTER);
+ tileWidth, tileHeight, VG_IMAGE_QUALITY_NONANTIALIASED);
if (tileWithOpacity == VG_INVALID_HANDLE)
qWarning("drawImageTiled: Failed to create extra tile, ignoring opacity");
}
@@ -3226,6 +3226,10 @@ static void drawImageTiled(QVGPaintEnginePrivate *d,
VGfloat scaleY = r.height() / sourceRect.height();
d->setImageOptions();
+ VGImageQuality oldImageQuality = d->imageQuality;
+ VGRenderingQuality oldRenderingQuality = d->renderingQuality;
+ d->setImageQuality(VG_IMAGE_QUALITY_NONANTIALIASED);
+ d->setRenderingQuality(VG_RENDERING_QUALITY_NONANTIALIASED);
for (int y = sourceRect.y(); y < sourceRect.height(); y += tileHeight) {
int h = qMin(tileHeight, sourceRect.height() - y);
@@ -3265,6 +3269,9 @@ static void drawImageTiled(QVGPaintEnginePrivate *d,
vgDestroyImage(tile);
if (tileWithOpacity != VG_INVALID_HANDLE)
vgDestroyImage(tileWithOpacity);
+
+ d->setImageQuality(oldImageQuality);
+ d->setRenderingQuality(oldRenderingQuality);
}
// Used by qpixmapfilter_vg.cpp to draw filtered VGImage's.
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp
index f3ca57c..597f3fa 100644
--- a/src/openvg/qpixmapdata_vg.cpp
+++ b/src/openvg/qpixmapdata_vg.cpp
@@ -249,9 +249,10 @@ void QVGPixmapData::createPixmapForImage(QImage &image, Qt::ImageConversionFlags
// same. Detaching is needed to prevent issues with painting
// onto this QPixmap later on.
convertedImage.detach();
+ if (convertedImage.isNull())
+ qWarning("QVGPixmapData: Failed to convert image data (out of memory? try increasing heap size)");
source = QVolatileImage(convertedImage);
}
-
recreate = true;
}
diff --git a/src/openvg/qpixmapdata_vg_p.h b/src/openvg/qpixmapdata_vg_p.h
index 18846f3..4a969c0 100644
--- a/src/openvg/qpixmapdata_vg_p.h
+++ b/src/openvg/qpixmapdata_vg_p.h
@@ -138,7 +138,7 @@ public:
QSize size() const { return QSize(w, h); }
#if defined(Q_OS_SYMBIAN)
- QVolatileImage toVolatileImage() const { return source; }
+ QVolatileImage toVolatileImage() const;
void* toNativeType(NativeType type);
void fromNativeType(void* pixmap, NativeType type);
bool initFromNativeImageHandle(void *handle, const QString &type);
diff --git a/src/openvg/qvg_symbian.cpp b/src/openvg/qvg_symbian.cpp
index 249b053..98a5869 100644
--- a/src/openvg/qvg_symbian.cpp
+++ b/src/openvg/qvg_symbian.cpp
@@ -288,6 +288,11 @@ void* QVGPixmapData::toNativeType(NativeType type)
return 0;
}
+QVolatileImage QVGPixmapData::toVolatileImage() const
+{
+ return source;
+}
+
QSymbianVGFontGlyphCache::QSymbianVGFontGlyphCache() : QVGFontGlyphCache()
{
#ifdef QT_SYMBIAN_HARDWARE_GLYPH_CACHE