Pass a persistent QImage to QPixmap::fromImage when paint engine is raster.
For native engines, a temporary QImage can be provided, but raster will just take and store the QImage, so a memcpy is needed. The paint engine relevant for pixmaps can be detected by opening a painter on a 1x1 pixmap and querying the QPaintEngine. For optimization, this is done only once per application lifetime because DImg::convertToPixmap is very time critical. BUG: 278320
parent
7fab15b6
Please register or sign in to comment