Clean up qimage.cpp by moving all the conversions methods out

A large part of qimage.cpp is the implementation of the various
conversions methods from one format to another. These methods could all
be moved to a separate file to make qimage.cpp smaller, and possible
later enable more aggressive optimization on the conversions.

Change-Id: I355806710281b4222114cdd9c35a7c28cbc0f692
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
This commit is contained in:
Allan Sandfeld Jensen 2013-12-17 16:39:00 +01:00 committed by The Qt Project
parent 0e4d94edd0
commit 8bd238041e
4 changed files with 2167 additions and 2114 deletions

View File

@ -32,6 +32,7 @@ HEADERS += \
SOURCES += \
image/qbitmap.cpp \
image/qimage.cpp \
image/qimage_conversions.cpp \
image/qimageiohandler.cpp \
image/qimagereader.cpp \
image/qimagewriter.cpp \

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -108,7 +108,17 @@ struct Q_GUI_EXPORT QImageData { // internal image data
QPaintEngine *paintEngine;
};
typedef void (*Image_Converter)(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags);
typedef bool (*InPlace_Image_Converter)(QImageData *data, Qt::ImageConversionFlags);
extern Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormats];
extern InPlace_Image_Converter qimage_inplace_converter_map[QImage::NImageFormats][QImage::NImageFormats];
void dither_to_Mono(QImageData *dst, const QImageData *src, Qt::ImageConversionFlags flags, bool fromalpha);
void qInitImageConversions();
const uchar *qt_get_bitflip_array();
Q_GUI_EXPORT void qGamma_correct_back_to_linear_cs(QImage *image);
inline int qt_depthForFormat(QImage::Format format)