summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qimage_conversions.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Allow QImage with more than 2GByte of image dataAllan Sandfeld Jensen2017-07-081-14/+14
| | | | | | | | | | | | Changes internal data-size and pointer calculations to qssize_t. Adds new sizeInBytes() accessor to read byte size, and marks the old one deprecated. Task-number: QTBUG-50912 Change-Id: Idf0c2010542b0ec1c9abef8afd02d6db07f43e6d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move endian integers to qendian_p.hAllan Sandfeld Jensen2017-06-211-4/+5
| | | | | | | | | | The endian integers have more use than just in QJson, and is already used separately by QtDeclarative. This patch moves q_littleendian out of qjson_p.h and matches it with a corresponding q_bigendian, and puts it to use in simplifying endian handling in the ico image handler. Change-Id: I975bb701a089256db8ced3cb53b4bd62cdfb02dd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Optimize conversion from unpremultiplied to opaque formatsAllan Sandfeld Jensen2017-05-221-4/+23
| | | | | | | | | Save unnecessary premultiply and unpremultiplication when converting from an unpremultiplied format like ARGB32 to any opaque format like RGB32 or RGB16. Change-Id: I73f58200ff5c62fb07910e6f2b1c29b7e254d327 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* qimage_conversions.cpp: keep shared copies of gray and alpha color tablesMarc Mutz2017-02-131-19/+20
| | | | | | | | | | Since QVector is implicitly shared, don't re-generate the same two color tables all over again, but create them once and keep them around in a Q_GLOBAL_STATIC. Change-Id: I9a8d32021d8cc327264f2818a23beaae67fe3ee8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-081-10/+8
|\ | | | | | | | | | | | | | | Conflicts: configure.json mkspecs/win32-icc/qmake.conf Change-Id: Ibf40546b024d644c7d9ed490bee15b82597f4d3f
| * Fix MIPS DSP configurationAllan Sandfeld Jensen2017-01-271-10/+8
| | | | | | | | | | | | | | | | | | The patch fixes a number of bugs in code, and removes dead logic clarifying that MIPS DSP, like ARM NEON, has no runtime detecton. Change-Id: If2f4eea68da5b2eaa80b8e9c8258206d8c1b7173 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Replace QDrawHelperGammaTables with QColorProfileAllan Sandfeld Jensen2016-11-241-11/+6
|/ | | | | | | | | | | | Turns the two set of tables in QDrawHelperGammaTables into two QColorProfile classes that use similar structures and can be reused for other gamma correction. At the same time clean-up and improve the comma-correct blending code to use the new profiles and QRgba64 precision. Change-Id: I302bd87a5c836e1010fff6d633eeb56fd4ae2ff0 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-011-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/win/msvc_version.cpp configure.pri mkspecs/macx-ios-clang/features/default_post.prf mkspecs/macx-ios-clang/features/resolve_config.prf mkspecs/features/uikit/default_post.prf mkspecs/features/uikit/resolve_config.prf src/corelib/io/qsettings_mac.cpp src/corelib/json/qjsondocument.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.h src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/ios.pro src/plugins/platforms/ios/kernel.pro src/plugins/platforms/ios/qiosintegration.h src/plugins/platforms/minimalegl/qminimaleglintegration.cpp tests/auto/gui/painting/qpainter/tst_qpainter.cpp tools/configure/environment.cpp Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-221-2/+2
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/eglfs/qeglfshooks.cpp Change-Id: I483f0dbd876943b184803f0fe65a0c686ad75db2
| | * QImage: cache colortable sizeMarc Mutz2016-10-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity threw an error that in the else branch, the expression colorTableRGB16[tableSize - 1] accesses uninit'ed data. The working theory is that it fails to perform the implication isEmpty() → size() == 0 This patch, therefore, checks for size() == 0 instead of isEmpty(), which is hardly less readable and might help Coverity understand the code better. Then again, Coverity might not understand that the tableSize can never be negative. If that's the case, another patch will be needed, but let's try the simpler solution first. Coverity-Id: 11420 Change-Id: Ibfe2a798c55af95c8001fa909aa94a6c5bc7c647 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Save memcpy when converting to 32bit formatsAllan Sandfeld Jensen2016-09-201-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | If the destination format is 32bit, we can convert directly in the destination instead of in a buffer. Change-Id: I2b4407da77b863deec7869c341e1a8d464b46600 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-211-10/+9
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qsysinfo.h src/corelib/kernel/qcoreapplication_win.cpp src/gui/text/qdistancefield.cpp src/gui/text/qdistancefield_p.h src/plugins/platforms/windows/qwindowsglcontext.cpp src/plugins/platforms/windows/qwindowsglcontext.h Change-Id: Ib3500acc2b28553bde06758cd9a2e19eb7fe2978
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-201-10/+9
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And blacklisted a few tests in tst_QUdpSocket. Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtNative.java src/corelib/global/qglobal.cpp src/corelib/global/qsystemdetection.h src/corelib/io/qfileselector.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp tests/auto/network/socket/qudpsocket/BLACKLIST Task-number: QTBUG-54205 Change-Id: I11dd1c90186eb1b847d45be87a26041f61d89ef6
| | * Finally fix crash in inplace-modified data-constructed imagesEirik Aavitsland2016-06-151-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid all inplace modification of images using external data buffers. Since the QImage methods are documented to create a (modified) copy, there is afterwards no API requirement on the lifetime of the data buffer. This patch supersedes 509bc7e59c69937900cf258e64889a6e88edbcf0 Task-number: QTBUG-53721 Change-Id: I3ccc01619eb61d8630104449394e0b76df0af695 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-121-4/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config_help.txt configure src/corelib/io/qprocess_wince.cpp src/plugins/platforms/windows/qwindowstheme.cpp src/plugins/platforms/xcb/qxcbbackingstore.cpp tests/auto/corelib/tools/qtimezone/BLACKLIST tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: I26644d1cb3b78412c8ff285e2a55bea1bd641c01
| * | Optimize convert_Indexed8_to_X32Allan Sandfeld Jensen2016-04-271-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | Basic optimization of conversion from indexed8. Task-number: QTBUG-35747 Change-Id: Ic9d32789769eadb05fbecfebf2d2f2c87d66610b Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Implement ordered dithering for image format conversionsAllan Sandfeld Jensen2016-04-121-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QImage::convertToFormat was ignoring its conversion flag argument, only performing dithering when converting to indexed formats. This patch updates the documentation and implements ordered dithering for other conversions. Change-Id: I807353d61669694185b7e595ef262d80d9fbb3f1 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Cleanup conversion parametersAllan Sandfeld Jensen2016-04-111-7/+8
|/ / | | | | | | | | | | | | | | Removes the now unused QPixelLayout parameter, simplifies the colorTable passing and prepares for adding dithering. Change-Id: Iaf7698b248b857804d8921bf118e7cfabbabff87 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* / 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>
* Use Q_CONSTRUCTOR_FUNCTION instead of doing the same manuallyAllan Sandfeld Jensen2015-12-171-10/+1
| | | | | | | | Use the macro we have that does exactly what we want without the boiler plate code. Change-Id: I25c67a71f83f91f50128c8a54033ee53ad28e88a Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Initialize function tables without QGuiApplicationAllan Sandfeld Jensen2015-12-071-1/+12
| | | | | | | | | | | | | QImage can be used without QGuiApplication, but wihout QGuiApplication the accelerated methods would not be used. This patch changes the initialization of the QtGui function tables to happen in static object constructors on QtGui load, instead of in the QGuiApplication init. Change-Id: Ib58982fbc50fd79122352d021d93a3c99aca5043 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Add AArch64 ASM to qimage_neon.cppAllan Sandfeld Jensen2015-11-261-1/+1
| | | | | | | | | | | Since AArch64 NEON assembly is different from Arm32 NEON we need to write a separate version. Assembly is used over intrinsics as the intrinsics have trouble efficiently using the vstX and vldX instructions. Change-Id: I5b67fc87acb2433b503e658099b742d57a9cff18 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Fix inplaceRgbConversion test on non-x86Allan Sandfeld Jensen2015-11-261-3/+29
| | | | | | | | | | | | We test that inline conversion between same image depths always succeed inline, but that requires that any direct conversions exists both in non-inline and inline versions. This patch adds a non-sse2 inline conversion from ARGB32 to ARGB32PM which was missing. Change-Id: I71937cd4b77fb41fe2064da937f6dcbf2a6534e6 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix compile error on big endianAllan Sandfeld Jensen2015-07-081-1/+1
| | | | | | | | | DestFormat is not defined here but should be Format_RGBX8888 Change-Id: Ie33989a6fc31650434281a6b7b0f4806524268af Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Timo Jyrinki <timo.jyrinki@canonical.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Add missing RGB32 <-> RGB30 convertionsAllan Sandfeld Jensen2015-04-301-34/+86
| | | | | | | | Completes the inplace converters so that we can rely on inplace conversions to succede as long as the image depth is the same. Change-Id: Ia1ae34b5de1bc16e87ff5403bdacfcae44a22791 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix QImage format after inplace conversionAllan Sandfeld Jensen2015-04-301-34/+92
| | | | | | | | | | | | | Some inplace conversions would not set the requested image format in the returned image, due to the same conversion being used for several destination formats. This patch ensures all inplace conversions return the right format, and adds testing infrastructure to easily test iterate over all formats so that they all can be tested. Change-Id: I68ab17a713ddb2aa8ed6aaf0a0a1ec8bbcb56090 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix two errors in RGB30 conversionsAllan Sandfeld Jensen2015-04-301-2/+2
| | | | | | | | | The one converters from RGB30 was misplaced in the method table, and the unpremultiplication from A2RGB30 to RGB30 had an underflow mistake when alpha was 2. Change-Id: I92c11ede28611a3dbdce72aca1898845c120c209 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Revert "Remove separate SSE4 unpremultiply function"Allan Sandfeld Jensen2015-04-231-3/+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/+3
| | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-311-0/+8
|\ | | | | | | | | | | | | | | | | Conflicts: mkspecs/android-g++/qmake.conf qmake/generators/unix/unixmake2.cpp src/gui/image/qimage_conversions.cpp Change-Id: Ib76264b8c2d29a0228438ec02bd97d4b97545be0
| * Fix another crash when converting format of buffer-created QImageEirik Aavitsland2015-03-041-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This continues 68762151dbf45fbb44e140ac2ad13dbe8d357352 When doing format conversion, the optimized inplace codepath did not check if the image data was external, i.e. if the QImage had been created by the constructor taking an existing external buffer. The previous commit fixed the readonly case. But in the case of the QImage constructor taking non-const uchar*, data will be read-write, but still external. This would of course crash if the converter tries to realloc it. Task-number: QTBUG-44610 Change-Id: I94d275d464e8af221682b538fc3e4897a59c061e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | QtGui: Fix const correctness in old style castsThiago Macieira2015-03-121-6/+6
| | | | | | | | | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c946844bc31eb8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Add AVX2 autovectorized versions of premultiplyAllan Sandfeld Jensen2015-03-101-25/+17
| | | | | | | | | | | | | | | | | | | | | | | | Following up on using GCC's autovectorizing for faster SSE4.1 premultiply, this patch adds specialized autovectorized versions of premultiply for AVX2, giving another almost doubling in speed. To make the speed up for AVX2 and also SSE4_1 available to non-GCC compilers, the target-specific methods have been moved to separate files. Change-Id: I97ce05be67f4adeeb9a096eef80fd5fb662099f3 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Optimize fallback RGB888 to RGB32 conversionAllan Sandfeld Jensen2015-03-031-7/+110
| | | | | | | | | | | | | | | | | | | | | | | | Improves the conversion from RGB888 to RGB32 on platforms without SIMD versions. This includes the fallback used on non-neon ARM devices. Besides image conversion the routine is also used for decoding JPEG. On x86 this version is within 0.7x of the speed of the SSSE3 version. Change-Id: Id131994d7c3c4f879d89e80f9d6c435bb5535ed7 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Optimize generic conversion and remove now obsolete direct conversionsAllan Sandfeld Jensen2015-02-131-400/+137
| | | | | | | | | | | | | | | | | | | | There are many direct QImage conversions that doesn't need to be direct but only are because they are faster than the generic conversion. This patch optimizes the generic conversions and then removes all the direct conversions that are now no faster than the generic. Change-Id: I3dc5f44cc7f6358fd66420e9974eebaf2c7ca59c Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | 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>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-101-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro src/gui/image/qimage_conversions.cpp src/gui/opengl/qopenglextensions_p.h src/gui/text/qtextengine.cpp src/network/ssl/qsslsocket_openssl.cpp src/plugins/platforms/eglfs/qeglfshooks_stub.cpp src/plugins/platforms/eglfs/qeglfsscreen.cpp src/plugins/platforms/eglfs/qeglfswindow.cpp src/plugins/platforms/windows/qwindowsfontdatabase.cpp src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp src/plugins/platforms/windows/qwindowsnativeinterface.cpp src/plugins/platforms/windows/qwindowsscreen.cpp src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/windows/qwindowswindow.h src/plugins/platforms/xcb/qxcbdrag.h src/widgets/itemviews/qabstractitemview.cpp src/widgets/kernel/qwidget.cpp src/widgets/util/qsystemtrayicon_p.h tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp Thanks to Friedemann Kleint for resolving the qwindowsfontdatabase.cpp conflicts. Change-Id: I937232c30523d5121c195d947d92aec6f129b03e
| * Correct inplace conversion methods from RGBA8888 formatsAllan Sandfeld Jensen2015-02-031-3/+3
| | | | | | | | | | | | | | | | The methods for inplace conversion from RGBA to ARGB was misplaced by one step causing conversion to RGB16 to get an invalid method. Change-Id: I3b2b4cffe993705c48613eec7d9b7c6213f57fc2 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * qimage_conversions.cpp: Fix build on big endian systemsDmitry Shachnev2014-12-091-2/+2
| | | | | | | | | | | | Change-Id: I8149eb2deaa101daf85a957ff48c3a7140c43bbc Reviewed-by: Timo Jyrinki <timo.jyrinki@canonical.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Generate SSE4.1 versions of premultiplying methods where convenientAllan Sandfeld Jensen2015-02-041-3/+29
| | | | | | | | | | | | | | | | | | | | The autovectorized versions of premultiplying conversions are almost twice as fast with SSE4.1 as with SSE2. Therefore this patch lets compilers that can make those versions convenient without duplicating code do that and lets us use them when available. Change-Id: I699035963abe55a38b9ef8ba7b4a8c961c8dfcdd Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-241-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice.cpp src/plugins/bearer/linux_common/qofonoservice_linux.cpp src/plugins/bearer/linux_common/qofonoservice_linux_p.h src/plugins/platforms/android/qandroidplatformtheme.cpp src/tools/bootstrap/bootstrap.pro src/widgets/styles/qmacstyle_mac.mm Change-Id: Ia02aab6c4598ce74e9c30bb4666d5e2ef000f99b
| * Don't build or use qt_convert_rgb888_to_rgb32_neon on ARM64/AArch64Tor Arne Vestbø2014-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assembly code doesn't build on that architecture yet: qimage_neon.cpp:78:17: error: vector register expected "vld3.8 { d0, d1, d2 }, [%[SRC]] !\n\t" ^ <inline asm>:1:15: note: instantiated into assembly here vld3.8 { d0, d1, d2 }, [x1] ! ^ qimage_neon.cpp:78:57: error: unrecognized instruction mnemonic "vld3.8 { d0, d1, d2 }, [%[SRC]] !\n\t" ^ <inline asm>:2:2: note: instantiated into assembly here vswp d0, d2 ^ qimage_neon.cpp:79:31: error: vector register expected "vswp d0, d2\n\t" ^ <inline asm>:3:15: note: instantiated into assembly here vst4.8 { d0, d1, d2, d3 }, [x8,:64] ! ^ Change-Id: I8fe93b3940d971c0aed5973fe6e1a5e2f362df3c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-091-2/+1
|\| | | | | | | Change-Id: I05fcd8dc66d9ad0dc76bb7f5bae05c9876bfba14
| * Merge remote-tracking branch 'origin/5.3' into 5.4Gabriel de Dietrich2014-09-291-2/+1
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/socket/qnativesocketengine_unix.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I6f1aa320d5ca66cd92d601a95885aeaab0abb191
| | * Prevent a Coverity warning about a dangerous code pathGiuseppe D'Angelo2014-09-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity warns that we may access the gray array without initializing it. The array is initialized if d (the source image depth) is 8. However, when doing ordered dithering, we don't check that depth any more and just use the array. There are instead checks in place for the other dither modes; the one for ordered has been commented out before public history. So, for the love of kittens, put the check back. Change-Id: I1cc5ced8edbb626777e54e9f4e58f152c6b28ddc Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | | Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-291-20/+14
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-231-1/+3
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The isAlwaysAskOption was removed in 38621713150b663355ebeb799a5a50d8e39a3c38 so manually removed code in src/plugins/bearer/connman/qconnmanengine.cpp Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qcollator_macx.cpp src/corelib/tools/qstring.cpp src/gui/kernel/qwindow.cpp src/gui/kernel/qwindow_p.h src/gui/text/qtextengine.cpp src/platformsupport/fontdatabases/fontconfig/qfontenginemultifontconfig_p.h src/plugins/platforms/android/qandroidinputcontext.cpp src/plugins/platforms/xcb/qglxintegration.cpp src/plugins/platforms/xcb/qglxintegration.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp src/testlib/qtestlog.cpp src/widgets/dialogs/qfiledialog.cpp src/widgets/kernel/qwindowcontainer.cpp tests/auto/corelib/tools/qcollator/tst_qcollator.cpp tests/auto/gui/text/qtextscriptengine/tst_qtextscriptengine.cpp tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp Change-Id: Ic5d4187f682257a17509f6cd28d2836c6cfe2fc8
| | * Fix invalid memcpy(dst, src) calls where dst == srcAllan Sandfeld Jensen2014-08-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The convert_generic_inline method was not correctly handling the case where both the conversion methods were passthrough and the last store is therefore not needed and may trigger an invalid memcpy call. Change-Id: Ic88780f50e1ff9dedc04b8ff1ab3527dd0c8150c Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | | Add Grayscale8 and Alpha8 formats to QImage and drawingAllan Sandfeld Jensen2014-09-171-43/+294
|/ / | | | | | | | | | | | | | | | | | | | | | | Extend the QImage format with two 8-bit grayscale and alpha formats. These formats have the advantage over Indexed8 that they have simpler conversion and can be rendered to by the raster engine. [ChangeLog][QtGui][QImage] Added support grayscale and alpha 8-bit formats which can also be rendered to. Change-Id: I4343c80a92a3dda196aa38d0c3ea251b094fc274 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>