diff options
author | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-02-12 13:29:08 (GMT) |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-02-12 13:48:54 (GMT) |
commit | f25099f400e7379f0a6e00500e990948b9785e63 (patch) | |
tree | d1f39c1891ab8225ab46fd2ca3c1424702b95c59 /src/gui/painting/qdrawhelper_x86_p.h | |
parent | e353008fc60cb03b3422807254f6120328d3b858 (diff) | |
download | Qt-f25099f400e7379f0a6e00500e990948b9785e63.zip Qt-f25099f400e7379f0a6e00500e990948b9785e63.tar.gz Qt-f25099f400e7379f0a6e00500e990948b9785e63.tar.bz2 |
Implement the blend functions with SSE2
When available, use SSE2 to blend images, computation is
done on 4 pixels at the time instead of 1 with MMX.
Performance improvements:
- Blending ARGB32 on RGB32/ARGB32, mostly opaque: 188%
- Blending ARGB32 on RGB32/ARGB32, no opaque pixels: 180%
- Blending ARGB32 on RGB32/ARGB32, with 0.5 opacity: 187%
- Blending RGB32 on RGB32/ARGB32, with 0.5 opacity: 206%
Reviewed-by: Samuel Rødal
Diffstat (limited to 'src/gui/painting/qdrawhelper_x86_p.h')
-rw-r--r-- | src/gui/painting/qdrawhelper_x86_p.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/painting/qdrawhelper_x86_p.h b/src/gui/painting/qdrawhelper_x86_p.h index 30aadd0..d7282a7 100644 --- a/src/gui/painting/qdrawhelper_x86_p.h +++ b/src/gui/painting/qdrawhelper_x86_p.h @@ -114,6 +114,14 @@ void qt_bitmapblit32_sse2(QRasterBuffer *rasterBuffer, int x, int y, void qt_bitmapblit16_sse2(QRasterBuffer *rasterBuffer, int x, int y, quint32 color, const uchar *src, int width, int height, int stride); +void qt_blend_argb32_on_argb32_sse2(uchar *destPixels, int dbpl, + const uchar *srcPixels, int sbpl, + int w, int h, + int const_alpha); +void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl, + const uchar *srcPixels, int sbpl, + int w, int h, + int const_alpha); #endif // QT_HAVE_SSE2 #ifdef QT_HAVE_IWMMXT |