summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
Commit message (Collapse)AuthorAgeFilesLines
* Optimized blur / drop shadow effects for the GL 2 paint engine.Samuel Rødal2009-12-142-0/+23
| | | | | | | | | Do the blur in half the resolution in software and then upload the result as a texture and smooth-scale it on the GPU. This leads to stable and decent performance regardless of the blur radius, and simplifies the implementation quite a bit. Reviewed-by: Bjørn Erik Nilsen
* Determine QPrinterInfo's supportedPaperSizes on demand.David Faure2009-12-141-21/+29
| | | | | | | | | | | | | | | | The paper size determination requires a cupsGetPPD(), which can be a slow HTTP download. So doing it on demand makes QPrinterInfo::defaultPrinter() much faster, because it doesn't actually need the paper sizes at all. Before this fix, it was requesting the PPD file of every known CUPS printer, every time it was called. My battery of unittests for code that uses QPrinter went from 19 minutes when the cups print server is switched off, to 13 seconds! This fix also removes some code duplication, which is always nice. Task-number: 232664, QTBUG-3033 Reviewed-by: Trond
* Added vg to the performance section of the QPainter docsGunnar Sletta2009-12-141-0/+6
|
* Fixed spelling in docsGunnar Sletta2009-12-141-6/+6
|
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6Gunnar Sletta2009-12-116-8/+9
|\
| * Clean up the QFontEngine glyphcaching code to not crash and be more tidyGunnar Sletta2009-12-101-2/+2
| | | | | | | | Reviewed-by: Eskil
| * Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6Gunnar Sletta2009-12-093-0/+6
| |\
| | * Compile with QT_NO_DEPRECATEDOlivier Goffart2009-12-093-0/+6
| | | | | | | | | | | | | | | | | | | | | uses of QT_DEPRECATED must be protected by #ifdef Task-number: QTBUG-6649 Reviewed-by: João Abecasis
| * | Fix crash when rotating cleartype text under gl engine.Gunnar Sletta2009-12-091-4/+1
| | | | | | | | | | | | Reviewed-by: Eskil
| * | Don't assert on valid math in qbezierGunnar Sletta2009-12-091-2/+0
| |/
* | Initial documentation for the performance characteristics of QPainter.Gunnar Sletta2009-12-111-0/+78
|/ | | | Reviewed-by: Tom
* Fix possible off-by-one inconsistency against system look and feel whenEskil Abrahamsen Blomfeldt2009-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | drawing vertically aligned text When text is drawn in a font which has an odd-numbered height and it's vertically aligned in a rectangle which has an even-numbered height (or vice versa) we have to round the y-position, as the backend cannot position the text in subpixels. The y-position in this case will be at half a pixel and we can either round it up or down without increasing the size of the error. In Qt 4.5, the font height would be reported as one higher than what it actually was. Therefore, in many widgets such as comboboxes, we would appear to round the y-position down when faced with this issue. This is apparently also what Windows does, probably because most latin fonts have more glyphs extending into the maximum descent than the ascent. In Qt 4.6, the font height bug was fixed, and since we use qRound() we now round half-pixels up, thus moving all the text faced with this issue one pixel down. This looks odd and inconsistent, both with the platform look and feel and with older versions of Qt. The patch reverts to the old look and feel by rounding the half pixels down rather than up for the particular case in question. Task-number: QTBUG-6578 Reviewed-by: Samuel
* Merge commit 'c0b81480b2909b18ac15bdd124a562ae005c2f41' into origin-4.6Olivier Goffart2009-12-041-1/+1
|\
| * Fixes transformation problems with QGraphicsProxyWidget.Yoann Lopes2009-12-021-1/+1
| | | | | | | | | | | | | | | | | | In the paintEvent of the widget used in a QGraphicsProxyWidget, the worldMatrix was wrongly used by the painter instead of the deviceMatrix. Similar problem in the WindowsXP Style, the worldMatrix was used instead of the deviceMatrix for determining if the widget is transformed (reviewed by eblomfel). Task-number: QTBUG-5939 Reviewed-by: bnilsen Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* | Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2009-12-033-7/+25
|\ \ | |/
| * Merge commit 'oslo-staging-2/4.6' into upstream/4.6Olivier Goffart2009-12-023-7/+25
| |\
| | * Added caching of vectorpaths to the GL paint engine.Gunnar Sletta2009-12-012-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first time a path is drawn we call makeCachable on the path, which means that if it is drawn again, we start caching it. This is a bit of a trick to avoid caching paths that are drawn once and discared while at the same time cache paths that are reused automatically. The GL engine owns the vertex information and is responsible for cleaning it up. If the vectorpath is destroyed first, it will call the cleanup function. if the engine dies first, we still require some hooks to clean up the cache in the path. More to come. When VBO's are used, these will be a leaked if the path is destroyed after the engine. Reviewed-by: Samuel
| | * Fixed square root of negative number in drawTextItem().Kim Motoyoshi Kalland2009-11-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed potential bug where you could end up taking the square root of a negative number in drawTextItem() in the raster and OpenGL paint engines. Task-number: QTBUG-6327 Reviewed-by: Trond
* | | Fix a documentation typo.Christian Kamm2009-11-301-1/+1
|/ / | | | | | | Reviewed-by: Samuel Rødal
* | Fixed build on S60 and WinCEThorbjørn Lindeijer2009-11-301-1/+1
| | | | | | | | | | Since qreal is a float on these targets, it was having trouble picking the right version of qMax.
* | Merge remote branch 'staging/4.6' into 4.6Oswald Buddenhagen2009-11-271-32/+60
|\ \ | |/ |/|
| * Improved and optimized the WaveUnderlineThorbjørn Lindeijer2009-11-261-32/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The WaveUnderline used to be a series of 180 degree arcs, that didn't always align very well between different text items and that could be clipped at the bottom since the font height got reduced. Now it uses quad beziers so that it is more like a sinus curve, and the alignment and clipping issues have been fixed. The painting of the WaveUnderline has been optimized using QPixmapCache. A 100 pixels wide sample of the wave is now cached as a pixmap and repeated to draw the WaveUnderline. This is an order of magnitude faster than rasterizing a QPainterPath. The QPlainTextEdit needs to set the brush origin since it draws the text items in local widget coordinates, rather than relying on a painter translation like the QTextEdit. Done with mae.
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into ↵axis2009-11-261-0/+2
|\ \ | | | | | | | | | 4.6-staging2
| * | Fixed crash when scrolling with deleted backingstoreJanne Koskinen2009-11-251-0/+2
| |/ | | | | | | | | | | | | | | | | | | In Symbian we save memory by deleting widget backingstore from non-visible windows. 12-key FEP is fullscreen and causes the backing store to be deleted but still continues to scroll the view to show current caret position in focused lineedit control. Task-number: QTBUG-5922 Reviewed-by: Jason Barron
* | Fixes rendering issues when rendering a QWidget to PDF with WindowsXP Style.Yoann Lopes2009-11-241-1/+1
|/ | | | | | | The problem was that the images added to the PDF were not clipped to the expected area. Task-number: QTBUG-3412 Reviewed-by: Trond Kjernaasen
* Ran the script utils/normalizeOlivier Goffart2009-11-181-1/+1
| | | | Over src/ tools/ examples/ and demos/
* Merge upstream/4.6 into oslo-staging-2Olivier Goffart2009-11-171-9/+9
|\
| * Merge oslo-staging-2/4.6 into upstream/4.6Olivier Goffart2009-11-172-6/+3
| |\
| * \ Merge remote branch 'staging/4.6' into 4.6Simon Hausmann2009-11-171-9/+9
| |\ \
| | * \ Merge commit 'upstream/4.6' into 4.6Bradley T. Hughes2009-11-131-1/+1
| | |\ \
| | * | | doc: Removed duplicate qdoc.Martin Smith2009-11-131-10/+1
| | | | |
| | * | | doc: Fixed typo.Martin Smith2009-11-131-4/+0
| | | | |
| | * | | doc: Changed numColors() to colorCount() in the doc.Martin Smith2009-11-131-5/+18
| | | | |
* | | | | Warning FixesOlivier Goffart2009-11-171-4/+0
| | | | |
* | | | | Fix pixel alignment of glyphs when using raster engine on Mac CocoaEskil Abrahamsen Blomfeldt2009-11-171-1/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The left bearing of the glyph has to be rounded before truncated, otherwise the subpixel positioning of the glyph will be lost. The visible consequence of this was on Mac Cocoa where certain pairs of glyphs would get an extra pixel of space between them when running with graphics system raster. With small fonts it would look pretty bad. Task-number: QTBUG-5430 Reviewed-by: Trond
* | | | Fixing merger errors.Aleksandar Sasha Babic2009-11-161-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing some unreferenced variables that were left overs after revert&merge operation. Reviewed-by: Kim Motoyoshi Kalland
* | | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6Gunnar Sletta2009-11-161-1/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into ↵axis2009-11-131-1/+1
| |\ \ \ | | | | | | | | | | | | | | | 4.6-staging2
| | * | | Fix MWC warningShane Kearns2009-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | Reviewed-by: Trust Me
* | | | | Fixed double precision problems in pdf printingGunnar Sletta2009-11-161-3/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Increased the precision of the output to 9 decimals. Not ideal but better than just 6. Reviewed-by: Trond
* | | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6Gunnar Sletta2009-11-133-10/+17
|\ \ \ \
| * \ \ \ Merge commit upstream/4.6 into oslo-staging-2/4.6Olivier Goffart2009-11-135-4/+16
| |\ \ \ \ | | |/ / / | |/| | / | | | |/ | | |/|
| | * | Merge oslo-staging-2/4.6 into upstream/4.6Olivier Goffart2009-11-131-1/+1
| | |\ \ | | | |/ | | |/|
| * | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into ↵axis2009-11-122-9/+16
| |\ \ \ | | |_|/ | |/| | | | | | 4.6-staging2
| | * | Revert "Using qreal more consistently in code (prevent misuse of double)"Aleksandar Sasha Babic2009-11-1119-334/+317
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 676780d515cedca85829ae962e4f501c5e5b6581. Conflicts: src/gui/painting/qblendfunctions.cpp
| | * | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Shane Kearns2009-11-1012-20/+47
| | |\ \
| | * \ \ Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6-s60axis2009-11-099-98/+159
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qblendfunctions.cpp
| | * | | | Using qreal more consistently in code (prevent misuse of double)Aleksandar Sasha Babic2009-11-0619-313/+338
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to force use of qreal where possible. This can lead to better performance on platforms where qreal -> float (i.e. ARM). To achieve this we: 1. changed from 'double' to 'qreal', where justified 2. using qreal() to intialize constants, where justified 3. adding helper functions that are overloaded for qreal like qAtan2(), qAcos(), qFabs() ... 4. defining QT_USE_MATH_H_FLOATS for Symbian platform In addtion we used opportunity to improve code with some small things 5. converting divisions to multiplications (i.e. '/ 2.0' -> '* qreal(0.5)') 6. defining new constants (i.e. 'Q_PI / 180.0' -> 'Q_PI180') 7. declaring variables as 'const', where justified Reviewed-by: Andreas Aardal Hanssen Reviewed-by: Gunnar Sletta Reviewed-by: Jan-Arve Reviewed-by: Kim Motoyoshi Kalland Reviewed-by: Alessandro Portale Reviewed-by: Janne Koskinen
| | * | | | Binary compatibility of Symbian ARMv5 and ARMv6 buildsShane Kearns2009-11-061-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ARMv6 atomics where available Use OS atomics otherwise Integrate ARMV6 atomics to Symbian builds Use compiler defined macros to detect if ARMv6 instructions are available This defines the QT_HAVE_ARMV6 macro, replacing the way it was defined by the Symbian build system previously in qpainting.pri. qatomic_symbian now uses qatomic_arm or qatomic_armv6 automatically Port armv6 atomics to implement generic atomics interface The inline atomics are not inlined when we build for thumb using RVCT. So there is no performance improvement of using the "inline" versions vs a shared version called through a function call. The generic atomics interface is good for binary compatibility, as the same symbols are exported in all versions now. Changed the fallback generic atomics implementation from the unix one to a symbian specific one using RFastLock (identical code to the windows generic atomics, except for RFastLock replaces Win32 CRITICAL_SECTION) Note: GCCE atomics still need porting Tell git to ignore .lst listing files (produced by sbs/abld listing) ARMv6 support for GCCE compiler and fallback implementation using OS When building corelib with GCCE and -march=armv6, QT_HAVE_ARMV6 will be defined. This patch adds copies of the asm functions in GCC syntax. When building for the Symbian emulator, or ARMv5, then Symbian OS atomic functions are used as a fallback - these are more efficient than the unix atomics, and don't require data import (which the ARMv5 atomics use, but the OS loader doesn't support fully) Symbian OS functions are always used for QBasicAtomicInt::ref / deref, because these are faster than the generic function in all cases. They are machine coded for ARMv6, and are used internally by RFastLock. Reviewed-By: axis Reviewed-By: Brad
| * | | | | Fix warningsThierry Bastian2009-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Trust Me