summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qrgb.h
Commit message (Collapse)AuthorAgeFilesLines
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Make RGB_MASK inline constexprVolker Hilsheimer2020-11-021-1/+1
| | | | | | | As per comment on API review. Change-Id: If4bd234372ebad0e3bfac41642981a612fd165bd Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Replace Q_DECL_UNUSED with [[maybe_unused]]Allan Sandfeld Jensen2020-10-031-1/+1
| | | | | | | Use C++17 attribute directly Change-Id: Id853e7a5117065e4adb549f81303c1820fe198ce Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use C++17 [[maybe_unused]]Allan Sandfeld Jensen2020-09-061-1/+1
| | | | | | | In some places needs to be ordered before const/constexpr though. Change-Id: I57a521ac0ad22b5a018761c4d52befbef69d64c0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace Qt CONSTEXPR defines with constexprAllan Sandfeld Jensen2020-08-141-10/+10
| | | | | | | | 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>
* Add qtguiglobal.h and qtguiglobal_p.hLars Knoll2016-07-031-1/+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 undefined behavior in qRgba().Tilo Nitzsche2015-11-241-2/+2
| | | | | | | | | | | Shifting a signed integer that overflows is undefined behavior. All masks were changed to unsigned in qRgb and qRgba. While the alpha value is enough to fix the undefined behavior, Visual C++ generates slow code if not all of those constants are unsigned. Change-Id: Ia0ec3e9464088495173b4ad9c2e37a49e6f8e987 Task-number: QTBUG-49595 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Revert "Remove separate SSE4 unpremultiply function"Allan Sandfeld Jensen2015-04-231-34/+3
| | | | | | | | | | | 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-3/+34
| | | | | | | | | | | 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>
* 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>
* Only use 32bit version of qPremultiplyAllan Sandfeld Jensen2015-02-021-19/+2
| | | | | | | | | | With auto-vectorization enabled in QtGui, the 32bit version of qPremultiply is faster than the 64bit version since it can be vectorized wider (4x on 128bit as opposed to 2x). Since all our important 64bit targets have SIMD, that makes the 64bit version pointless. Change-Id: I4e9070a3a3c8e2b54f17a95ba0aee0405cbb8ec9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-291-19/+11
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/image/qimage.cpp src/gui/image/qppmhandler.cpp src/gui/kernel/qguiapplication.cpp src/gui/painting/qpaintengine_raster.cpp Change-Id: I7c1a8e7ebdfd7f7ae767fdb932823498a7660765
| * 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>
* | qPremultiply(QRgb): let the compiler see all versionsMarc Mutz2014-09-021-5/+9
|/ | | | | | | | | | | | | | | Use a template helper function and template specialization to select which of the two versions (64bit / 32bit) to use. This makes the compiler see both versions on all platforms, enabling better syntax checking should either of the two change. It also will fail to compile on platforms where the word size is neither 4 nor eight bytes now... And, of course, it's always satisfying to remove a use of the preprocessor. Change-Id: I4870411f99eb3b1a2c0c170fa53fa3c9b026da15 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Export optimized premultiply and unpremultiply methodsAllan Sandfeld Jensen2014-02-101-0/+43
| | | | | | | | | | | | | | | | 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>
* Make QRgb-related functions constexprGiuseppe D'Angelo2013-05-201-9/+9
| | | | | Change-Id: I44b2b60e89a3312889101d7e5c305f4f7c18f7ae Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Mark public non-member non-static variables as Q_DECL_UNUSEDThiago Macieira2013-02-121-1/+2
| | | | | | | | | | This avoids warnings in compilers that check for unused variables. They can't tell that the the variable came from a header. Change-Id: I1ea5e5bbc76d676fbb561bdc8ae6543e758de90e Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-291-4/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.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>
* get rid of Q_*_EXPORT_INLINE macrosKonstantin Ritt2012-04-261-9/+9
| | | | | | | | | | | | > Girish: > We should be able to remove the macro completely today, > just mark all those functions as plain inline. > With Qt5, we don't have to worry about bc yet. this fixes "import attribute ignored" warnings on mingw with -fno-keep-inline-dllexport Change-Id: I616e5de7c8d59953ce03a316b941a439fae56298 Reviewed-by: Olivier Goffart <ogoffart@woboq.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>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-251-1/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@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>
* 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/+88
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