diff options
author | Liang Qi <liang.qi@nokia.com> | 2011-06-24 09:52:41 (GMT) |
---|---|---|
committer | Liang Qi <liang.qi@nokia.com> | 2011-06-24 09:52:41 (GMT) |
commit | cf2f72f4f61f3a9e0e7573379c33bb341eeba7be (patch) | |
tree | 06fbd459f62f87344e7db973a0a9f3050cece825 /src/openvg | |
parent | 164728f711136356a6c3482f762321b01c9d82dd (diff) | |
parent | 705b0f958a6071341b10cbd51917e1378356491b (diff) | |
download | Qt-cf2f72f4f61f3a9e0e7573379c33bb341eeba7be.zip Qt-cf2f72f4f61f3a9e0e7573379c33bb341eeba7be.tar.gz Qt-cf2f72f4f61f3a9e0e7573379c33bb341eeba7be.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7
Conflicts:
src/gui/image/qpixmap_raster_symbian.cpp
src/gui/image/qpixmapdatafactory.cpp
src/gui/painting/qgraphicssystem.cpp
src/gui/styles/qs60style.cpp
src/network/bearer/qnetworkconfigmanager_p.h
src/s60installs/bwins/QtGuiu.def
src/s60installs/bwins/QtOpenGLu.def
src/s60installs/bwins/QtOpenVGu.def
src/s60installs/eabi/QtGuiu.def
src/s60installs/eabi/QtOpenVGu.def
tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp
Diffstat (limited to 'src/openvg')
-rw-r--r-- | src/openvg/qpaintengine_vg.cpp | 9 | ||||
-rw-r--r-- | src/openvg/qpixmapdata_vg.cpp | 3 | ||||
-rw-r--r-- | src/openvg/qpixmapdata_vg_p.h | 2 | ||||
-rw-r--r-- | src/openvg/qvg_symbian.cpp | 5 |
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 |