summaryrefslogtreecommitdiffstats
path: root/src/openvg/qpaintengine_vg.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-03-10 09:22:05 (GMT)
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-03-10 09:22:05 (GMT)
commite1ce31e9ecf7e773895632fcf3087369a50c04f1 (patch)
tree084704e3f582c62302a640e9d6bcedf3a07cdf9f /src/openvg/qpaintengine_vg.cpp
parent9c5aa419ba467ff2d59440bafe2ca82d1065afec (diff)
downloadQt-e1ce31e9ecf7e773895632fcf3087369a50c04f1.zip
Qt-e1ce31e9ecf7e773895632fcf3087369a50c04f1.tar.gz
Qt-e1ce31e9ecf7e773895632fcf3087369a50c04f1.tar.bz2
Avoid image conversion in fromSymbianCFbsBitmap for certain formats.
From now on the image data coming from CFbsBitmap will not be forced to RGB32 or ARGB32_Premultiplied in openvg. This allows copy-less creation and drawing of pixmaps not just from bitmaps with display mode EColor16MAP and EColor16MU, but also a few other modes, like EColor64K. Painting into such pixmaps or drawing them via the raster engine is potentially slower in such cases, which is now reflected in the fromSymbianCFbsBitmap documentation. Note that this patch has no effect on extended bitmaps (e.g. skin graphics), those must always be rasterized first regardless of the display mode. Task-number: QTBUG-18027 Reviewed-by: Jani Hautakangas
Diffstat (limited to 'src/openvg/qpaintengine_vg.cpp')
-rw-r--r--src/openvg/qpaintengine_vg.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index f0f198f..f1b3277 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -4018,6 +4018,8 @@ VGImageFormat qt_vg_image_to_vg_format(QImage::Format format)
switch (format) {
case QImage::Format_MonoLSB:
return VG_BW_1;
+ case QImage::Format_Indexed8:
+ return VG_sL_8;
case QImage::Format_ARGB32_Premultiplied:
return VG_sARGB_8888_PRE;
case QImage::Format_RGB32:
@@ -4028,7 +4030,8 @@ VGImageFormat qt_vg_image_to_vg_format(QImage::Format format)
return VG_sRGB_565;
case QImage::Format_ARGB4444_Premultiplied:
return VG_sARGB_4444;
- default: break;
+ default:
+ break;
}
return VG_sARGB_8888; // XXX
}