convert the SVG image to QImage::Format_ARGB32_Premultiplied only if it is not in format with alpha channel

since it is painting of image (not painting to image) the performance
impact of it not being QImage::Format_ARGB32_Premultiplied is neglectable

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-11-18 14:33:44 +02:00
parent 041b961c0b
commit ac19ddd82a

View file

@ -2340,7 +2340,7 @@ static QSvgNode *createImageNode(QSvgNode *parent,
return nullptr;
}
if (image.format() == QImage::Format_ARGB32) {
if (image.format() < QImage::Format_ARGB32) {
image = image.convertToFormat(QImage::Format_ARGB32_Premultiplied);
}