summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qdrawingprimitive_sse2_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Replace Qt CONSTEXPR defines with constexprAllan Sandfeld Jensen2020-08-141-1/+1
| | | | | | | | Both normal and relaxed constexpr are required by our new minimum of C++17. Change-Id: Ic028b88a2e7a6cb7d5925f3133b9d54859a81744 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Replace Q_ALWAYS_INLINE with static inlineAllan Sandfeld Jensen2020-07-281-4/+4
| | | | | | | | | Static inline on functions serves the same purpose of keeping non- inlined instances from different binaries from being mixed, and has the benefit of being available across compilers. Change-Id: I12467f6d887471d8fd70ff4623c473c2a5a45664 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use Q_DECL_VECTORCALL in a few more placesThiago Macieira2018-12-111-2/+2
| | | | | | | | | | | There were a few functions that passed vectors in parameters but did not mark as vectorcall. I've taken the opportunity to de-macroify one macro, but I'm not going to do it for the rest. Change-Id: I42a48bd64ccc41aebf84fffd1564bfc21faa2a14 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Optimize unpremultiply using SSE rcpAllan Sandfeld Jensen2018-05-231-22/+47
| | | | | Change-Id: I255031d354b0fde7abe8366ea2c86a35f9f24afd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Avoid auto-vectorization of epilogues of manual vectorizationAllan Sandfeld Jensen2016-10-111-2/+2
| | | | | | | | | | Defines a structure that tells the compiler in no uncertain terms the maximum number of times a loop can be run. The reduces the size of qdrawhelper_avx2.o from 22kbytes to 11kbytes. Change-Id: Ie3d6281b04b4be3332497c15f3dfe9f185e20507 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make blendPixel function generalAllan Sandfeld Jensen2016-09-091-20/+4
| | | | | | | | Moves the blendPixel function from the SSSE3 file and use it more generally, also adds a const_alpha version. Change-Id: Ia29d1ab3879a845d5b65e0610b7836507e33c7ed Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add qtguiglobal.h and qtguiglobal_p.hLars Knoll2016-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. A similar scheme and naming convention is already being used for many other modules (e.g. printsupport, qml, quick). That header will later on #include the configuration file for Qt Gui. For now it defines the Q_GUI_EXPORT macro for this library. In addition, add a private global header, qtguiglobal_p.h, that can later on include the private config header for Qt Gui for things we don't want to export to the world. Change-Id: Id9ce2a4f3d2962c3592c35e3d080574789195f24 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Fix premul conversion from ARGB32 to A2RGB30 formats.Allan Sandfeld Jensen2015-06-031-0/+38
| | | | | | | | | When a premultiplied alpha changes value because it is rounded to fewer bits the premultiplied colors may need to be recalculated with the new value. Otherwise the color will both be wrong and potentially invalid. Change-Id: I9ec74a22aac73cd7ffab04e180cf2bf35bb4c315 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Short-cut SSE4 unpremultiplyAllan Sandfeld Jensen2015-04-251-2/+4
| | | | | | | | Even with SSE4 optimized unpremultiply it is still significantly faster to skip the calculation on alpha values 0 and 255. Change-Id: Iafe658fea8eacf35a857f292952b0c1ee056139c Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Revert "Remove separate SSE4 unpremultiply function"Allan Sandfeld Jensen2015-04-231-0/+21
| | | | | | | | | | | Could causedSSE4 instructions to be used on non SSE4 machines in cases when qUnpremultiplywas not inlined. This reverts commit 964ccc58534aac436529007000d1c38d76c88834. Change-Id: Ic676ade8f75129e8d37c4d96cbfb2bdb5b794919 Task-number: QTBUG-45741 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove separate SSE4 unpremultiply functionAllan Sandfeld Jensen2015-04-161-21/+0
| | | | | | | | | | | Merges the SSE4 specific unpremultiply with the normal version, and adds a SSE2 fallback. There was no reason to split the two since compile time options will ensure the right version is inlined. Also adds short-cut for 0 and 255 values. Change-Id: Ie5aa262f6964219fd3062d4a498f697cf79a4595 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtGui: Fix const correctness in old style castsThiago Macieira2015-03-121-2/+2
| | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c946844bc31eb8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Minor optimization in SSE4 unpremultiplyAllan Sandfeld Jensen2015-02-261-2/+1
| | | | | | | Use a more direct conversion to desired unpacked format. Change-Id: I47e4a31c580f294c4e717850c4a420e16214e0a9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Optimize unpremultiply on SSE4.1Allan Sandfeld Jensen2015-02-091-0/+22
| | | | | | | | | Adds an SSE4.1 optimized version of qUnpremultiply and uses it in the most drawing conversions methods. This gives a speed-up of little over 2x. Change-Id: Ieb858a94ada1eb86d7af715ac1a100f1587f360d Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Remove runtime detection of SSE2Thiago Macieira2014-01-161-2/+2
| | | | | | | | | | | | | | | | | | If the compiler supports SSE2, we'll use our SSE2-optimised code unconditionally. Runtime detection is left for SSSE3 code. The SSE2 codebase is big and thus a timebomb if an inline function gets leaked out and run without runtime check. In reality, it's extremely unlikely people running CPUs without SSE2 support are running Qt 5 at this moment (they're either too old or too new, e.g. Intel Quark). The SSSE3 codebase is a lot more manageable. Task-number: QTBUG-30440 Change-Id: I3e586e4434e820365d5316b650ee3061d0acf767 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Overhaul the qsimd_p.h: rename macros and update conditionalsThiago Macieira2012-05-311-2/+2
| | | | | | | | | | | | | | | The QT_HAVE_xxx macros are replaced with QT_COMPILER_SUPPORTS_xxx. They indicate that the compiler supports those intrinsics, but not necessarily that they can be used right now. ICC and MSVC allow one to use the intrinsics anywhere, but for Qt all uses of the intrinsics are either in specially-built files, protected by runtime checks, or they are unconditional (qstring.cpp). So we only use the intrinsics when the compiler was instructed to generate code for that instruction set anyway. Change-Id: Ie58eebbc0518ad1d5420a85174fd84153bb9abaa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Improve drawing scaled image with raster using SSE2Olivier Goffart2011-10-241-22/+28
| | | | | | | | | | | | | | That codepath is taken in qml when an Image specify with and hight and is not smooth, and the image contains alpha contents The changes in qdrawingprimitive_sse2_p.h just put some code from the BLEND_SOURCE_OVER_ARGB32_SSE2 macro into a sub macro to allow its reuse The code that is not SSE2 in qt_scale_image_argb32_on_argb32_sse2 comes from the qt_scale_image_argb32_on_argb32 in qblendfunctions.cpp Change-Id: I071a040af4514fb21777dead9f7c5baf16071d59 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+241
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12