summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qblendfunctions.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headersAkseli Salovaara2015-03-311-13/+13
| | | | | | | | | 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. Change-Id: I7e3e96183e073877b46bc8071b2ccae19e69426b Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Avoid out of bounds memory reads when scaling imagesv4.8.6Lars Knoll2014-04-031-15/+15
| | | | | | | | | | | | | | | | | | The calculation of the width/height required for the scaling algorithm was prone to floating point rounding issues, where the lower value got rounded down, the higher one rounded up. This could lead to a situation where we iterated over one more line/pixel in the line than we have in the source image. Correct this by passing the dimension of the source image into the function and bounds checking the values before iterating. Backport of If44b2235a479224660d508a0504fec40d724763a from Qt 5 Task-number: QTBUG-35927 Change-Id: If145ee715a143b889538243f45227d8d78a0050f Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Updated year in copyright headerKai Koehne2014-03-261-1/+1
| | | | | | | | | | | | | | | | | | find . -path '*/3rdparty/*' -prune -o -type f -print | xargs -L1 sed -i -E 's/Copyright(.*) 2013 Digia/Copyright\1 2014 Digia/g' Manually patched files: demos/spectrum/3rdparty/fftreal/fftreal_wrapper.h demos/spectrum/3rdparty/fftreal/fftreal_wrapper.cpp src/3rdparty/s60/eiksoftkeyimage.h tools/qdoc3/test/qt-project.qdocconf tests/auto/qsharedpointer/nontracked.h tests/auto/qsharedpointer/nontracked.cpp Change-Id: I3f9074923b4d6bd4666258ab04f01476cc6e901c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. 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: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Various INTEGRITY fixesRolland Dudemaine2011-02-221-1/+1
| | | | | | | | | | Small-ish compilation fixes. Note that "Value" is a reserved word on INTEGRITY, so we need to use the correct namespace. Merge-request: 1101 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
* Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-111-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Fix usage of QT_ARCH_ARM* after a28ddf6Bradley T. Hughes2010-09-231-2/+2
|/ | | | | | | | | Remove unnecessary use of QT_ARCH_ARMV6 from qglobal.h (QT_ARCH_ARM is always defined when QT_ARCH_ARMV6 is defined), and fix the use of QT_ARCH_ARM to assume ARM < v6 in qblendfunctions.cpp (use QT_ARCH_ARMV5 instead). Reviewed-by: thiago
* Use NEON and preloading for 16 bit small / medium sized image blits.Samuel Rødal2010-09-011-4/+4
| | | | | | | | | | | | | | This gives a nice speedup for blitting of small and medium sized images by using preloading and avoiding function call overhead to memcpy for each scanline. For larger image widths memcpy becomes more efficient. Speedups of up to 40 % for 64 pixel wide images were measured. For image widths between 2 and 16 the speedup ranges between 12 % and 28 %. Task-number: QT-3401 Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
* Optimized scaled/transformed image blending for ARGB32PM and RGB16 on RGB16.Samuel Rødal2010-03-261-417/+21
| | | | | | | | | | | | | Before: :/traces/qmlphoneconcept.trace, iterations: 5, frames: 48, min(ms): 1207, median(ms): 1212, stddev: 0,165153 %, max(fps): 39,768020 After: traces/qmlphoneconcept.trace, iterations: 3, frames: 48, min(ms): 884, median(ms): 886, stddev: 0,383097 %, max(fps): 54,298643 Task-number: QTBUG-6684 Reviewed-by: Gunnar Sletta
* Included ARM NEON optimizations from pixman in Qt.Samuel Rødal2010-03-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the N900 16 bit text blending is 30 - 50 % faster, and ARGB32PM on RGB16 image blending now runs in 1/10th of the time it used to. We now make ARGB32PM the default pixmap format for alpha pixmaps instead of ARGB8565PM which is unaligned and bad for performance. The relevant numbers: Mostly opaque pixels: ARGB24 on ARGB24 using QPainter..................: 336,813033 ARGB32 on ARGB32 using QPainter.................: 18,419387 RGB16 on ARGB24 using QPainter..................: 167,301014 RGB16 on ARGB32 using QPainter..................: 17,279372 ARGB24 on RGB16 using QPainter..................: 35,100147 ARGB32PM on RGB16 using QPainter................: 15,924256 No opaque pixels: ARGB24 on ARGB24 using QPainter..................: 412,190765 ARGB32 on ARGB32 using QPainter.................: 16,818389 RGB16 on ARGB24 using QPainter..................: 170,957878 RGB16 on ARGB32 using QPainter..................: 16,742984 ARGB24 on RGB16 using QPainter..................: 93,600482 ARGB32PM on RGB16 using QPainter................: 15,999310 So switching to ARGB32PM should give a boost in all areas. Task-number: QTBUG-6684 Reviewed-by: Gunnar Sletta
* Update copyright year to 2010Jason McDonald2010-01-071-1/+1
| | | | Reviewed-by: Trust Me
* NEON configure detection and initial blend function implementations.Samuel Rødal2009-12-181-1/+1
| | | | | | | | | | | | | | | | Adds new NEON configure test and -no-neon configure option. NEON implementations can also be turned off by setting the QT_NO_NEON environment variable. Performance improvements (in frames per second): - Blending ARGB32 on RGB32/ARGB32, mostly opaque: 71 % - Blending ARGB32 on RGB32/ARGB32, no opaque pixels: 108 % - Blending ARGB32 on RGB32/ARGB32, with 0.5 opacity: 158 % - Blending RGB32 on RGB32/ARGB32, with 0.5 opacity: 189 % Task-number: QTBUG-6684 Reviewed-by: Gunnar Sletta Reviewed-by: Paul Olav Tvete
* Warning FixesOlivier Goffart2009-11-171-4/+0
|
* Fixing merger errors.Aleksandar Sasha Babic2009-11-161-3/+0
| | | | | | | Removing some unreferenced variables that were left overs after revert&merge operation. Reviewed-by: Kim Motoyoshi Kalland
* Revert "Using qreal more consistently in code (prevent misuse of double)"Aleksandar Sasha Babic2009-11-111-5/+13
| | | | | | | | This reverts commit 676780d515cedca85829ae962e4f501c5e5b6581. Conflicts: src/gui/painting/qblendfunctions.cpp
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6-s60axis2009-11-091-8/+32
|\ | | | | | | | | Conflicts: src/gui/painting/qblendfunctions.cpp
| * Fixed crash in qt_scale_image_16/32bit() when target is flipped.Kim Motoyoshi Kalland2009-11-061-8/+32
| | | | | | | | | | | | | | | | | | If the target rectangle had negative width or height and the target rectangle's border passed through pixel centres, qt_scale_image_16/32bit() could crash because of incorrect rounding. Task-number: 5493 Reviewed-by: Gunnar
* | Using qreal more consistently in code (prevent misuse of double)Aleksandar Sasha Babic2009-11-061-9/+9
|/ | | | | | | | | | | | | | | | | | | | | | | | | We want to force use of qreal where possible. This can lead to better performance on platforms where qreal -> float (i.e. ARM). To achieve this we: 1. changed from 'double' to 'qreal', where justified 2. using qreal() to intialize constants, where justified 3. adding helper functions that are overloaded for qreal like qAtan2(), qAcos(), qFabs() ... 4. defining QT_USE_MATH_H_FLOATS for Symbian platform In addtion we used opportunity to improve code with some small things 5. converting divisions to multiplications (i.e. '/ 2.0' -> '* qreal(0.5)') 6. defining new constants (i.e. 'Q_PI / 180.0' -> 'Q_PI180') 7. declaring variables as 'const', where justified Reviewed-by: Andreas Aardal Hanssen Reviewed-by: Gunnar Sletta Reviewed-by: Jan-Arve Reviewed-by: Kim Motoyoshi Kalland Reviewed-by: Alessandro Portale Reviewed-by: Janne Koskinen
* Fixed a crash in tst_qpainter on SPARC w/gcc.Trond Kjernåsen2009-10-161-2/+2
| | | | | | | | This test works with the native Sun compiler for some reason, and the problem is an unaligned read of 16 bits, which is a problem on several other architectures. Reviewed-by: Kim
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Merge branch '4.5' into 4.6Thiago Macieira2009-08-311-13/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp demos/boxes/vector.h demos/embedded/fluidlauncher/pictureflow.cpp demos/embedded/fluidlauncher/pictureflow.h doc/src/desktop-integration.qdoc doc/src/distributingqt.qdoc doc/src/examples-overview.qdoc doc/src/examples.qdoc doc/src/frameworks-technologies/dbus-adaptors.qdoc doc/src/geometry.qdoc doc/src/groups.qdoc doc/src/objecttrees.qdoc doc/src/platform-notes.qdoc doc/src/plugins-howto.qdoc doc/src/qt3support.qdoc doc/src/qtdbus.qdoc doc/src/qtdesigner.qdoc doc/src/qtgui.qdoc doc/src/qtmain.qdoc doc/src/qtopengl.qdoc doc/src/qtsvg.qdoc doc/src/qtuiloader.qdoc doc/src/qundo.qdoc doc/src/richtext.qdoc doc/src/topics.qdoc src/corelib/tools/qdumper.cpp src/gui/embedded/qkbdpc101_qws.cpp src/gui/embedded/qkbdsl5000_qws.cpp src/gui/embedded/qkbdusb_qws.cpp src/gui/embedded/qkbdvr41xx_qws.cpp src/gui/embedded/qkbdyopy_qws.cpp src/gui/embedded/qmousebus_qws.cpp src/gui/embedded/qmousevr41xx_qws.cpp src/gui/embedded/qmouseyopy_qws.cpp src/gui/painting/qpaintengine_d3d.cpp src/gui/painting/qwindowsurface_d3d.cpp src/opengl/gl2paintengineex/glgc_shader_source.h src/opengl/gl2paintengineex/qglpexshadermanager.cpp src/opengl/gl2paintengineex/qglpexshadermanager_p.h src/opengl/gl2paintengineex/qglshader.cpp src/opengl/gl2paintengineex/qglshader_p.h src/opengl/util/fragmentprograms_p.h src/plugins/kbddrivers/linuxis/linuxiskbdhandler.cpp src/plugins/mousedrivers/linuxis/linuxismousehandler.cpp src/script/parser/qscript.g src/script/qscriptarray_p.h src/script/qscriptasm_p.h src/script/qscriptbuffer_p.h src/script/qscriptclass.cpp src/script/qscriptclassdata_p.h src/script/qscriptcompiler.cpp src/script/qscriptcompiler_p.h src/script/qscriptcontext.cpp src/script/qscriptcontext_p.cpp src/script/qscriptcontext_p.h src/script/qscriptcontextfwd_p.h src/script/qscriptecmaarray.cpp src/script/qscriptecmaarray_p.h src/script/qscriptecmaboolean.cpp src/script/qscriptecmacore.cpp src/script/qscriptecmadate.cpp src/script/qscriptecmadate_p.h src/script/qscriptecmaerror.cpp src/script/qscriptecmaerror_p.h src/script/qscriptecmafunction.cpp src/script/qscriptecmafunction_p.h src/script/qscriptecmaglobal.cpp src/script/qscriptecmaglobal_p.h src/script/qscriptecmamath.cpp src/script/qscriptecmamath_p.h src/script/qscriptecmanumber.cpp src/script/qscriptecmanumber_p.h src/script/qscriptecmaobject.cpp src/script/qscriptecmaobject_p.h src/script/qscriptecmaregexp.cpp src/script/qscriptecmaregexp_p.h src/script/qscriptecmastring.cpp src/script/qscriptecmastring_p.h src/script/qscriptengine.cpp src/script/qscriptengine_p.cpp src/script/qscriptengine_p.h src/script/qscriptenginefwd_p.h src/script/qscriptextenumeration.cpp src/script/qscriptextenumeration_p.h src/script/qscriptextqobject.cpp src/script/qscriptextqobject_p.h src/script/qscriptextvariant.cpp src/script/qscriptfunction.cpp src/script/qscriptfunction_p.h src/script/qscriptgc_p.h src/script/qscriptmember_p.h src/script/qscriptobject_p.h src/script/qscriptprettypretty.cpp src/script/qscriptprettypretty_p.h src/script/qscriptvalue.cpp src/script/qscriptvalueimpl.cpp src/script/qscriptvalueimpl_p.h src/script/qscriptvalueimplfwd_p.h src/script/qscriptvalueiteratorimpl.cpp src/script/qscriptxmlgenerator.cpp src/script/qscriptxmlgenerator_p.h tests/auto/linguist/lupdate/testdata/recursivescan/project.ui tests/auto/linguist/lupdate/testdata/recursivescan/sub/finddialog.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp tools/linguist/shared/cpp.cpp
| * 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
* | Fix blend function crash on AVR32Paul Olav Tvete2009-08-211-2/+2
| | | | | | | | | | | | | | AVR32 doesn't support non-aligned access. (Contributed patch) Task-number: 255495 Reviewed-by: Paul
* | Implemented faster image transformation in the raster engine.Kim Motoyoshi Kalland2009-08-171-0/+633
| | | | | | | | | | Task-number: 245650 Reviewed-by: Gunnar
* | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Merge branch '4.5'Thiago Macieira2009-08-031-4/+4
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qsharedpointer.cpp src/corelib/tools/qsharedpointer_impl.h src/gui/dialogs/qcolordialog.cpp src/gui/painting/qwindowsurface_raster.cpp src/network/access/qnetworkaccessmanager.cpp tests/auto/qsharedpointer/externaltests.cpp
| * Fixed drawImage() so that it doesn't sample outside the source image.Kim Motoyoshi Kalland2009-07-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In qt_scale_image_16bit() and qt_scale_image_32bit(), when a sample point was located on the border between two pixels in the source image, the sample point was rounded up instead of down. If a sample point was exactly on the bottom or right edge of the source image, the function would therefore sample a pixel outside the image. Because of how the target rectangle is rounded, a sample point will never be exactly on the top or left edge of the source image, so we will not get a similar problem there. I extended the lance test pixmap_scaling.qps. Task-number: 258533 Reviewed-by: Samuel
* | Merge branch '4.5'Marius Storm-Olsen2009-06-301-3/+3
|\|
| * Fix crash/artifacts on SuperHTom Cooksey2009-06-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | Add SuperH to the ever growing list of architectures which can't correctly dereference a short* which is not 16-bit aligned. Turning this into a white-list rather than a black list might make sense at some point, but as QT_ARCH_I386 isn't defined on windows, the white list looks even uglier at the moment. :-) Task-number: 257077 Reviewed-by: TrustMe
* | Merge license header changes from 4.5Volker Hilsheimer2009-06-161-2/+2
|\|
| * Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | | | | | Reviewed-by: Trust Me
* | Further optimized fast scaling of ARGB8565 images onto RGB16 images.Michael Brasser2009-05-291-3/+3
| | | | | | | | | | | | This improves performance on embedded. Reviewed-by: Samuel
* | Optimized fast scaling of ARGB8565 images onto RGB16 images.Samuel Rødal2009-05-271-1/+58
| | | | | | | | | | | | | | There was an optimized blend function for this case but not an optimized scale function. Performance increase seems to be in the order of 5x. Reviewed-by: Trond
* | Merge branch '4.5' of git@scm.dev.troll.no:qt/qtSimon Hausmann2009-05-071-10/+2
|\| | | | | | | | | | | Conflicts: src/gui/kernel/qcocoaview_mac_p.h src/gui/widgets/qmainwindow.cpp
| * Fixed some inconsistencies for image drawing on non-integer coords.Samuel Rødal2009-05-061-10/+2
| | | | | | | | | | | | | | | | Don't use aliased coordinate delta for image drawing. Related to change fde7475bcf9c10522a8170e6eb8fb9a8fadc21cd. Task-number: 251561 Reviewed-by: Trond
* | Improved performance for pixmaps containing 0-alpha pixels.Samuel Rødal2009-04-291-3/+2
|/ | | | | | | Areas of 0-alpha are quite common in ARGB images/pixmaps, so special case them in the argb32 on argb32 image blend function. Reviewed-by: Trond
* Make the 32-bit ARGBPM on 16-bit RGB blend function fasterGunnar Sletta2009-04-201-101/+33
| | | | | | | The "optimized" version of this function was actually slower by quite a bit, so revert it to the old "trivial" code. Reviewed-by: Samuel
* Fix ARGB24PM->RGB16 for i386 GCCGunnar Sletta2009-04-201-20/+1
| | | | | | | | | | There was special code for gcc to run super-fast, but it was buggy and didn't blend properly. Kill this code for the benefit of the normal blend function. The performance on an Intel Quad Core 2 was not too different from the bytemul approach. Task-number: 246009 Reviewed-by: Trond
* Fix ARGB8565 onto RGB16 image blending on windowsGunnar Sletta2009-04-201-3/+3
| | | | | | | The rounding was just wrong... Task-number: 246009 Reviewed-by: Trond
* Rendering error (one pixel offset) when drawing ARGB32_PM on RGB16.Samuel Rødal2009-03-241-0/+2
| | | | | | | Missing increments in the blend function's tail code. Task-number: 247492 Reviewed-by: Paul
* Long live Qt 4.5!Lars Knoll2009-03-231-0/+1419