summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
Commit message (Collapse)AuthorAgeFilesLines
* Add const overloads for QColor::getCmyk and QColor::getCmykFSven Pauli2018-09-252-4/+25
| | | | | | | | | | | | | Align the constness of QColor::getCmyk and QColor::getCmykF with the rest of the family (QColor::getRgb etc.) by adding overloads. The non-const methods could be removed with the next major release as that will break binary compatibility. Task-number: QTBUG-65176 Change-Id: I8579928a43fb59aed3319ff73481994a54b274f8 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add optimized fetch ARGB32 routines for NEONAllan Sandfeld Jensen2018-09-122-0/+20
| | | | | | | | After convert and fetch were split, only convert was still NEON vectorized, while fetch is the more commonly used version. Change-Id: Iea2af7ccee6589b3d6e9908afeaae2d1ad2753be Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Doc: Fix typo and add precision to method descriptionPaul Wicking2018-09-121-2/+3
| | | | | | | | | As transform() returns worldTransform(), point out that it is an alias in its description. Fixes: QTBUG-18117 Change-Id: I0eb1f78c6955b499906024105f9969cdccf13303 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-071-9/+49
|\ | | | | | | Change-Id: I66c7f18a2abd13601da0947919436f7da3549ae9
| * Avoid conversion over RGBA64 for RGB32 LCD text blendingAllan Sandfeld Jensen2018-08-301-9/+49
| | | | | | | | | | | | | | | | Short-cuts the case where there is no gamma correction to avoid a conversion over RGBA64 and back. Change-Id: I100697a9f7a4b94283557b2c0eaa45e0eff81785 Reviewed-by: Lars Knoll <lars.knoll@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>
* | clangcl: Fix QtGui link error (missing fetchPixelsBPP24_ssse3)Friedemann Kleint2018-08-231-3/+3
| | | | | | | | | | | | | | | | | | Do not try using SSSE3 if the compiler do not support it. (see 648ee7aa020d04b160ec56187f49f761ffab93cc). Task-number: QTBUG-50804 Change-Id: I489b0bbacfde0c647c9d5b71ca3de992d7dc8878 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Smooth image scaling for 64bit imagesAllan Sandfeld Jensen2018-08-224-67/+289
| | | | | | | | | | | | | | | | Adds support for smooth scaling 64bit images. Task-number: QTBUG-45858 Change-Id: If46030fb8e7d684159f852a3b8266a74e5e6700c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Fix big-endian buildAllan Sandfeld Jensen2018-08-211-0/+13
| | | | | | | | | | | | | | | | | | Declare rbSwap<QImage::Format_RGBA8888>, so we don't end up in a fallback definition not used by little-endian. Task-number: QTBUG-69951 Change-Id: I8512bba76da7d59a27593d37c70283d881c3e8fc Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Implement support for 16bpc image formatsAllan Sandfeld Jensen2018-08-115-335/+967
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for 16bit per color image formats in QImage. This makes it possible to read and write 16bpc PNGs, and take full advantage of the 16bpc paint engine. [ChangeLog][QtGui][QImage] QImage now supports 64bit image formats with 16 bits per color channel, compatible with 16bpc PNG or RGBA16 OpenGL formats. Task-number: QTBUG-45858 Change-Id: Icd28bd5868a6efcf65cb5bd56031d42941e04099 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-08-073-2/+181
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-073-2/+181
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/doc/src/objectmodel/signalsandslots.qdoc src/plugins/platforms/cocoa/qcocoamenuloader.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection.h src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp tests/auto/gui/image/qimage/tst_qimage.cpp Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Change-Id: I9bd24ee9b00d4f26c8f344ce3970aa6e93935ff5
| | * Optimize blits of any compatible formatsAllan Sandfeld Jensen2018-08-032-2/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fast image blending is only used for SourceOver composition, but several of our embedded backends make heavy use of Source composition which doesn't have a short-cut. This patch adds a blitting short cut that works in those cases. Task-number: QTBUG-69724 Change-Id: Icc61a67cc27bc83863153d69cae60dd986d26f69 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Add missing optimization for loading RGB32 to RGBA64 using NEONAllan Sandfeld Jensen2018-08-031-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rest of the RGB64 routines were optimized, but the loading of RGB32 was not as it was originally not used much, but with ARGB32 using the RGB64 backend, it is essential for decent performance. Task-number: QTBUG-69724 Change-Id: I1c02411ed29d3d993427afde44dfa83689d117e0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Add logging for QPlatformBackingStore::composeAndFlushTor Arne Vestbø2018-08-072-2/+9
|/ / | | | | | | | | Change-Id: I96778296480d2aaad5e01ed15353106bc90d4d2b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Give the QGradient presets ObjectMode coordinate mode by defaultEirik Aavitsland2018-07-241-2/+2
| | | | | | | | | | | | | | | | ObjectBoundingMode has inconsistent behavior and is deprecated in favor of ObjectMode. Change-Id: I748f6283f3db5869bb9a67c08bf5f16abc6f95b0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-171-1/+1
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbintegration.cpp Conflicts git missed: src/plugins/platforms/qnx/qqnxglcontext.cpp Change-Id: I0582cdc9e66e43efe79038b9c43d4f9572ac88fc
| * Fix the copyright year of the qgrayraster.c dependencyNicolas Ettlin2018-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | The copyright year of the qgrayraster.c dependency was incorrectly set to “2006-2015”, instead of 2000-2016 (as stated in the file’s header comments). This commit solves this issue. Task-number: QTBUG-69261 Change-Id: I307b6eabdd133fe4f8371b963577b59af8620838 Reviewed-by: hjk <hjk@qt.io>
* | SIMD: Add a haswell sub-architecture selection to our supportThiago Macieira2018-07-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the comment says, Haswell is a nice divider and is a good optimization target. I'm using -march=core-avx2 instead of -march=haswell because the latter form was only added to GCC 4.9 but we still support 4.7 and that has support for AVX2. This commit changes the AVX2-optimized code in QtGui to Haswell- optimized instead. That means, for example, that qdrawhelper_avx2.cpp can now use the FMA instructions. Change-Id: If025d476890745368955fffd153129c1716ba006 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Re-enable QGradient::Preset documentation by explicitly ignoring warningsTor Arne Vestbø2018-07-061-2/+0
| | | | | | | | | | | | Change-Id: Ibde6d905c74a571dc2e9d2942e99682e0a4f9b8c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-07-024-17/+17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
| * Fix the qHash implementation for QMatrix / QTransformGiuseppe D'Angelo2018-06-212-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The order of the arguments of QHashCombine::operator() was accidentally swapped -- the first is supposed to be the accumlated value, the second the new value to combine. [ChangeLog][QtGui][QMatrix] The qHash() implementation for QMatrix has been changed. [ChangeLog][QtGui][QTransform] The qHash() implementation for QTransform has been changed. Change-Id: Iba13f76ff734a2184c96184ee0e5748c05db07fa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Doc: Add missing full stops in briefsPaul Wicking2018-06-211-1/+1
| | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: I3f2a9f8c562f9a44bb32bddd31d75abbfe6de04d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
| * Fix black border around main widget with non-integer scalingAllan Sandfeld Jensen2018-06-071-1/+1
| | | | | | | | | | | | | | | | | | All the other highdpi scaling uses rounding, and not using it here may offset the compositing by a line. Task-number: QTBUG-67994 Change-Id: I2f5f328c091d0e85c40b1663e22c82f364df65e5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | Fix wrongly included radial gradient enum for QGradient presetsTor Arne Vestbø2018-06-281-2/+1
| | | | | | | | | | Change-Id: If8372224d7e113c1f55468c0de69dcab9804138f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Harden logic for converting from CSS gradients to QGradientTor Arne Vestbø2018-06-272-1/+1
| | | | | | | | | | | | | | | | | | Some of the gradients from https://webgradients.com/ are not minified completely, so we need to be a bit more lenient when converting them to the internal format used by QGradient. Change-Id: I47466b6a77abd6d2fefc1326fbf6ba5713dd74cb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | doc: Mark QGradient::Preset enum as internal until we can ignore its valuesTor Arne Vestbø2018-06-271-0/+2
| | | | | | | | | | Change-Id: I0637ee765053a30ac3666f33c4d8f59c5ae9aa84 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Fix: crash when painting with high-dpr image brushEirik Aavitsland2018-06-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | The recently merged f5fe9fc5a4 (Add ObjectMode to QGradient) changed combineXForm() to check the brush's gradient's coordinatemode. However, combineXForm() is now also used when painting with high-dpr image brush. In the latter case, the gradient is 0 so this would crash. Testcase: tst_lancelot, image_dpr.qps. Change-Id: I5e2785ef708768c3fa3eac0999c9c24fd25108f4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix incorrect JSON in qt_attribution.jsonKai Koehne2018-06-251-1/+1
| | | | | | | | | | | | | | Fix spurious comma added in commit c4a21708ed186640f4db381dc80. Change-Id: I6d62378dfdda7a0da611eed1064cff707b9c6bf6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Add ObjectMode coordinate mode to QGradientEirik Aavitsland2018-06-224-22/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ObjectBoundingMode coordinate mode of QGradient allows specifying the gradient coordinates relative to the object being painted. But if the gradient brush also has a transformation, that transformation is applied in the logical, not object, coordinate space. That behavior is counterintuitive. However, changing it now would break existing code. Instead, we introduce a new coordinate mode enum with the expected behavior, and document the old one as deprecated. This prepares to fix the bugs below in qtsvg, by making it possible to specify the same behavior in Qt as SVG has. [ChangeLog][QtGui][QGradient] Add ObjectMode coordinate mode [ChangeLog][Important Behavior Changes] QDataStream version bumped up to 18 to account for changes in the serialization of QGradient. Task-number: QTBUG-59978 Task-number: QTBUG-67995 Change-Id: I8820a2555359812f3e1a46e37d6ac2cc29a2091d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-06-083-7/+5
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-06-073-7/+5
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/kernel/qeventdispatcher_cf.mm src/gui/kernel/qguiapplication_p.h src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/qioseventdispatcher.mm src/plugins/platforms/windows/qwindowsdrag.h src/plugins/platforms/windows/qwindowsinternalmimedata.h src/plugins/platforms/windows/qwindowsmime.cpp src/plugins/platforms/winrt/qwinrtscreen.cpp Change-Id: Ic817f265c2386e83839d2bb9ef7419cb29705246
| | * Fix build for Android with android-clang in r17Liang Qi2018-06-061-3/+3
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-67464 Change-Id: Ib971a5da82b31bce9ac1c9ac623ad7d5302cfaec Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Fix QTransform::transposed() result having wrong transformation typeEirik Aavitsland2018-06-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of QTransform::transposed() had a wrong assumption about the type of the result. Task-number: QTBUG-68630 Change-Id: Ia5ce794efe773d74fb5fdaff3da8cae2b452e7e5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Reduce recent performance regressionAllan Sandfeld Jensen2018-05-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change to fix 16-bit integer overflow used two floor operations when only one is necessary. With floor being rather expensive on x86 without SSE4.1 this caused a performance regression in ARGB32 smooth perspective transforms. This eliminates one of the floor operations which is unnecessary as the number is always positive in this case and thus truncation will yield the same result faster. Change-Id: Iaae76820d4bc2f368e49ed143130b5075fc760a2 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Optimize fetchTransformed and removed specialized versionsAllan Sandfeld Jensen2018-06-071-662/+124
|/ / | | | | | | | | | | | | | | Optimize the general transformed fetcher and use it to replace several specialized copies of it that are now slower than the general one. Change-Id: Ife79ec99227f0df4f127303c7a340b2f7d174dff Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Fix PDF rendering of strokes with cosmetic pensAndre de la Rocha2018-06-061-1/+2
| | | | | | | | | | | | | | | | | | | | The PDF backend was ignoring the cosmetic attribute for certain pens, resulting in strokes rendered incorrectly. Task-number: QTBUG-68537 Change-Id: Ib9fd5a510716056c8afe67733f51fc682bbb7354 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Provide presets for QGradientTor Arne Vestbø2018-05-319-2/+1244
| | | | | | | | | | | | | | | | | | | | | | | | | | Similar to Qt::GlobalColor, the presets allow the user to create brushes based on predefined gradients, quickly getting pretty pixels on screen. The presets are based on the linear gradients from WebGradients, a free collection of gradients, hosted at https://webgradients.com/. The few radial and blended gradient presets have been excluded. Change-Id: I1ce8f2210a6045c9edb8829ab3eddcc313549127 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-05-241-4/+4
|\| | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_common.prf src/corelib/tools/qstring.cpp src/plugins/platforms/windows/qwindowsmousehandler.cpp src/widgets/widgets/qmainwindowlayout_p.h Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
| * Fix potential 16-bit integer overflowAllan Sandfeld Jensen2018-05-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | When multiplying a float in [0;1[ with (1<<16), with rounding, it might end up being rounded to 65536 even if the input was under 1. This patch uses a floor operation to make sure the value can be in a ushort, and cleans up the surrounding code so it is clearer what it does. Task-number: QTBUG-68360 Change-Id: I2d566586765db3d68e8e7e5fb2fd1df20dabd922 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Optimize unpremultiply using SSE rcpAllan Sandfeld Jensen2018-05-235-31/+239
| | | | | | | | | | Change-Id: I255031d354b0fde7abe8366ea2c86a35f9f24afd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Reapply SSE4 acceleration to ARGB32->ARGB32PM conversionAllan Sandfeld Jensen2018-05-202-2/+22
| | | | | | | | | | | | | | | | | | After the merger of fetch and convert, we were missing the hook to the accelerated merged version of ARGB32->ARGB32PM conversion, causing a minor performance regression. Change-Id: I3965d1a95f2305306005db09640f2775aa645d2e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Get rid of argb32->argb32pm routines in qimageAllan Sandfeld Jensen2018-05-071-0/+8
| | | | | | | | | | | | | | | | We already have better optimized versions in drawhelper. Removing these versions is a performance gain. Change-Id: I431c74e440529648d9bc5e22c0e700a72d376934 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Optimize intermediate_adder_avx2Allan Sandfeld Jensen2018-05-071-6/+7
| | | | | | | | | | | | | | | | Use 16-bit multiplication as it is twice as fast as 32-bit multiplication. Change-Id: I64b529eaaed4ce2c59c64a0120e93cd132724156 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Optimize direct argb32 blend functionsAllan Sandfeld Jensen2018-05-071-8/+8
| | | | | | | | | | | | | | | | They were slower than the long path version due to working too hard. This also unduplicates code by using the blend_pixel function. Change-Id: Ibf84b8f749cf40d4c852b459dc76860afd850d32 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge drawhelper convert-from and storeAllan Sandfeld Jensen2018-05-025-581/+516
| | | | | | | | | | | | | | Avoids using an intermediate buffer on store and simplifies the code. Change-Id: I2dc4e735eb770f90dc99fe0f513b4df3b35ee793 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-04-261-0/+5
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-04-261-0/+5
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoafontdialoghelper.mm src/plugins/platforms/cocoa/qcocoawindow.mm Change-Id: Ideea96d1b43d47b1d9b34e11c9986a88e240aa71
| | * Fix division by zero in radial gradiants with NEONAllan Sandfeld Jensen2018-04-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The NEON implementation uses rsqrt and thus can not be taken on 0, so replace the minimum with something close to zero instead of zero. Task-number: QTBUG-59961 Change-Id: Ia39e45be675b056c1e22900495ce9ba4e8b70e5f Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | High-dpi drawTiledPixmap (raster paint engine)Morten Johan Sørvig2018-04-262-1/+14
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement more consistent behavior for drawTiledPixmap(), which should produce the same visual tiling pattern independent of display devicePixelRatio Consider the following pixmaps and draw calls: QPixmap px32; // 32x32 QPixmap px64; // 64x64 drawTiledPixmap(QRect(0, 0, 128, 128), px32); drawTiledPixmap(QRect(0, 0, 128, 128), px64); On 1x displays this will produce 4x4 and 2x2 tiles, respectively. On 2x displays this would previously produce a different tiling pattern, where the paint engine would tile in the device pixel coordinate system. Change this to tile in the device independent coordinate system, producing the same visual tiling pattern as the 1x case. It is possible to produce a 4x4 tiling pattern with high-resolution output from the 64x64 pixmap by setting the devicePixelRatio: QPixmap px64; px64.setDevicePixelRatio(2); drawTiledPixmap(QRect(0, 0, 128, 128), px64); This change adds an inverse scale to the image filler transform that accounts for the pixmap devicePixelRatio. [ChangeLog][QtGui] QPainter::drawTiledPixmap() now tiles in the device independent coordinate system. Change-Id: I4918d274192967f222f181b374571c7c597dcd76 Reviewed-by: Jonathan Courtois <jonathan.courtois@gmail.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: 石博文 <sbw@sbw.so> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>