summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qdrawhelper_sse2.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use aligned operations for solid SourceOver operations.Benjamin Poulain2010-09-131-2/+5
| | | | | | | | Aligned load() and store() have been shown to be faster for the composition functions. This patch applies this to the solid SourceOver function. Reviewed-by: Samuel Rødal
* Use the stream operation for the SSE2 implementation of memfill32Benjamin Poulain2010-09-131-4/+4
| | | | | | | | | | | Writing the data of memfill() to a cacheline is unecessary because the data is not reused directly. We can use the stream operations to avoid the cache completely. When testing memfill32 separately, the function is twice as fast on Core2 and Atom. Reviewed-by: Samuel Rødal
* Allow Windows x64 to use SSE2 to speed up blendingliang jian2010-09-061-0/+72
| | | | | | | | | | | Windows 64 does not support MMX with MSVC. This is a problem with the way SSE is currently used because it rely on previous vector instructions being available. This patches fixes that by using the intended functions for SSE2 on Windows. Merge-request: 792 Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
* Undefined SSE symbols when crosscompiling Qt on PPC.Benjamin Poulain2010-08-311-1/+0
| | | | | | | | | | Qt does not build on PowerPC when compiling for both x86 and PPC on Mac. The compiler is invoked only once for both architecture so the defines are there in order to get the optimized path for x86. Those defines needs to be removed from the compilation environment when the target is set to PPC by GCC. Reviewed-by: Kent Hansen
* Implement the composition mode Plus with Neon.Benjamin Poulain2010-08-251-16/+0
| | | | | | | | | On the benchmark tst_QPainter::compositionModes(), this patches gives the following improvements: -300x300:opaque: 390% -300x300:!opaque: 1085% Reviewed-by: Samuel Rødal
* Replace the SSE prologues by a macroBenjamin Poulain2010-08-051-10/+4
| | | | | | | Replace the code of the SSE prologue by a macro to avoid copying the prologue everywhere. Reviewed-by: Andreas Kling
* Implement comp_Source with SSE2 when there is a const alphaBenjamin Poulain2010-08-041-0/+33
| | | | | | On Atom, comp_Source is 280% faster with the SSE2 implementation. Reviewed-by: Andreas Kling
* Remove an useless assert from comp_func_SourceOver_sse2()Benjamin Poulain2010-07-271-1/+0
| | | | | | | The assert can never be true since const_alpha is unsigned. That line was triggering a warning on GCC. Reviewed-by: Olivier Goffart
* Implement the composition mode "Plus" with SSE2Benjamin Poulain2010-07-271-0/+66
| | | | | | | | | | | Implement the composition function for CompositionMode_Plus with SSE2. The macro MIX() can be replaced by a single instruction add-saturate, which increase the speed a lot (13 times faster on the blend benchmark). Reviewed-by: Olivier Goffart Reviewed-by: Andreas Kling
* Use aligned load for the blending of RGB32 over RGB32Benjamin Poulain2010-07-211-2/+12
| | | | | | | | Aligned load are faster than unaligned load. This patch add a prologue to the blending function in order to align the destination on 16 bytes before using SSE2. Reviewed-by: Kent Hansen
* SSE2 implementation of convert_ARGB_to_ARGB_PM_inplace for QImageJohn Brooks2010-07-071-10/+2
| | | | | Merge-request: 725 Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
* Moved primitive SSE2 painting utilities to qdrawingprimitive_sse2_p.hJohn Brooks2010-07-071-156/+0
| | | | | Merge-request: 725 Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
* Fix an assertion in comp_func_SourceOver_sse2() if const_alpha == 0Benjamin Poulain2010-06-281-1/+1
| | | | | | | | | Const_alpha == 0 is a corner case that can happen if the painter draw with zero opacity or if the multiplication of alphas is below 1. The assertion was failing for one of the test of QPainter. Reviewed-by: Samuel Rødal
* Fixed autotest failure in fillRect_stretchToDeviceModeSamuel Rødal2010-06-241-1/+1
| | | | | | Swapping the length and color arguments to qt_memfill is a bad idea. Reviewed-by: Benjamin Poulain
* Fix the casts of qdrawhelper_sse2Benjamin Poulain2010-06-231-4/+4
| | | | | | | | I did erroneous cast by mistake, the code should ensure the pointer are on 32 bits integers. Reviewed-by: Andreas Kling Reviewed-by: Samuel Rødal
* Add a SSE2 implementation of comp_func_solid_SourceOver()Benjamin Poulain2010-06-231-1/+29
| | | | | | | | This function is used quite a lot by WebKit animations, the SSE2 implementation is twice as fast in those uses cases. Reviewed-by: Andreas Kling Reviewed-by: Samuel Rødal
* Add a SSE2 version of comp_func_SourceOver()Benjamin Poulain2010-06-231-60/+110
| | | | | | | | | | | | 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
* Replace the inline blend function by #defineBenjamin Poulain2010-02-151-67/+60
| | | | | | Some compilers do not inline the functions, which is a problem because the number of arguments exceed the limit for SSE, and because it is a lot slower for those low level functions.
* Implement the blend functions with SSE2Benjamin Poulain2010-02-121-0/+218
| | | | | | | | | | | | | 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
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* fix warnings on mingwThierry Bastian2009-09-021-1/+1
|
* Update tech preview license header.Jason McDonald2009-08-311-13/+13
| | | | Reviewed-by: Trust Me
* Update license headers.Jason McDonald2009-08-111-1/+1
| | | | Reviewed-by: Trust Me
* Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | Reviewed-by: Trust Me
* Long live Qt 4.5!Lars Knoll2009-03-231-0/+211