summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
Commit message (Collapse)AuthorAgeFilesLines
* qpa: extend drawPixmap capabilitiesJulien Brianceau2012-09-122-9/+56
| | | | | | | | | Extend drawPixmap capabilities for qpa through new ExtendedPixmapCapability QBlittable flag and add related implementation in DirectFB platform. Change-Id: If5436e16bfb37bf081bf864cad73a5e97394df8c Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Doc: Fix misc. doc errors and document undocumented functionsaavit2012-09-121-1/+1
| | | | | | Change-Id: I0c1e0a36ee37d5a8f3741f0405f63f9b26967f32 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* qpa: add non-opaque fill supportJulien Brianceau2012-09-112-11/+62
| | | | | | | | | | Add non-opaque fill support for qpa through new QBlittable flag "AlphaFillRectCapability" and add related implementation in DirectFB qpa platform. Change-Id: I863a270e24c96c432489099a34dc1f3a2be52280 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Improved the QBackingStore documentation.Samuel Rødal2012-09-111-1/+14
| | | | | | | | Added links to the example and added some explanation of when QBackingStore might be useful. Change-Id: Iee19c4fdfc5c27ac9b559c9df428d83d302f3928 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Avoid duplicate setPen() in PDF when reusing QPrinterEskil Abrahamsen Blomfeldt2012-09-111-0/+1
| | | | | | | | | | | | The simplePen property was not reset when reusing the QPrinter, thus we would output two identical setPen() commands in the PDF making the autotest that compares the results fail. Task-number: QTBUG-27171 Change-Id: I601042ec59e45ef72a56f230f6112a91a259b4a5 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Rename QPaintDevice::init() to initPainter()Richard Moore2012-09-103-3/+3
| | | | | | | | The old name was too generic and was likely to cause warnings in user code. Change-Id: I7126d8fe89a394cd8388af5a030961af7b69c741 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Doc: fix yet more errors reported by qdocaavit2012-09-043-2/+29
| | | | | Change-Id: I67ac081ce95235912784bbbc347dd8f80fdebbde Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* qpa: incorrect rendering when stretching and clippingJulien2012-09-031-5/+17
| | | | | | | | | | | When using QBlittable with SourceOverScaledPixmapCapability, rendering through clipAndDrawPixmap is incorrect when stretching: source pixmap rectangle has to be corrected using scaling factor. Change-Id: I7026987f5c47094a4578c0da4ccb67a0241d64bd Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Julien BRIANCEAU <jbrianceau@nds.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Doc: Remove documentation for removed function.Kim Motoyoshi Kalland2012-08-311-8/+0
| | | | | Change-Id: I3d2b4078f7c442b636e4848048c41f9f8223c98b Reviewed-by: aavit <qt_aavit@ovi.com>
* Doc: More fixes of qdoc-reported doc errorsaavit2012-08-314-8/+8
| | | | | Change-Id: I2dd815c471e56d2c239a63e7c7ad3496af2a585b Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Doc: Fixes for several doc errorsaavit2012-08-312-11/+1
| | | | | Change-Id: I5be9c8e9ff9c17fae0fbbe468f34439411aca06b Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Made QImage::fill(uint pixel) for RGB888 accept QRgb values.Samuel Rødal2012-08-292-4/+4
| | | | | | | | | | | | 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>
* Correct QTransform::QTransform documentation re m13 initialisation.Mitch Curtis2012-08-101-1/+1
| | | | | | | | | Documentation incorrectly states that it is m13 that is set to 1, when it is instead m33. Task-number: QTBUG-10232 Change-Id: If3c7d3eb1c478ebef4f13b4842235445afc48049 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Explained rectangle bounding in documentation.Leonard Lee2012-08-081-0/+1
| | | | | | Task-number: QTBUG-26756 Change-Id: Ifa56cbe249164e239f21c00fc31cd6ddd81705ad Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Explained degree unit in QPainter::rotate() function.Leonard Lee2012-08-081-1/+1
| | | | | | | Task-number: QTBUG-26757 Change-Id: I9a03480513819aefb78d914a7170fb4997181643 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Mention setFont() in QPainter::drawText() functionsSimon A. Eugster2012-08-011-1/+9
| | | | | | Change-Id: Id0d06d27f3aeb6a6e7e1a415da78591ae5eae91c Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* change \img to \image in docsJeremy Katz2012-08-012-6/+6
| | | | | | | | \img was a macro defined in macros.qdocconf. This collection of macros is being phased out. Use the full command instead. Change-Id: Ia55212f87bb46349d61359d40568e0aa33882596 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Implement implicit constructors for built-in classes.Stephen Kelly2012-07-272-0/+7
| | | | | | Change-Id: I6b0b104bc1da3252d014615c50b81830de42e722 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Added note to QTransform::isRotatingAli Akhtarzada2012-07-251-0/+2
| | | | | | | | | | Rotation of 180 or 360 is treated as a scaling transform Task-number: QTCREATORBUG-7651 Change-Id: I44077de0a4a90a87d2d9e8499c1920da1ed066c9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QPaintBuffer: use the nullary version of qRegisterMetaTypeStreamOperators()Marc Mutz2012-07-231-4/+2
| | | | | | | | | The name is taken from the existing Q_DECLARE_METATYPE()s. Also don't call qRegisterMetaType<>, as that is done within qRegisterMetaTypeStreamOperators<> already. Change-Id: Ia782868b49bc97d78e0cec29ef9f8b5709420e2a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix infinite loop due to FPU limitationStéphane Cerveau2012-07-171-2/+2
| | | | | | | | | | Bug detected with animatedtiles in example/animation. In qpa mode, using some specific resolution of directfb such as 800x600 causes a bug in FillRectF where there is an infinite loop due to scalabilty of qreal value: One is rounded and the other not. Change-Id: I1707e53f34aeeadc0f0fc07b1dca148fbe05b5f1 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Added a reserved data pointer in QPaintDevice.Alexandros Dermenakis2012-07-162-0/+4
| | | | | Change-Id: If547e5525635e7c76db7a02c7c0c300c87373a18 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Fix some spelling errorsSergio Ahumada2012-07-111-1/+1
| | | | | | Change-Id: I19d3b2e9a5180b13deb828b55195404ef20be295 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Q_DECLARE_SHARED: mark the type movableMarc Mutz2012-07-102-2/+1
| | | | | | | | | | All implicitly shared classes are by definition movable, so this patch adds Q_DECLARE_TYPEINFO(Type, Q_MOVABLE_TYPE) to Q_DECLARE_SHARED. Change-Id: Idf8989ae1a7ed6d1ac13fccb7eaef7395a875350 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove _qpa from cpp filenamesGirish Ramakrishnan2012-07-032-1/+1
| | | | | | | | 36547f4eff44361f7a6acd0cff107c0e47561f93 removed the _qpa from .h files and promised to remove it from .cpp files at a later date. Change-Id: I24a5c3796f6b07dd9a1931b699f3212d315edb12 Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
* MIPS DSP composition functions optimizations.Damir Tatalovic2012-07-036-159/+1770
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Get started with patching up the Qt GUI docsGunnar Sletta2012-06-2813-0/+23
| | | | | | | | Primary goal, make the front page of the Qt GUI module a bit more clarifying and avoid downstream references inside the Qt GUI docs. Change-Id: Icbcfbb64b93963add889bf83711daa9575885c02 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove all references to XLFD fontsLars Knoll2012-06-271-5/+0
| | | | | | | | XLFD fonts are no longer supported in Qt 5. Change-Id: I83400dab417c933d5cd956c0d168c45b9d79dab7 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove toRect_normalized().Robin Burchell2012-06-261-11/+0
| | | | | | | Seems to have been unused since qt4's fde7475bcf9c10522a8170e6eb8fb9a8fadc21cd. Change-Id: I7ec88fb4ca8c1ffda469a1c048b4fea17ff042bc Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make QRegion not need to be friends with QVectorThiago Macieira2012-06-261-3/+2
| | | | | | | | | | This hack was introduced in Qt 4.5 and the intention was to resize (hopefully, shrink) the QVector without causing it to reallocate memory. We can accomplish the same by reserving the size: until we clear() or squeeze(), the container will not free memory. Change-Id: I03a09537a617be0ce865eefa043005e4051e8706 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* proper filling when using Qt::TexturePatternKonrad Grochowski2012-06-211-1/+1
| | | | | | | | | fix for using both Qt::OpaqueMode and Qt::TexturePatter for filling Task-number: QTBUG-19202 Change-Id: Ia92363cacaa51140fe78b542d9768aead81868ff Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* mips: dsp and dspr2 can be enabled separately fix dspr2 only compilationHolger Hans Peter Freyther2012-06-122-3/+4
| | | | | | | | | Separate dsp and dspr2 handling. The configure script allows to disable them separately and with this patch it is possible to compile a dspr2 only libQtGui.so. Change-Id: Ifca583c9b46a25c93751967a31ac77eafc5d51e4 Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* Reorganise the painting.pri file after the last round of cleanupsThiago Macieira2012-06-101-29/+20
| | | | | Change-Id: I35f5356fc59d109074d39c4fafd608540743479a Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Added SpellCheckUnderlineStyle theme hint.Samuel Rødal2012-06-071-1/+5
| | | | | | Task-number: QTBUG-25115 Change-Id: I70abbed426ad8bebca51823ed5ce16f2f300b5cc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Fix the confusion caused by the QT_ALWAYS_HAVE_xxx macrosThiago Macieira2012-05-311-6/+6
| | | | | | | | | | | | | | | | | | | | The QT_ALWAYS_HAVE_xxx macros are gone: they were hard to use and not defined properly. It indicated that the compiler was producing code that required that particular instruction set, so we could use it in our code unconditionally. Instead, let's use the GCC-style __SSE2__ and __ARM_NEON__. MSVC does not generate the __SSE2__ macro, so let's do it for the compiler. Also, define __AVX__ and the macros for the technologies leading to it when we manage to detect an /arch:AVX build (currently not possible, see note in the header). ICC and MSVC allow one to use the intrinsics anywhere, but for Qt all uses of the intrinsics are either in specially-built files, protected by runtime checks, or they are unconditional (qstring.cpp). So we only use the intrinsics when the compiler was instructed to generate code for that instruction set anyway. Change-Id: If8382f30422cee0e5831d051b003acf036824abf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Overhaul the qsimd_p.h: rename macros and update conditionalsThiago Macieira2012-05-3112-44/+44
| | | | | | | | | | | | | | | The QT_HAVE_xxx macros are replaced with QT_COMPILER_SUPPORTS_xxx. They indicate that the compiler supports those intrinsics, but not necessarily that they can be used right now. ICC and MSVC allow one to use the intrinsics anywhere, but for Qt all uses of the intrinsics are either in specially-built files, protected by runtime checks, or they are unconditional (qstring.cpp). So we only use the intrinsics when the compiler was instructed to generate code for that instruction set anyway. Change-Id: Ie58eebbc0518ad1d5420a85174fd84153bb9abaa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* QtPrintSupport: Add CUPS printsupport pluginJohn Layt2012-05-311-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move CUPS code around to create a new CUPS printsupport plugin, this fixes QPrinterInfo for CUPS which depends on the plugin to work. It QT_NO_CUPS is defined then the plugin is not built and only Print to PDF is supported under Linux. * Move unused genericiunixprintersupport plugin to start new CUPS printsupport plugin * Split QPdfPrintEngine to create QCupsPrintEngine * Remove LPR related code from QPdfPrintEngine * Move CUPS specific code from plugin base class to derived CUPS class * Remove forcing CUPS print engine to use PDF mode as PDF is now Native * Move qt_getCupsPrinterPaperSizes from qprinterinfo_unix to QCUPSSupport * Remove qprinterinfo_unix as no longer used * Remove all QT_NO_LPR uses There is now no CUPS specific code left in printsupport/kernel except QCUPSSupport which is needed for the dialogs. Task-number: QTBUG-23060 Change-Id: Ie8fa4512a2424edc8943068e0fa9fb714cc42db9 Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: John Layt <jlayt@kde.org>
* Remove QRegion::handleGirish Ramakrishnan2012-05-312-17/+0
| | | | | | | | This function is unavailable in QPA land (it currently returns the QRegionPrivate as the handle()). Change-Id: I4e81e29d4546a4737c1aaab4ee1fb97e28a473f5 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Implement QVector with QArrayData interface.Jędrzej Nowacki2012-05-301-1/+1
| | | | | Change-Id: I109f46892aed2f6024459812d24922b12358814d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix text decoration width roundingJiang Jiang2012-05-301-2/+1
| | | | | | | | | | | | | | width passed in qreal should be set with setWidthF instead of setWidth, otherwise the fractional part is lost. Also remove the raster paint engine hack that has been removed in Qt 4.8, it's no longer needed. This fixed the drawUnderline and drawRightToLeft auto tests in tst_qglyphrun. Change-Id: Iace46fc27ff156c07fb4d08a145269fad36e9fdb Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QtGui: remove \link usagesGiuseppe D'Angelo2012-05-291-2/+2
| | | | | Change-Id: Ib8cca14a8fa35fbc631bfea9b4873225eac3677f Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qpa api: replace QPA headers with something more benignGirish Ramakrishnan2012-05-221-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current 'we mean it' headers are considered too aggressive for QPA. Replaced using the following script. for file in `find -type f -name "qplatform*.h" -and -not -name "*_p.h"`; do LINE_NO_1=`grep -n -m 1 "W A R N I N G" $file | awk -F ':' '{print $1}'` LINE_NO_2=`grep -n -m 1 "We mean it." $file | awk -F ':' '{print $1}'` if [ -z "$LINE_NO_1" ]; then LINE_NO_1=`grep -n -m 1 "#define " $file | awk -F ':' '{print $1}'` LINE_NO_2=$((1+$LINE_NO_1)) else LINE_NO_1=$(($LINE_NO_1-2)) LINE_NO_2=$(($LINE_NO_2+2)) fi head -n $LINE_NO_1 $file > $file.new cat >> $file.new <<EOF // // W A R N I N G // ------------- // // This file is part of the QPA API and is not meant to be used // in applications. Usage of this API may make your code // source and binary incompatible with future versions of Qt. // EOF tail -n +$LINE_NO_2 $file >> $file.new mv $file.new $file done Change-Id: I8a974c9bf8942647b7ad950afb372c1f738aa725 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add AVX support for the painting and image code.Thiago Macieira2012-05-225-1/+153
| | | | | | | | There are no new routines, this is just the old SSE2 and SSSE3 code compiled in AVX mode, meaning the instructions use the VEX prefix. Change-Id: I79a8bfaf6b30a050618db899f5a3bbc220449f0b Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Clean up some QT_HAVE_xxx macros in qcompilerdetection.hThiago Macieira2012-05-181-3/+3
| | | | | | | | | | | | | | We no longer have code doing MMX or 3dNow! on Qt 5, so nothing defines those macros. If nothing defines them, we don't need to undef them. Note that the SSE case is a mislabel: the old "SSE" code on Qt 4 wasn't real SSE, it was MMX with some instructions added at the same time as SSE was added. It's MMX that Windows 64 doesn't support. As for QT_HAVE_ARMV6, this macro is replaced by the sub-arch detection in qprocessordetection.h. Change-Id: Ic3b00e1533e6b4cea32ba7824233de0a5c0fb32b Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* MIPS DSPR2 optimization of routine fetchUntransformedRGB16Damir Tatalovic2012-05-163-0/+92
| | | | | | | Change-Id: I109deb969009214c4d81677e127f50120443acd2 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix QPA files inclusion headersGirish Ramakrishnan2012-05-151-3/+3
| | | | | | | find . -name "*.h" | xargs sed "s/^#\(.*\)_QPA_H/#\1_H/" -i Change-Id: Ifa96f8cfcb67070a961c7e5f05719b82653a1174 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix font engine dependent text transformationJiang Jiang2012-05-111-1/+4
| | | | | | | | | The font engine used in supportsTransformation() should be the same as the one used in drawCachedGlyphs. If it's a multi font engine we should check the primary font engine inside it. Change-Id: I384aab3c58edfe2e7ae6fe7fe96bef766053d3ef Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
* Doc: Fix \sa usageMarius Storm-Olsen2012-05-118-91/+57
| | | | | | | | | Ensure comma between elements (757 missing), single space and curly- braces around title elements, etc. Change-Id: Id16c3fda7fc47a12a0682f8720214f4990609a97 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Merge branch 'docs-refactoring' into masterMarius Storm-Olsen2012-05-109-61/+61
|\ | | | | | | Change-Id: Iebd1966abace3cdf7f9428dcfc1ded5b124ab113