qt5base-lts/tests/auto/gui/image
Allan Sandfeld Jensen 0226795cf3 Round evenly in INV_PREMUL
Currently INV_PREMUL rounds strictly down. While PREMUL rounds evenly.

This patch adds 0x8000 to the intermediate results in INV_PREMUL before
right shifting, thereby achieving even rounding.

The rounding also makes PREMUL(INV_PREMUL()) into an identify operation,
which means we can safely convert ARGB32PM to ARGB32 and back without
ever losing color details. A test is added to verify this.

Change-Id: I1267e109caddcff0c01d726cb5c1c1e9fa5f7996
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-01-29 08:54:55 +01:00
..
qicoimageformat QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-27 03:54:42 +01:00
qicon tst_QIcon: Fix availableSizes() and task223279_inconsistentAddFile() 2013-07-15 16:28:25 +02:00
qimage Round evenly in INV_PREMUL 2014-01-29 08:54:55 +01:00
qimageiohandler QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-27 03:54:42 +01:00
qimagereader QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-27 03:54:42 +01:00
qimagewriter Check if device is opened before trying to create image handler. 2013-12-12 12:02:29 +01:00
qmovie QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-27 03:54:42 +01:00
qpicture QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-27 03:54:42 +01:00
qpixmap WinRT: Fix various test compilations 2013-10-02 12:36:05 +02:00
qpixmapcache QtGui tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-27 03:54:42 +01:00
image.pro Check for network module when building according auto tests 2013-02-19 19:20:53 +01:00