summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qimagescale.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add special thread pool for Qt GuiAllan Sandfeld Jensen2023-02-251-3/+4
| | | | | | | | | To avoid gui slowdowns due to global pool being blocked. Fixes: QTBUG-109511 Pick-to: 6.5 6.4 6.2 Change-Id: I4e8d91e8fb0bd2e395072a082e992a3c5d3464ad Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* 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>
* Rename QRgbaF to QRgbaFloat and assert the compatible typesAllan Sandfeld Jensen2021-07-051-28/+28
| | | | | | | Pick-to: 6.2 Change-Id: I2404fdfd43d3b4553760ad2f605175121cd31446 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Introduce float QImage formats and renderingAllan Sandfeld Jensen2021-05-261-0/+223
| | | | | | | | | Useful for some HDR representations and HDR rendering. Change-Id: If6e8a661faa3d2afdf17b6ed4d8ff5c5b2aeb30e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix “unused variable” warningMorten Sørvig2021-04-301-0/+2
| | | | | | Change-Id: I2b151d7a0cda8774c236de1a024acbb3a1875c7e Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Protect QImage work on shutdownAllan Sandfeld Jensen2020-10-121-1/+1
| | | | | | | | | | If the thread pool was not created, or already deleted, make sure the QImage routines can still run as they could before. Fixes: QTBUG-87320 Pick-to: 5.15 Change-Id: I4105a68b6ae0637faf82cdda5f5ae44298759396 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Do not multithread if already in a global threadpool threadAllan Sandfeld Jensen2020-06-031-2/+3
| | | | | | | | | | This can lead to a deadlock if we block all the worker threads, waiting for the worker threads to finish. Pick-to: 5.15 Fixes: QTBUG-84619 Change-Id: I92b7f96007897d86ece0c34223bab0df4ccbed9a Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Fix image scaling on WASM platformAllan Sandfeld Jensen2020-04-151-210/+36
| | | | | | | Apparently it has trouble with multi-threading from the main thread. Change-Id: Ib544d69270c2780d4a42bde6fd7f491e32f29cd2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Multithread some QImage routinesAllan Sandfeld Jensen2020-03-091-278/+516
| | | | | | | | Use QThreadPool to process QImage smooth-scaling, format conversions, and colorspace transforms multithreaded. Change-Id: Ic142b1fa899f56e7e5099d36ca713701a47b681b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Tidy nullptr usageAllan Sandfeld Jensen2019-12-061-2/+2
| | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make the 64 bit raster backend an optional featureAllan Sandfeld Jensen2019-04-091-1/+6
| | | | | | | | Can be used to make smaller binaries, and possibly speed up ARGB32 rendering on some platforms. Change-Id: I7647b197ba7a6582187cc9736b7e0d752bd5bee5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* qimagescale: Get rid of the memset callIvan Komissarov2018-10-211-1/+0
| | | | | | | | | There is no need to call a memset as long as class is initialized with new and default-constructor will initialize values. Change-Id: I02f9ec524e32cb72713f6b5e37b60f3dec72fb28 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix out of buffer access in qt_qimageScaleRgba64_up_xyAllan Sandfeld Jensen2018-08-291-1/+4
| | | | | | | | Avoid reading a pixel outside the image even if we multiply the result by 0. This mirrors a similar old fix in the the 32bit scaling path. Change-Id: I7860bc808dc46dbc94918672e99c81b56d4a1d27 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Smooth image scaling for 64bit imagesAllan Sandfeld Jensen2018-08-221-17/+218
| | | | | | | | Adds support for smooth scaling 64bit images. Task-number: QTBUG-45858 Change-Id: If46030fb8e7d684159f852a3b8266a74e5e6700c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* 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>
* NEON optimized bilinear samplingAllan Sandfeld Jensen2015-12-171-1/+1
| | | | | | | | | | | | | | | Adds NEON version of interpolate_4_pixels used by smooth upscaling, and bilinear sampling. The SSE2 version is reordered to match the NEON version so they have the same order of operations and a faster version that loads directly into vector registers. Testing is extended so we have a test of smoothness that can catch more possible mistakes. Change-Id: I0de4aecf5cb79468e7c8f19f421aa24b2955547c Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* NEON optimized qimagescaleAllan Sandfeld Jensen2015-12-041-0/+36
| | | | | | | | Adds a NEON optimized version of the QImage smooth scaling. Change-Id: I27c0a24d25f66bda3b5c55a8fabdb8b583fcd5c6 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-08-261-1/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/snippets/code/doc_src_qmake-manual.pro qmake/doc/src/qmake-manual.qdoc src/corelib/io/qstorageinfo_unix.cpp src/corelib/tools/qbytearray.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp tests/auto/network/access/qnetworkreply/BLACKLIST Change-Id: I9efcd7e1cce1c394eed425c43aa6fce7d2edf31c
| * Fix out-of-buffer read on image upscaleAllan Sandfeld Jensen2015-08-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | Avoid reading from the next pixel when the sample is fully based on the current pixel. This is particular important for the last pixel in an image when the next pixel might be outside the image buffer. Change-Id: I3607f9c6c332d11ff944ca35d216d417368f9fd5 Task-number: QTBUG-47228 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Remove unused and unneeded subimage scalingAllan Sandfeld Jensen2015-06-091-91/+61
|/ | | | | | | | | Removes the feature of scaling only a clipped area of the input which was unused and only made the code harder to read and maintain. Change-Id: I296a804a5bd083016fbc47543e00eb586b530d71 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Syntax clean up in qimagescaleAllan Sandfeld Jensen2015-06-021-27/+26
| | | | | | | | | | | | | Corrects a few white-spaces, return statements and else statements to fit Qt coding style. Comment updated to indicate how far the code is getting from its original roots. No semantic changes. Change-Id: Ia2288c501788a291bfc4e8b70e8eb1efb7a90128 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Combine x and y oriented sample helpersAllan Sandfeld Jensen2015-05-301-91/+45
| | | | | | | | The range sampling operates the same in both directions just with different step-sizes, so the code can be unduplicated, Change-Id: I47805a7e925d4058f62c558ef08e79485915e937 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Remove unused call indirectionAllan Sandfeld Jensen2015-05-301-20/+4
| | | | | | | | | | The global variable is a left over from when there was an MMX assembler implementation, and is now just making the compiler's job harder. Change-Id: I686704b64a2f8c68ec8ca83f2ac3e465ded773e0 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Cleanup and optimization of qimage smoothscaleAllan Sandfeld Jensen2015-04-151-687/+468
| | | | | | | | | Cleaning up smoothscale code. Upscaling is improved using existing optimized interpolation methods, and downscale is given SSE4.1 optimized versions. Change-Id: I7cdc256c26850948aef7dae26fda1622be6b8179 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QtGui: Fix const correctness in old style castsThiago Macieira2015-03-121-21/+23
| | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c946844bc31eb8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.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>
* Fix smooth scaling of large QImagesAlex Blasche2014-09-251-12/+13
| | | | | | Task-number: QTBUG-13448 Change-Id: Ie76f5b5deefabeae93ab17eb866aea303692f5ac Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* 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>
* Support RGBA image formatAllan Sandfeld Jensen2013-07-231-1/+1
| | | | | | | | | Support the byte-ordered RGBA format which is used by OpenGL, and many endian neutral byte formats. Task-number: QTBUG-32201 Change-Id: I77cffb4c30c69545fa96ded2f537b2ebd9351acb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@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>
* 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>
* 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/+1031
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