summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qdrawhelper.cpp
diff options
context:
space:
mode:
authorBenjamin Poulain <benjamin.poulain@nokia.com>2010-06-22 16:18:45 (GMT)
committerBenjamin Poulain <benjamin.poulain@nokia.com>2010-06-23 17:28:49 (GMT)
commit98d9083f87feb3d78af509db43685a148aa0766e (patch)
treef92f77620799a69d303b1583515496dcd853887d /src/gui/painting/qdrawhelper.cpp
parent5817f04060f5a545a71a1f9e9dfa167f92a4ab93 (diff)
downloadQt-98d9083f87feb3d78af509db43685a148aa0766e.zip
Qt-98d9083f87feb3d78af509db43685a148aa0766e.tar.gz
Qt-98d9083f87feb3d78af509db43685a148aa0766e.tar.bz2
Add a SSE2 version of comp_func_SourceOver()
Implement a version of comp_func_SourceOver() with SSE2. This gives a performance boost of 11% on some WebKit animations. Two new macros were added to simplify the implementation of the different blending primitives: BLEND_SOURCE_OVER_ARGB32_SSE2() and BLEND_SOURCE_OVER_ARGB32_WITH_CONST_ALPHA_SSE2() Reviewed-by: Samuel Rødal
Diffstat (limited to 'src/gui/painting/qdrawhelper.cpp')
-rw-r--r--src/gui/painting/qdrawhelper.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index bfa1136..d088499 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -7817,6 +7817,12 @@ void qInitDrawhelperAsm()
#ifdef QT_HAVE_SSE2
if (features & SSE2) {
+ extern void comp_func_SourceOver_sse2(uint *destPixels,
+ const uint *srcPixels,
+ int length,
+ uint const_alpha);
+ functionForModeAsm[0] = comp_func_SourceOver_sse2;
+
extern void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl,
const uchar *srcPixels, int sbpl,
int w, int h,
@@ -7826,7 +7832,6 @@ void qInitDrawhelperAsm()
int w, int h,
int const_alpha);
-
qBlendFunctions[QImage::Format_RGB32][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse2;
qBlendFunctions[QImage::Format_ARGB32_Premultiplied][QImage::Format_RGB32] = qt_blend_rgb32_on_rgb32_sse2;
qBlendFunctions[QImage::Format_RGB32][QImage::Format_ARGB32_Premultiplied] = qt_blend_argb32_on_argb32_sse2;