summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimage_p.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-01-09 12:08:07 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-10 09:44:18 +0100
commitdb73862302c41a373e299c482a4f2578909a08ed (patch)
tree26d4ba7828125d85eda3792a6ec4abaa3d534979 /src/gui/image/qimage_p.h
parent8bd238041e7222aea1a4ffaf8a170f8c46a72faa (diff)
Avoid unnecessary double conversion over ARGB32 and ARGB32PM
Currently if the converter_map does not have an entry for how to do a direct conversion, the image is first converted to ARGB32 and then to the final format. In most cases the conversion to ARGB32 is the generic converter which convert over ARGB32PM, which mean the data is converted to ARGB32PM then to ARGB32, then to ARBG32PM and then to final format. This patch uses the generic converter directly everywhere there isn't an optimized converter declared and it is valid. Change-Id: Ibad57432ef8c58025e63a032b09f92dad4a559ee Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/gui/image/qimage_p.h')
-rw-r--r--src/gui/image/qimage_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/image/qimage_p.h b/src/gui/image/qimage_p.h
index 5781cd78f3..2a280a2b18 100644
--- a/src/gui/image/qimage_p.h
+++ b/src/gui/image/qimage_p.h
@@ -114,6 +114,8 @@ typedef bool (*InPlace_Image_Converter)(QImageData *data, Qt::ImageConversionFla
extern Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormats];
extern InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QImage::NImageFormats];
+void convert_generic(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags);
+
void dither_to_Mono(QImageData *dst, const QImageData *src, Qt::ImageConversionFlags flags, bool fromalpha);
void qInitImageConversions();