summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'qt/dev' into dev-highdpiPaul Olav Tvete2015-06-0926-268/+262
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qsimpledrag.cpp src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface_p.h src/plugins/platforms/xcb/qxcbwindow.cpp Change-Id: Icd887552ade61d6a2b2527383970f7145aa00faf
| * Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/devSimon Hausmann2015-06-0419-261/+236
| |\
| | * Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-0319-261/+236
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qnamespace.qdoc src/corelib/io/qwindowspipereader.cpp src/corelib/io/qwindowspipereader_p.h src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/plugins/platforms/xcb/qxcbconnection.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/tools/qmake/tst_qmake.cpp tests/manual/touch/main.cpp Change-Id: I917d694890e79ee3da7d65134b5b085e23e0dd62
| | | * Syntax clean up in qimagescaleAllan Sandfeld Jensen2015-06-021-27/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Corrects a few white-spaces, return statements and else statements to fit Qt coding style. Comment updated to indicate how far the code is getting from its original roots. No semantic changes. Change-Id: Ia2288c501788a291bfc4e8b70e8eb1efb7a90128 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | | * Fix wrong method name in QColor documentationAllan Sandfeld Jensen2015-06-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The methods are called hslHue and hslSaturation. This was leading to dead links. Change-Id: I0997c415958aae9a66fb037d98f8ad3d43b38231 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| | | * Avoid QWidget dependency in QtGuiLaszlo Agocs2015-06-012-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not a real dependency as all we need is to store a pointer, but better not to use the name QWidget at all. Change-Id: I30ef1dd44ac7e42c1b9c84675f94088b8c516076 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| | | * Clip QOpenGLWidget and QQuickWidget correctlyLaszlo Agocs2015-06-012-16/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce support for the widgets' clipRect(). Right now render-to-texture widgets in scroll areas placed close to each other result in broken (non-existent) clipping. Similarly, stack-on-top widgets fail to clip when placed inside a scroll area. This is now corrected and the qopenglwidget example is enhanced to utilize a scroll area. Task-number: QTBUG-45860 Change-Id: I859a63d61a50d64ba9e87244f83c5969dce12337 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
| | | * Combine x and y oriented sample helpersAllan Sandfeld Jensen2015-05-302-120/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The range sampling operates the same in both directions just with different step-sizes, so the code can be unduplicated, Change-Id: I47805a7e925d4058f62c558ef08e79485915e937 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| | | * Remove unused call indirectionAllan Sandfeld Jensen2015-05-301-20/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The global variable is a left over from when there was an MMX assembler implementation, and is now just making the compiler's job harder. Change-Id: I686704b64a2f8c68ec8ca83f2ac3e465ded773e0 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| | | * Adjust curveThreshold based on strokeWidthAllan Sandfeld Jensen2015-05-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently curveThreshold is relative to pen width, this allows wide pen to be increasingly off target. This patch adjust the curveThreshold relative to stroke width, thereby ensuring wide pens stays on the curve. Task-number: QTBUG-46151 Change-Id: Ifd4371aa2853331d02e3c6f6565c243eb1b7ed2e Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| | | * MSVC: Silence compiler warning about INFINITYKai Koehne2015-05-111-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Contrary to the comment, MSVC does support INFINITY, but always prints a warning when it's used: qpainterpath.cpp(3066) : warning C4756: overflow in constant arithmetic Avoid this by using numeric_limits<T>::infinity. Change-Id: Ie925b036b807378da5298a275fa108347c24519e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
| | | * Add flip support to QPlatformBackingStore::toTexture()Laszlo Agocs2015-05-062-25/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Necessary for iOS. In addition to swizzle we also need to communicate the need for flipping, so switch to flags instead of bools. Task-number: QTBUG-40034 Change-Id: I055e591afd838878503be6f5f69aa7347965d9cf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| | | * Make data tables const.Volker Krause2015-05-056-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moves some of them to the .rodata section, the rest at least to .data.rel.ro[.local]. Change-Id: I85676ddf22b0c0097f3f0dce4c3dc018dc29d045 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | | * Add Q_REQUIRED_RESULT in several placesSérgio Martins2015-05-042-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Icda3000f1d9f0d41612a50a816aa5de5e32028d4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| | | * Add noexcept to move constructors and assignment operatorsAllan Sandfeld Jensen2015-05-046-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the noexcept attribute to all move constructors and assignment operators in QtGui that didn't already have it. Change-Id: Idcdf79ae8349b8793e7394b5ae7c08e6111fbc9a Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * | | De-duplicate vtables, part I: exported private classesMarc Mutz2015-06-034-4/+11
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By making the destructor (usually the first non-inline, non-pure, virtual function, and therefore the trigger for most compilers to emit the vtable and type_info structures for the class in that TU) out-of-line, vtables and, more importantly, type_info structures for the class are pinned to a single TU. This prevents false negative dynamic_cast and catch evaluation. In this first batch, we de-inline destructors of exported private classes. Since they are already exported, users of these classes are unaffected by the change, and since it's private API, we don't need to avoid adding code to the out-of-line destructor until Qt 6. Change-Id: I450707877d2cb6a77f79ae1dd355facb98d6c517 Reported-by: Volker Krause <volker.krause@kdab.com> Task-number: QTBUG-45582 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Fix users of QTextLayout::additionalFormats to use the new APIMarc Mutz2015-05-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTextLayout::additionalFormats setters and getters using QList<FormatRange> have been deprecated; port to the QVector versions. Moved op== definition for FormatRange needed in tst_qsyntaxhighlighter.cpp to a friend declaration in FormatRange itself, because MSVC 2008 doesn't find it otherwise. Change-Id: Ibab6589df057f02377d895079b56395859e3401e Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| * | Q*GlyphCache: de-inline dtor and export vtableMarc Mutz2015-05-262-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The destructor is the first virtual method. By not defining it out-of-line, we provoke multiple copies of vtables, not all of which can be merged by the linker. If the linker fails, RTTI such as dynamic_cast and catch-blocks involving the type will not work. Additionally, QFontEngineGlyphCache was not exported, and therefore also not its vtable, making it impossible for users outside of QtGui to get a unique RTTI for the class. Change-Id: Ib265945934216bb609629431eb4c71996d4fd39d Reported-by: Volker Krause <volker.krause@kdab.com> Task-number: QTBUG-45582 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
* | | Merge branch 'wip/highdpi' of git://code.qt.io/qt/qtbase into dev-highdpiPaul Olav Tvete2015-05-1321-5322/+4639
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbscreen.cpp src/plugins/platforms/xcb/qxcbwindow.cpp
| * | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-274-41/+36
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/tools/qdoc/tree.cpp tests/auto/gui/painting/qcolor/tst_qcolor.cpp Change-Id: Iaa78f601a63191fa643aabf853520f913f2f0fdc
| | * Short-cut SSE4 unpremultiplyAllan Sandfeld Jensen2015-04-251-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Even with SSE4 optimized unpremultiply it is still significantly faster to skip the calculation on alpha values 0 and 255. Change-Id: Iafe658fea8eacf35a857f292952b0c1ee056139c Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| | * Revert "Remove separate SSE4 unpremultiply function"Allan Sandfeld Jensen2015-04-234-41/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Mark QRGba64 as Q_PRIMITIVE_TYPEMarc Mutz2015-04-271-0/+2
| | | | | | | | | | | | | | | Change-Id: I1ab25a7b880b47f616ae152400c1e2116688ec4c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | Don't use anonymous types declared in an anonymous unionLiang Qi2015-04-221-6/+8
| | | | | | | | | | | | | | | | | | | | | At least clang is unhappy with them when -Wnested-anon-types is enabled. Change-Id: Ia9869fecb836b27be69f7b9715fd614f384bb912 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-2212-3070/+1176
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/gui/painting/qdrawhelper.cpp src/plugins/platforms/xcb/qxcbnativeinterface.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/plugins/platforms/xcb/qxcbwindow.h src/testlib/qtestblacklist.cpp src/tools/qdoc/node.cpp src/tools/qdoc/node.h tests/auto/gui/painting/qcolor/tst_qcolor.cpp Change-Id: I6c78b7b162001712d5774293f501b06b4ff32684
| | * Remove separate SSE4 unpremultiply functionAllan Sandfeld Jensen2015-04-164-34/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Optimize non-native bilinear transformsAllan Sandfeld Jensen2015-04-161-12/+33
| | | | | | | | | | | | | | | | | | | | | | | | Reading directly from an array instead of calling a function pointer is much faster. Change-Id: I833b33448bad064d6f38d2f9ff44138d90206822 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| | * Cleanup and optimization of qimage smoothscaleAllan Sandfeld Jensen2015-04-156-726/+762
| | | | | | | | | | | | | | | | | | | | | | | | | | | Cleaning up smoothscale code. Upscaling is improved using existing optimized interpolation methods, and downscale is given SSE4.1 optimized versions. Change-Id: I7cdc256c26850948aef7dae26fda1622be6b8179 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| | * Support gradients natively in the PDF generatorLars Knoll2015-04-092-233/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add native support for linear and radial gradients to our PDF generator. This fixes a couple of issues with both the quality of the generated PDFs as well as sizes of the files. Task-number: QTBUG-42758 Change-Id: Ib905457e11e4dc52443c76b3761bca8d1fbe9bfc Reviewed-by: Stephen Chu <stephen@ju-ju.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| | * Remove table of mostly null pointersAllan Sandfeld Jensen2015-04-081-2066/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | The patch moves the initialization of the format to format blend tables to runtime, so we only have to explicitly set the values that are not null. This removes most of the lines in qblendfunctions.cpp. Change-Id: Ie017f380ff11cfb764a631cfea7626786731b5fb Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * | Add qHash(QMatrix) and qHash(QTransform)Marc Mutz2015-04-214-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMatrix and QTransform can be compared for equality, so qHash should be overloaded, too. [ChangeLog][QtCore][QMatrix] Added qHash(QMatrix). [ChangeLog][QtCore][QTransform] Added qHash(QTransform). Change-Id: I1ce925ebe258c9d7e35b68e5ac5c3373f1460c58 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | Remove <qhash.h> where it's not usedMarc Mutz2015-04-202-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | To avoid source-incompatibilites, wrap in QT_DEPRECATED_SINCE(5, 5) in public headers. Change-Id: I6117e8a6b11200d2f1a0a94a0e87d5c27538218e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | Move composition out of qdrawhelper.cAllan Sandfeld Jensen2015-04-165-2364/+2236
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also changes the way the SSE2 composition modes are inserted into the table, so it is handled like all the other tables and doesn't require duplicating most of the table. Change-Id: I8de383caece0367bc7466d7a1b145aa820c3bd6a Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * | Implement radial and conical gradients for rgb64 renderingAllan Sandfeld Jensen2015-04-154-101/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the last two missing source types to rgb64 rendering. Conical and radial gradients. At the same time linear gradients are moved to a template form to increase code sharing. Change-Id: I30fdd0837b0da03e3447683856ebbe4d7f48df6c Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * | Extend high color rendering to image renderingAllan Sandfeld Jensen2015-04-143-73/+1068
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A previous commit added 16-bit per color-channel precision to solids and linear gradients. This patch extends that to include texture data. To support that pixellayouts now have a method to convert to RGBA64. Change-Id: I661ae91bd7038085787003608a0af4add057e478 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * | Add support for more composition modes in rgb64 renderingAllan Sandfeld Jensen2015-04-132-4/+287
| | | | | | | | | | | | | | | Change-Id: I3bacecbabdf2d7b2de1acd86ab9383e69924a390 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * | Fix RGB30 painting testsAllan Sandfeld Jensen2015-04-131-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some tests were failing because the color was not read correctly from a QImage. To make it possibly to read more accurate colors a pixel accessor returing QColor has been added. Some tests also had the wrong order of arguments, confusing dest and src formats. This has been corrected, so they test what they claim to test. A test for RGB30 linear gradients is also added. Change-Id: Ic623ae1b8e0bf7383056b641c6e8230a1d7dd0dd Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | | Friedemann's crash fixPaul Olav Tvete2015-05-051-24/+26
| | | | | | | | | | | | Don't delete the paint device after painting has started.
* | | Multi-screen fixesPaul Olav Tvete2015-05-041-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various fixes, including: * Resize backingstore properly if screen has changed * Trigger resize event on screen change if necessary * Fix yet another race condition in screen detection * Trying to fix screen mapping Not completely finished, but I think it's better to keep in sync, and not diverge too much.
* | | DevicePixels -> NativePixelsPaul Olav Tvete2015-04-151-4/+4
| | |
* | | Use qreal for devicePixelRatio everywhereMorten Johan Sørvig2015-04-154-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | QPaintDevice::devicePixelRatio() -> devicePixelRatioF() Implement PdmDevicePixelRatioScaled for QPaintDevice subclasses. Remove instances of casting to int. Change-Id: I6e769d21e889bf8f88aedc1c49b53fef20a6709c
* | | Move qHighDpi functions into the QHighDpi namespacePaul Olav Tvete2015-04-141-4/+4
| | | | | | | | | | | | ...and use fromDevicePixels instead of toDeviceIndependentPixels
* | | Merge remote-tracking branch 'gerrit/dev' into dev-highdpiMorten Johan Sørvig2015-04-1321-290/+1012
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbbackingstore.cpp Change-Id: Ib7f277957636186d0abd58d8c710392ef7b02e13
| * | Solid and gradients in high color accuracyAllan Sandfeld Jensen2015-04-1011-186/+925
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch updates the internal color precisions of solids and gradients to 16bit per color. This makes it possible to render at higher precision on non-premultiplied ARGB32, the RGB30 formats and any other hi-color formats if more are added. [ChangeLog][QtGui][Painting] Internal precision of solids and gradients is now up to 16bit per color. Change-Id: Ieae5468bd6de1f56adfa4cb9fa966faf2ed824fd Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-081-11/+0
| |\| | | | | | | | | | Change-Id: I04f9f2749f68c0cb5a427b8d84e43b44bb143e4d
| | * [QFontEngineFT] Guarantee correct metrics for alphamap and its bounding boxKonstantin Ritt2015-04-071-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | ...for both cached and non-cached modes, by disabling hinting for transformed glyphs in loadGlyphFor(). Change-Id: I13766a653ebd72cbed0f5c38ca3536d042aed762 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-062-84/+67
| |\| | | | | | | | | | Change-Id: If9fd98525b6b4ca07e5e006fc98bf372a73b8a21
| | * Optimize fetching pixel values for SSE2 bilinear samplingAllan Sandfeld Jensen2015-04-041-72/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the CPU time was spending in fetching pixel values instead of calculating the bilinear sample. The access to vectors unions turns out to be very slow, and should be avoided. This patch removes the uses of vector,int array union in the bilinear sampling for SSE2. Change-Id: Ie765a80963c4899db59a583ea9a59d15e05f2b13 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-311-12/+8
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/android-g++/qmake.conf qmake/generators/unix/unixmake2.cpp src/gui/image/qimage_conversions.cpp Change-Id: Ib76264b8c2d29a0228438ec02bd97d4b97545be0
| | | * Fix rasterization errors in aliased cosmetic drawPolyLineEirik Aavitsland2015-03-191-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a cosmetic polyline contained a 1-pixel segment, the next segment would be drawn with wrong starting point. The original fix for QTBUG-26156 had some unwanted side effects (QTBUG-31579 and now QTBUG-42398). It tried to skip start-point update if stroke() did not actually draw anything (because the segment was too small). However, to determine that, it tested for a change in lastPixel. But that was not failsafe; in some cases (1-pixel segment), lastPixel could be unchanged even though the segment had been drawn. With this change, we instead test directly whether stroke() skipped the segment or not. Task-number: QTBUG-42398 Change-Id: Id751db69a18cd1af4f45070db9d5698aa532d22a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>