summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
Commit message (Collapse)AuthorAgeFilesLines
...
* blitter: Use CapabilitiesToStateMask as a class memberHolger Hans Peter Freyther2012-01-271-30/+29
| | | | | | | | | | Move the bit helper functions into CapabilitiesToStateMask as they are only used in this class, allocate the class as part of the QBlitterPaintEnginePrivate, shorten the name as well. Change-Id: Ifab7905d7e240b7c9f08ac5e3421a632b6fe2249 Based-On: If22ddd117a9789cd98edb08f23fd0ffabb17d5a5 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* blitter: Style changes to the codeHolger Hans Peter Freyther2012-01-271-77/+64
| | | | | | | | Attempt to follow Qt style guidelines. Change-Id: I53d3e93eab615e2b8b705698eb87a8d2636723ec Based-On: I3298c8d41d40ab5b0153a33d44b1b607a2edca8e Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Fix set/paperSize(QPrinter::PaperSize) on MacAndy Shaw2012-01-251-2/+2
| | | | | | | | | | | | | This fixes the paper size setting on Mac as it would not return the same paper size that was set with setPaperSize() when calling paperSize(). Test is included. Task-number: QTBUG-20882 Change-Id: Ib0064dd40de147d6db2424cdb31021e66894cc37 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Add a public API for releasing cached GPU resources on SymbianGareth Stockwell2012-01-252-0/+13
| | | | | | | | Task-number: ou1cimx1yyy964181 Change-Id: I2f24d1d0f988bfe029e24fd29d59e6421301b670 Reviewed-by: Jani Hautakangas <jani.hautakangas@nokia.com> Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
* Fix using custom paper sizes on MacAndy Shaw2012-01-131-3/+5
| | | | | | | | | | | | | | This solves the bug with using custom paper sizes on Mac, if a QSize was specified then with a Unit it would not respect this on Mac as it would not convert it correctly. Also paperSize() would return the wrong value. There is already a test for this in tst_QPrinter::testCustomPageSizes() Task-number: QTBUG-18723 Change-Id: I47c0cf2dd48ea3e0daa3b748f337ec38714aaf34 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-11186-186/+186
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging into ↵Qt Continuous Integration System2011-12-224-4/+4
|\ | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging: Symbian: Fix exporting and importing of some functions for autotests Symbian: Fix SRCDIR usage in qlayout autotest. Symbian: Fix qcssparser autotest Symbian: Fix qscriptextensionplugin autotest
| * Symbian: Fix exporting and importing of some functions for autotestsMiikka Heikkinen2011-12-214-4/+4
| | | | | | | | | | | | | | | | | | Symbian builds seem more strict about properly declaring exports than other builds, so added proper exporting and importing to some function declarations. Task-number: ou1cimx1#957184 Reviewed-by: mread
* | [blitter] Fix memory leak in the blitter paintengineHolger Hans Peter Freyther2011-12-131-5/+5
|/ | | | | | | | | | | | The raster engine and the capabilities were leaked, use the QScopedPointer to prevent that from happening. Cherry-picked-from: qtbase:d5f12b898b8480c891382c54672422c50218751a. Change-Id: I31ba0117280b48ad942fbb638fb151ccb7b34385 Merge-request: 1492 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Merge remote-tracking branch 'qt-qa-review/master'Sergio Ahumada2011-11-261-1/+1
|\
| * Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-qa-teamQt Continuous Integration System2011-08-221-1/+1
| |\ | | | | | | | | | | | | * 'master' of git://scm.dev.nokia.troll.no/qt/qt-qa-team: Doc: Fixing typo
| | * Doc: Fixing typoSergio Ahumada2011-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | Reducing the amount of spelling errors from NBN. Change-Id: I9b228bb95b4a757cff57595125009e70b0097d86 Reviewed-by: Rohan McGovern
* | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging into ↵Qt Continuous Integration System2011-11-244-3/+228
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-staging: Fix Linux-Symbian parallel cross-compilation configure step Symbian: don't merge native clipboard, overwrite. Surviving out of memory in Qt Quick app Export QtGui functions required by QtMultimediaKit backend fix bearer crash Fix alignment of non-wrapped richtext QML Text elements.
| * | | Surviving out of memory in Qt Quick appmread2011-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QtQuickPlayground app contains a version of samegame which allow the user to edit the code. By setting the ball size to 8, the app can run out of memory. This leaves it in a pretty bad state. But apps on Symbian shouldn't crash due to OOM and should allow some operation. This change fixes the immediate OOM crashes in declarative, gui and corelib. It shows warning dialogs which explain what has gone wrong and leaves the app in a state that can be exited cleanly from the Symbian task list. Task-number: QT-5319 Reviewed-by: Shane Kearns Reviewed-by: Gareth Stockwell Reviewed-by: Martin Jones
| * | | Export QtGui functions required by QtMultimediaKit backendGareth Stockwell2011-11-183-2/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order for video rendering to work, the Symbian QtMultimediaKit backend needs access to QtGui functionality which is not exposed via public interfaces, namely: * QSymbianControl::setIgnoreFocusChanged(bool) * Setting custom painting modes, which control how content is blitted from the backing store into the native window surface * Requesting notification when Qt drawing starts and stops, so that the backend can ensure this does not interfere with video rendering. Until now, this has been achieved by the backend including private QtGui headers. If these headers are not present in the environment in which QtMobility is compiled, a warning is printed, telling the user that video / viewfinder rendering will not work correctly when the resulting binaries are installed. This patch adds a Symbian-specific public interface to QtGui, which exports the functionality above. Task-number: MOBILITY-747 Reviewed-by: mread
* | | | Allow setting the runtime graphicssystem via QT_DEFAULT_RUNTIME_SYSTEM.Robin Burchell2011-11-161-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful on some SGX boards, where each GL context locks a huge chunk into RAM, but we don't want to set the default runtime system to 'meego' as this requires certain EGL extensions. Merge-request: 2718 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | | | Partially revert "Set the graphics system name in the graphics system factory."Robin Burchell2011-11-161-2/+0
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This actually breaks runtime graphicssystem in all configurations as far as I can tell, but definitely in the following setup: -graphicssystem runtime -runtimegraphicssystem meego Qt creates the runtime graphicssystem, which then sees it should create a MeeGo GS instance. This then calls qgraphicssystemfactory::create("meego"), which was overwriting graphics_system_name (incorrectly!) Harmattan's Qt does not do this, and thus, is able to switch graphicssystems correctly. This partially reverts commit b595c2fbe0fa354190b713ef09dd1f348e22e2b6. Merge-request: 2718 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-doc-staging into ↵Qt Continuous Integration System2011-11-011-11/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-doc-staging: Missing icon in the designer documentation Fridge magnet example code snippet error qpaintdevice-qt3.html documentation errors QWebElement example missed information QSPlitter style-sheet example was invalid Errors in QSqlDriver::handle examples QGLColormap example was invalid QPointer made no mention of QWeakPointer Invalid links to http://developer.symbian.org QNetworkDiskCache documentation missed information QStyleSheet example used a property that is hidden. QList document referenced to non existing function QXmlQuery::bindVariable documentation bug Fix multiple typos in QLineF documentation. Qmake project file docs lacked information. Documentation error in SSL document Fix multiple typos in documentation. Fix for QVector::toList - code example documentation.
| * | | qpaintdevice-qt3.html documentation errorsartoka2011-11-011-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document instructed to user qApp->x11Info() to access x11Info in the examples. The QApplication doesn't have x11Info() -method, QWidget does. Changed the examples to use QWidget instead of QApplication. Task-number: QTBUG-18544 Merge-request: 2698 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* | | | Symbian - fix compile error when default configuredShane Kearns2011-10-181-3/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | New code assumed building with OpenGL/OpenVG, which is the production configuration, but not the default configuration Reviewed-By: Jani Hautakangas Task-Number: QTBUG-21996
* | | Merge remote-tracking branch 'qt/4.8'Sami Lempinen2011-10-142-16/+96
|\ \ \
| * \ \ Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-10-101-2/+3
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Fixes: libpng symbols exported from QtGui.dll on Windows omit unassigned (and too recent codepoints) from the text Normalization process Fixed broken window surface flush when depth is 24 and bpp is not 32.
| | * | | Fixed broken window surface flush when depth is 24 and bpp is not 32.Samuel Rødal2011-09-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some X servers use a compact representation of 24 depth visuals. In that case we can't use the shared memory or XPutImage paths, as Qt's RGB32 does not match the internal memory layout. Also fixed QPixmap::fromImage() to work in this case to prevent the red and blue channels from being swapped. Task-number: QTBUG-21754 Reviewed-by: Alberto Mardegan
| * | | | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-10-071-14/+93
| |\ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/getting-started/installation.qdoc doc/src/platforms/platform-notes.qdoc src/corelib/tools/qlocale_symbian.cpp src/gui/kernel/qwidget_p.h src/network/access/qnetworkaccesshttpbackend.cpp src/opengl/qgl.cpp src/plugins/bearer/symbian/qnetworksession_impl.cpp
| | * | | A patch for 'Fix to QtOpenGL crash'Jani Hautakangas2011-09-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EGL API was used also on non-EGL Symbian platforms which generated compile errors when compiling Qt on those platforms. This patch #ifdefs EGL usage correctly for EGL enabled platforms only. Reviewed-by: TRUSTME
| | * | | Fix to QtOpenGL crashJani Hautakangas2011-09-231-14/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exiting the native video recorder on Symbian and going back to Qt app which runs on opengl graphics system crashed on some devices because there was not enough GPU memory and also because low GPU mem device environment detection was flawed. This patch fixes 32MB GPU memory detection and adds wait/retrial to EGL surface creation if it fails. Task-number: QTBUG-21499 Reviewed-by: Laszlo Agocs
| | * | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2011-07-271-1/+0
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Remove a duplicate include line
| | | * | | Remove a duplicate include lineLiang Qi2011-07-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Build Qt 4.7 for Symbian on Mac/gcce again. Reviewed-by: Honglei Zhang
* | | | | | Converting from double to qreal in guimread2011-10-106-26/+26
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a number of places in QtGui where doubles were used in expressions due to the use of floating point constants in the code. Many of these constants are now constructed as qreal, removing the use of double operations where unneeded. These changes have been limited to constants that have exactly the same value whether double or float, to ensure that precision errors are not introduced. This should not affect any of the desktop platforms where qreal is double. On Symbian, where qreal is float, appropriate autotests have been run. Task-number: QTBUG-4894 Reviewed-by: Sami Merila
* | | | | Generate glyphs in un-transformed coordinate system.Samuel Rødal2011-09-091-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids rounding issues with very large coordinates. Task-number: QTBUG-21262 - QRasterPaintEngine & QFontEngineFT - fonts corrupted when scrolling to the bottom of long texts Reviewed-by: Eskil Signed-off-by: Aleksandar Stojiljkovic <aleksandar.stojiljkovic@nokia.com>
* | | | | Allocate 16-byte aligned memory independent of platform for raster pool.Samuel Rødal2011-09-091-37/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes crash on MIPS (see original merge request https://qt.gitorious.org/qt/qt/merge_requests/1366). Reviewed-by: Olivier Goffart
* | | | | Merge remote-tracking branch 'upstream/4.8'Sergio Ahumada2011-08-291-2/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tools/qdoc3/cppcodemarker.cpp
| * \ \ \ \ Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-teamaavit2011-08-241-2/+2
| |\ \ \ \ \
| | * | | | | Use CoreText for font rendering on uikit.Eike Ziller2011-08-241-2/+2
| | | | | | |
* | | | | | | Merge remote-tracking branch 'mainline/4.8'Oswald Buddenhagen2011-08-264-45/+53
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-08-243-38/+43
| |\ \ \ \ \ \ | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Spelling fix Fixed lost flushes in raster window surface. uikit: Use correct pixmap data format. Correctly position aliased lines with flat caps
| | * | | | | Fixed lost flushes in raster window surface.Samuel Rødal2011-08-221-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Occasionally we get regions with bounding rects outside the widget, so we need to take care to clip against both the native widget and the raster surface's image rect. Task-number: QTBUG-17813 Reviewed-by: Gunnar Sletta
| | * | | | | Correctly position aliased lines with flat capsLars Knoll2011-08-192-28/+32
| | | |_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code was mispositioning lines by half a pixel, as it added half a pixel offset and then rounded in addition. This submit fixes this and also removes certain artifacts when drawing rects at .5 pixel positions. Lance now doesn't show any significant differences to the 4.7 rendering anymore. Task-number: QTBUG-20199 Reviewed-by: Aavit
| * | | | | Doc: Fixed qdoc warnings.David Boddie2011-08-151-7/+10
| |/ / / /
* | | | | Replace 'i < len-1 && func(i+1)' by 'i+1 < len && func(i+1)'suzuki toshiya2011-08-183-4/+4
|/ / / / | | | | | | | | | | | | | | | | Merge-request: 1299 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* | | | Fixed compile error in qwindowsurface_qws.cpp.Samuel Rødal2011-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-20713 Reviewed-by: Jørgen Lind
* | | | Fixed regression introduced by 5842d19cf3dff37a85c.Samuel Rødal2011-08-031-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | We need a normalized rectangle. Reviewed-by: aavit
* | | | Fixed holes in border image drawing by introducing new API.Samuel Rødal2011-07-268-133/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When rasterizing two adjacent QRectFs it's important that the shared x or y-edges have the exact same coordinates, or there might be a hole or an overlapping pixel when they are rasterized. Since the drawPixmapFragments API was based on a center position and a scale, it can not be used for this purpose, as the in the situation of two horizontally adjacent rectangles the right edge of the left-most rect and the left edge of the right-most edge are computed differently. Thus rounding errors can cause them to not be equal, especially when there's also a scaling / translating painter transform involved. Thus, to not sacrifice performance, we need to introduce a new drawPixmapFragments API that's simply takes an array of target rectangles and an array of source rectangles. It should give a slight performance boost for the border pixmap use case as well, since there are less floating point multiplications / divisions involved. Task-number: QTBUG-19079 Reviewed-by: Kim
* | | | Get subpixel antialiasing again w/combo of raster and affine transformEskil Abrahamsen Blomfeldt2011-07-251-9/+3
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert part of hot fix 48ff7e5af99923396243940979d15d4ec2e2730c since it is no longer needed in Qt 4.8 due to the introduction of a separate code path for the FreeType case in drawCachedGlyphs(). This is also explained in the description for that commit. The consequence of the commit was that subpixel antialiasing would be turned off for all text drawn with a transformation and the raster engine. In the past this was not the case, it is however the case in several other paint engine, so the regression was deemed okay to hot fix the original problem. In Qt 4.8 the original problem has been fixed properly. Task-number: QTBUG-16205 Reviewed-by: Jiang Jiang
* | | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Liang Qi2011-07-141-2/+8
|\ \ \ | |/ / | | | | | | | | | | | | Conflicts: src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def
| * | Compensate for different rounding rule in CG engineJiang Jiang2011-07-121-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After we switched to fractional metrics, Core Graphics engine always put text at floored vertical postion, while underlines will be rounded after 0.75. Ceiling the underline position will make sure it will always leave the underline pixels given. Task-number: QTBUG-19959 Reviewed-by: Eskil
* | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-07-122-22/+20
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Fix compiler warning in qtextdocument.cpp Fix crash when app font is added Use truncate only for subpixel boundingBox x position Use more numerically robust algorithm to compute QBezier::pointAt(). Fix editable combobox style on Mac Revert 344a4dcfe and part of 93bce787 Fix raster subpixel positioning in Lion
| * \ \ Merge remote branch 'review/master' into stagingJiang Jiang2011-07-122-22/+20
| |\ \ \
| | * | | Use truncate only for subpixel boundingBox x positionJiang Jiang2011-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Lion, Core Text starts to return fractional values for x origin in the glyph bounding box. To get correct alignment we need to make it integer, it seems that round will cut certain pixels (x = 0.6 will be round to 1, then that glyph will be moved too much to the left in image glyph cache). Reverting 4297b85a appears to work fine on previous version of Mac OS X as well. This change will not affect Windows (DirectWrite) and FreeType font engines since they both return integer values for that. Reviewed-by: Eskil
| | * | | Use more numerically robust algorithm to compute QBezier::pointAt().Samuel Rødal2011-07-081-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QBezier::pointAt() could potentially return values outside the bezier's bounds, even when the bezier was a straight horizontal line. For example, with y = 0.5, it would produce y=0.5 or y=0.49999999999999 for different values of t, which when rounded cause jittering in a QML PathView. Task-number: QTBUG-17007 Task-number: QTBUG-18133 Reviewed-by: Kim