diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2014-01-29 11:41:31 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-10 12:49:06 +0100 |
commit | a7b8ef08415b8056661c3db5950842ee546891b9 (patch) | |
tree | f010dbec1421980535be48705b51b7c62d079a16 /src/gui/image/qimage_sse2.cpp | |
parent | 143d591aab7a2d244913e9d13f079de05eb7a65c (diff) |
Export optimized premultiply and unpremultiply methods
This patch optimizes the unpremultiply method further by using a
lookup table to avoid any divisions at all.
The opportunity is taken to export both premultiply and unpremultiply
since they are commonly used methods relevant to the exported QRgb type
that can be both premultiplied and unpremultipled ARGB.
[ChangeLog][QtGui][QColor] Exported highly optimized methods for
premultiply and unpremultiply of QRgb values.
Change-Id: I658bcf57b0bc73c34c1765b64617d43b63ae820b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/gui/image/qimage_sse2.cpp')
-rw-r--r-- | src/gui/image/qimage_sse2.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/image/qimage_sse2.cpp b/src/gui/image/qimage_sse2.cpp index 0d6eac4ea2..037846c9aa 100644 --- a/src/gui/image/qimage_sse2.cpp +++ b/src/gui/image/qimage_sse2.cpp @@ -94,7 +94,7 @@ bool convert_ARGB_to_ARGB_PM_inplace_sse2(QImageData *data, Qt::ImageConversionF if (*p < 0x00ffffff) *p = 0; else if (*p < 0xff000000) - *p = PREMUL(*p); + *p = qPremultiply(*p); } d = reinterpret_cast<__m128i*>(p+pad); |