summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qdrawhelper.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fix default implementations of raster opsEskil Abrahamsen Blomfeldt2014-09-201-2/+0
| | | | | | | | | | | | | | | | | | In the list of default implementations, the raster ops added in ae0ddb8c729c105a5b4f32a4f6765af8fe546333 were all offset by one composition mode because of a duplicate entry in the array. The effect would be, e.g. that using the NotDestination operator would resolve to the Set operator instead. Most users will probably not have experienced this since any of the asm-based functions will be preferred. [ChangeLog][Painting] Fixed some very rare cases of mismatched raster modes in QPainter. Change-Id: Ia242b54c78acbe1c89d9b4ecd10936564ec134b2 Task-number: QTBUG-41413 Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Remove the last remnants of iWMMXt in QtThiago Macieira2014-08-051-8/+0
| | | | | | | | This code hasn't been tested for at least 4 years. It's not maintained and probably doesn't work. Change-Id: I4b9a5179e34111b400914f91caa6b741b69771bb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QImage support for RGB30 formatsAllan Sandfeld Jensen2014-07-041-8/+139
| | | | | | | | | | | | | | Adds basic support for 10-bit per color channel formats to QImage and the XCB plugin. This will make it possible to paint to and from these formats, but only at 8-bit per color channel accuracy. This also fixes Qt5 applications on X11 with native 30bit depth. [ChangeLog][QtGui][QImage] Added support for 10-bit per color channel image formats. Task-number: QTBUG-25998 Change-Id: I93ccd3c74bfbb0bd94b352476e5fe58a94119e1f Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-011-65/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/network/socket/qnativesocketengine_winrt.cpp src/plugins/platforms/android/androidjniaccessibility.cpp src/plugins/platforms/windows/qwindowswindow.cpp Manually adjusted: mkspecs/qnx-armle-v7-qcc/qplatformdefs.h to include 9ce697f2d54be6d94381c72af28dda79cbc027d4 Thanks goes to Sergio for the qnx mkspecs adjustments. Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
| * Fix -Werror compilation on big-endianThiago Macieira2014-06-251-0/+2
| | | | | | | | | | | | | | | | | | | | qt_alphamapblit_rgba8888 is only used on little-endian systems, where qAlpha() returns the correct value. qdrawhelper.cpp:6256:13: error: 'void qt_alphamapblit_rgba8888(QRasterBuffer*, int, int, quint32, const uchar*, int, int, int, const QClipData*)' defined but not used [-Werror=unused-function] Change-Id: Ibba6dd6914138f7ae5d53a8e354597f5fff65433 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
| * Remove unfinished NEON version of vectorized rotate samplingAllan Sandfeld Jensen2014-06-061-65/+0
| | | | | | | | | | | | | | | | | | | | A vectorized codepath for rotating transforms were added in 5.3.0, but was only properly tested for SSE2. The NEON version remains unfinished. Since it was never working, this patch reverts the NEON version. Task-number: QTBUG-39445 Change-Id: Ifbce0e03781d217ad976c6b18ac88381055cba66 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | MIPS: Support recognition of the DSP ASE at run-timeAdrian Perez de Castro2014-06-271-3/+13
|/ | | | | | | | | | | | | Add detection of MIPS DSPr2 at run-time in qsimd.cpp. This makes it possible to have generic Qt builds for MIPS that can enable the fast code paths for processors with the DSP ASE at run-time. Also, this makes it possible to manually disable them by setting the environment variable "QT_NO_CPU_FEATURE=dspr2". Last, but not least, functions requiring DSPr2 are not enabled when running in CPUs with version-1 DSP. Change-Id: Ia5a01d84119553c22ab83386c74a6cb8ba5fee53 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Vectorize bilinear rotating transformsAllan Sandfeld Jensen2014-05-051-0/+157
| | | | | | | | | | | | This patch reuses the code and pattern used to vectorize scaling, to also vectorize rotating transforms in fetchTransformedBilinearARGB32PM. This provides significant improvements in QtWebKit on benchmarks using rotating transforms. Change-Id: If250e0f5dae1ff0f954301f96cc8970a99ae3e9d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Avoid out of bounds memory reads when scaling imagesLars Knoll2014-03-281-1/+1
| | | | | | | | | | | | | | | | 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. Task-number: QTBUG-35927 Change-Id: If44b2235a479224660d508a0504fec40d724763a Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-03-171-34/+49
|\ | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qdrawhelper.cpp src/gui/painting/qdrawhelper_avx.cpp src/gui/painting/qdrawhelper_x86_p.h Change-Id: I09352d05119f6fd000319074a2705b38361b2c90
| * Fix drawCachedGlyphs on RGBA8888Allan Sandfeld Jensen2014-02-261-37/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | drawCachedGlyphs draws with the wrong color on RGBA8888. The issue is that the draw routines bitmapblit_quint32 and alphamapblit_quint32 while safe to use on rgba formats, needs to have the input color converted. This patch adds small wrapper functions for bitmapblit and alphamapblit that converts the formats. Two tests are extended to ensure we have test coverage. Change-Id: I5f99f3795eba46a69d4df5b167e6099024e9a060 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Add optimize_full qmake config optionAllan Sandfeld Jensen2014-03-061-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new config option to qmake to enable full optimization where it makes sense. This currently is supported on all gcc like compilers by exchanging -O2 for -O3. In qtbase it is used to enable full optimizations on qtcore and qtgui and in a later patch can be used to replace similar existing logic in QtWebKit's WTF and JavaScriptCore modules. This fixes a performance regression from gcc 4.7 to 4.8 in the software renderer. An aliasing error in qregion.cpp which was exposed by more aggresive optimization has been solved as well. Change-Id: Ic2c6c41b79cb3846212b40e7bcc11ff492beb27f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Optimize generic bilinear interpolation using SSE2Allan Sandfeld Jensen2014-02-171-33/+45
| | | | | | | | | | | | | | | | | | | | | | The drawing code currently only optimizes the bilinear interpolation under specific conditions that allows the optimizations used there. The patch adds a SSE2 version of the fallback 4 pixel interpolation. Change-Id: I4e8a2ba6cb44647105a9b24e38b3ab755a435050 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-121-7/+7
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qimage.cpp src/gui/text/qtextengine.cpp src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/printsupport/kernel/qprintengine_win.cpp Change-Id: I09ce991a57f39bc7b1ad6978d0e0d858df0cd444
| * Fix drawing vertical gradients in RGBA8888 formatsAllan Sandfeld Jensen2014-02-101-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | The RGBA8888 formats was incorrectly using the qt_gradient_quint32 which is argb specific. This caused vertical gradients but only vertical gradients to be drawn incorrectly. This changes the RGBA8888 formats formats to use the generic gradient method and renames qt_gradient_quint32 to qt_gradient_argb32 to indicate its limitation. Change-Id: Ia1cd48ca7f4f78b64f31d6263e81cd8ac3b0954e Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Export optimized premultiply and unpremultiply methodsAllan Sandfeld Jensen2014-02-101-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Optimize drawing to and from generic formatsAllan Sandfeld Jensen2014-01-311-102/+359
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When drawing to and from the less common formats most of the cpu time is spend in conversion. The conversion method is rather slow due to using variable shifts and masks that the compiler does not have a chance to optimize. This patch changes the conversion methods to being templates fed by constexpr methods. This allows the compiler to fully optimize the methods yielding 2x->5x speedups. The reliance on constexpr however means the optimized methods are only used under C++11. Change-Id: I2ec77c4c1c03f12ee463a694a2b59db0f0b52db1 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Fixed assert in blend_transformed_tiled_argbOliver Wolff2014-01-301-2/+2
| | | | | | | | | | | | | | | | | | | | px16 and py16 might be <0 in the first iteration of the loop. In order to avoid accessing an invalid index the values have to be corrected before px and py are accessed. Change-Id: I790faeacc2b77ae8af52bf5e69a2d801c9fe973d Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-201-7/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qstring.cpp src/gui/image/image.pri src/gui/image/qimage.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/eglfs/qeglfshooks_stub.cpp tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp Change-Id: I3b9ba029c8f2263b011f204fdf68c3231c6d4ce5
| * Fix unused-function warning in qdrawhelper.cppThiago Macieira2014-01-161-6/+0
| | | | | | | | | | | | | | | | | | | | | | storePixel<QPixelLayout::BPP32> would have been called by storePixels<QPixelLayout::BPP32> but that function has an overload that uses memcpy instead. So it's really unused. Found by Clang 3.4. Change-Id: I661804e273486d3469221fdd362a24cd77cfb8a7 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * MIPS DSP build system fix and additional optimizations.lpapuga2014-01-141-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed MIPS DSP portion of the mkspecs/features/simd.prf file in order to fix the corrupted build system for MIPS platforms. List of the additionally optimized functions from file src/gui/painting/qdrawhelper.cpp: - qt_blend_rgb16_on_rgb16 - qt_fetchUntransformed_888 - qt_fetchUntransformed_444 - qt_fetchUntransformed_argb8565 from file src/gui/image/qimage.cpp: - convert_ARGB_to_ARGB_PM_inplace from file src/corelib/qstring.cpp: - ucstrncmp - toLatin1_helper - fromLatin1_helper Change-Id: I5c47a69784917eee29a8dbd2718828a390b27c93 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make conversion of semi-transparency to opaque formats consistentAllan Sandfeld Jensen2014-01-201-32/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the non-standard opaque formats all perform inverse premultiply on semi transparent pixels when saving. This is only performed on RGB16 and RGB32 when explicitly converting to the formats, but not when drawing. This patch changes the conversion to be consistent across the board so less common formats are treated the same as the most common ones. This also makes drawing and converting to the these formats much faster. Task-number: QTBUG-36143 Change-Id: I877ddb1c1dbb4d2dd9b4b9192525e50375a1ae60 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Optimize blend_transformed_tiled_argb().Sami Liedes2014-01-181-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | Profiling indicates that this function is one of two hot spots causing a noticeable latency when changing KDE virtual desktops. Instead of computing two modulos per pixel in the inner loop, it is possible to compute the modulos outside the loop and compute a modulo sum in the inner loop for a reasonable speedup. Change-Id: Ic4217b7686e031d7673b3e10aa977dae263096dc Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | iOS: Don't try to use NEON drawhelpers, we don't build themTor Arne Vestbø2014-01-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | On iOS we don't build the NEON drawhelpers as they are implemented using GAS syntax assembly, so prevent drawhelpers.cpp from trying to use them. Follow-up to 01c59ac857927043e49d4725062faea715ed49a3. Change-Id: I3e3dc9b0e1d780db3184413d2ff3010ac8dcd37b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Optimize INV_PREMULAllan Sandfeld Jensen2014-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our inverse premultiply is rather unoptimized. It's major weakness is using three divide operation which are the slowest integer operations. This patch reduces the three divisions to just one but using an approximation that is accurate for all uchar values. The patch also adds a general short-cut for alpha==255. Together these improvements makes it 2 to 16 times faster depending on how many 0 and 255 alpha values are encountered. Change-Id: I96d7098a1bc320793b0d0526637acd1fdb5a43eb Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Make qt_memfill{16,32} unconditionalThiago Macieira2014-01-161-30/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | These two functions used to cause a runtime detection of the CPU features in order to improve their performance. Since the last two commits, there's no runtime detection of either SSE2 or Neon support, so there's no point in attempting runtime detection. Task-number: QTBUG-30440 Change-Id: I54fe92787c983003c2cc867ee636daec30063033 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Remove runtime detection of Neon on ARM CPUsThiago Macieira2014-01-161-29/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | Now the only way to enable Neon support is to change the mkspec. [ChangeLog][Important Behavior Changes] Qt no longer checks for support for the Neon FPU on ARM platforms at runtime. Code optimized for Neon must be enabled unconditionally at compile time by ensuring the compiler supports Neon. You may need to edit your mkspec for that. Task-number: QTBUG-30440 Change-Id: I4df9b2bf3cd022f8ed70f02f16878cb2cb3fe6fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Remove runtime detection of SSE2Thiago Macieira2014-01-161-63/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Remove the files building AVX codeThiago Macieira2013-12-101-70/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature was never completely implemented. Sure, it's nice to build the SSE2 + SSSE3 code with the VEX prefix, which results in better code. But the leap isn't that big anyway. This is the first step to removing the runtime detection for the drawhelpers. They create timebombs when we use inline functions. Task-number: QTBUG-30440 Change-Id: Ic53b2cf5261106a1c940d4a36eb6111b7d998be1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Make drawing to and from RGBA8888 images fasterAllan Sandfeld Jensen2013-11-131-6/+38
|/ | | | | | | | | | | After profiling drawing with RGBA8888 images most of the time appears to be spend in converting to and from ARGB32PM. This patch adds four small converters that are 3-4 times faster than the generic converter. Change-Id: I3c7498756f440ca3ea9c1417b26dd8e1953b9d06 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix fillRect on RGBA8888 imagesAllan Sandfeld Jensen2013-07-291-12/+28
| | | | | | | | | The fill color was not correctly converted before being filled into RGBA8888 images. This patch adds a function with convertion and adds tests for it to tst_qpainter. Change-Id: If8b0e6db38b2794a60301842e25f377eb7216796 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Support RGBA image formatAllan Sandfeld Jensen2013-07-231-7/+163
| | | | | | | | | 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>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-201-8/+8
|\ | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp tools/configure/configureapp.cpp Change-Id: I3092bd3276af14304b7ab3ae1e1cc05d11cdede0
| * Remove use of 'register' from Qt.Stephen Kelly2013-06-171-8/+8
| | | | | | | | | | | | | | | | | | | | It is deprecated and clang is starting to warn about it. Patch mostly generated by clang itself, with some careful grep and sed for the platform-specific parts. Change-Id: I8058e6db0f1b41b33a9e8f17a712739159982450 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-05-231-0/+1
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qdatastream.cpp src/corelib/io/qdatastream.h src/corelib/json/qjsonwriter.cpp src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbkeyboard.cpp Change-Id: I46fef1455f5a9f2ce1ec394a3c65881093c51b62
| * Fix warning about unused variable when not using any SIMD drawhelpersTor Arne Vestbø2013-05-101-0/+1
| | | | | | | | | | Change-Id: Ic87be3b6c7afbde869bd011a3a585b0fe7dbf15d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Merge branch 'stable' into devSergio Ahumada2013-04-101-5/+10
|\| | | | | | | Change-Id: Icff019d74ae04c628a80f66aa478e4db40fae464
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-04-031-5/+10
| |\ | | | | | | | | | Change-Id: Icedabda08961326a0a447ec71f1b0f0f5df075eb
| | * Fix gcc OOM error when compiling in release modeKai Koehne2013-04-021-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | O3 leads to gcc bailing out with OOM on e.g. MinGW with gcc 4.7.3 onwards. Task-number: QTBUG-29099 Change-Id: I3ce49794fa4857e756d2994454d4144cfb44ce58 Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | iOS: Enable NEON optimizations, except for the pixman draw-helpersTor Arne Vestbø2013-04-041-1/+1
|/ / | | | | | | | | | | | | | | | | | | We used to disable NEON completely, as the iOS toolchain does not handle the GAS syntax of the pixman draw-helpers. But we can limit the disabling to just the draw-helpers, which means we get NEON optimization of eg. QImage and QString. Change-Id: If350b06ce521cca8b24468be5a168ff21e9e7124 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-221-1/+1
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Mark several template functions as static.Thiago Macieira2013-01-021-1/+1
|/ | | | | | | | There is no reason those function shouldn't be static. This produces no change in code, except that the functions may be better optimised. Change-Id: Ia60b81d4e29a36190a453e8c7c8102c8f547e1a9 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Implement the missing raster operations that were in Qt 3Andy Shaw2012-09-271-2/+115
| | | | | | | | | Although not widely used, the raster operations from Qt 3 were useful and some of them were already implemented, this brings the rest of them back for those who need them. Change-Id: Id538611eaaba9be3d39bf2dd33b6c532f5d4aba8 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Move the fetch and store pixel functions to qdrawhelper.cppThiago Macieira2012-09-241-0/+111
| | | | | | | | | | | | | These functions have begun showing in the tst_symbols unit test as "symbol does not start with q". Since they're never called directly, they're never inlined. Since they were inline, the compiler was probably deciding to not export them. Something changed and it could be anything (new compiler version, new options, etc.). So mark them static. Change-Id: I838dfc94edd7f09c202743bff0daf9d20c10c3a6 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>
* Made QImage::fill(uint pixel) for RGB888 accept QRgb values.Samuel Rødal2012-08-291-1/+1
| | | | | | | | | | | | Previously QImage::fill() for Format_RGB888 expected a BGR value instead of the RGB order defined by QRgb, making it counter intuitive to use related to the 32-bit formats. Fixed the QPixelLayout data for RGB888 and changed the byte order of quint24 based on what the optimized image conversion routines expect. Change-Id: I72926debbc6f5b5cb10b8aa0b2a2a916a04db946 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* MIPS DSP composition functions optimizations.Damir Tatalovic2012-07-031-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | List of optimized routines: - comp_func_DestinationOver - comp_func_SourceIn - comp_func_DestinationIn - comp_func_DestinationOut - comp_func_SourceAtop - comp_func_DestinationAtop - comp_func_XOR - comp_func_SourceOut - comp_func_solid_SourceOver - comp_func_solid_DestinationOver - comp_func_solid_SourceIn - comp_func_solid_DestinationIn - comp_func_solid_SourceAtop - comp_func_solid_DestinationAtop - copm_func_solid_XOR - comp_func_solid_SourceOut Previously optimized routines qt_blend_argb32_on_argb32_mips_dsp and comp_func_Source_mips_dsp are redesigned and rewritten. Overall improvement by running tst_bench_blendbench benchmark app from tests/benchmarks/gui/image/blendbench/ is 27%. Change-Id: I6ab09b17cac10f4aded59787074ab4c89e72ccac Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make the CPU detection much more efficient in user codeThiago Macieira2012-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | First, check that the option in question hasn't been already enabled by the compiler, via compiler switches. If it has been, then we don't need to verify anything, and we can assume that it's safe to use such instructions. For example, on an x86-64 build, qCpuHasFeature(SSE2) is always a constant true. If the compile-time check fails, then we proceed to try and detect the processor features at runtime. But instead of insisting on a call to qDetectCPUFeatures, allow the code using the detection to read from a variable and simply test it for values. Only if the variable isn't initialised should it make a function call. The Q_ASSUME allows this code to be very efficient even with multiple uses of qCpuHasFeature. Change the uninitialised value from -1 to 0 so that simpler instructions can be used to check for non-initialisation. The qDetectCPUFeatures function is renamed to qDetectCpuFeatures to match the Qt coding style and also to catch uses this code that need to be adapted. Change-Id: I24ca5a6ad21075e2e249e1a4f8f5057b8f68ce7c Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>