summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
Commit message (Collapse)AuthorAgeFilesLines
* Prefer Q_CHECK_PTR to q_check_ptrJoão Abecasis2010-08-191-1/+2
| | | | | | | | | | | With the macro version we get proper debug output (with __FILE__, __LINE__ annotations) when compiling with -no-exceptions and !QT_NO_DEBUG. All changes in this patch affect assignment to local variables, where the order of assignment versus actual pointer check is not important. Reviewed-by: Olivier Goffart
* Fix nasty copy-paste bug in fetchTransformedBilinear()Paul Olav Tvete2010-08-171-2/+2
| | | | | | Introduced in commit 0d7e68391 Reviewed-by: Samuel
* Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2Gunnar Sletta2010-08-1711-233/+206
|\
| * Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-08-164-62/+31
| |\ | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix how subpixel positions are intepreted in an aliased grid.
| * \ Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-08-1311-233/+206
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qpainter.cpp src/gui/text/qtextengine.cpp tests/auto/qimage/tst_qimage.cpp tests/auto/qpainter/tst_qpainter.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf
| | * | Destroy the old runtime system only when existing pixmaps were migrated.Michael Dominic K2010-08-121-1/+3
| | | | | | | | | | | | | | | | | | | | Merge-request: 2448 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| | * | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-08-121-73/+67
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Fix some #ifdefs to compile for a specific combination of featuress that was previously unsupported update Russian translations for Qt and tools Updated Slovenian translations for Qt 4.7 doc: The QML Qt element was missing from the documentation. 64-bit versions of PREMUL, BYTE_MUL and INTERPOLATE_PIXEL_256 QXmlStreamReader: avoid unnecessary detaching QSslCertificate: support expiration dates > 2049 Doc: Fixing typo Doc: Fixing bug involving header misplacement in Creator style qdoc: Added list of all members (including inherited) page to QML elements. qdoc: Ensured that text is encoded correctly. qdoc: Fixed non-well-formed markup. Doc: Fixed typo in a shortcut string. Remove useless QString::clear() from QSharedData example snippet. Move note on connectToBus() not actually being able to reconnect to Doc: Added more license information.
| | | * | 64-bit versions of PREMUL, BYTE_MUL and INTERPOLATE_PIXEL_256Andreas Kling2010-08-111-73/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Corrected and enabled the 64-bit versions of these three functions. Speed improvements (tested on an i7): BYTE_MUL : 104.7% INTERPOLATE_PIXEL_256 : 13.2% PREMUL : 13.1% Reviewed-by: Samuel Rødal
| | * | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-08-104-47/+80
| | |\ \ \ | | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (24 commits) Add text decoration support to QStaticText Fix QString::arg: When specifying %L1, the group separator would be added even if the local specify QLocale::OmitGroupSeparator QtDeclarative: get rid of warnings in public header doc: Clarify documentation of QStaticText Fix scrollbar randomly popping up in QPlainTextEdit Remove the definition of QT_HAVE_NEON from qt.prf Use the fast Neon conversion for converting colors of jpeg images. Do the conversion from RGB888 to RGB32 using Neon Move the build of Neon file from painting.pri to gui.pro QSharedPointer documentation: specify that it is not safe to operate on the same object in different threads compilation with QT_NO_DEPRECATED Test we do not have compiler warnings in our headers with more options QStyleSheet documentation: QMenu's tear-off is styled with ::tearoff Doc: Fixed qdoc warnings. Fix QTextEngine overflow caused by extremely long text Replace the SSE prologues by a macro QDom: Do not crash on "<a:>text</a:>" Doc: Fixed typo. Doc: Fixed QML documentation errors. Doc: Merged in some of Thomas Zander's suggestions. ...
| | | * | Add text decoration support to QStaticTextJiang Jiang2010-08-101-13/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original code path of QStaticText does not include decoration drawing, this patch generalized the drawTextItemDecoration() function to draw decoration for drawText(), then use that to draw decoration for QStaticText. A helper function called drawDecorationForGlyphs() is made to allow easier extension for direct glyphs drawing support. Task-number: QTBUG-12121 Reviewed-by: Eskil
| | | * | Move the build of Neon file from painting.pri to gui.proBenjamin Poulain2010-08-061-18/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the build operation of files using Neon from painting.pri to gui.pro. This will make easier to add Neon files in the future. Reviewed-by: Andreas Kling
| | | * | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-08-062-16/+6
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: QStyleSheet documentation: QMenu's tear-off is styled with ::tearoff Fix QTextEngine overflow caused by extremely long text Replace the SSE prologues by a macro QDom: Do not crash on "<a:>text</a:>"
| | | | * | Replace the SSE prologues by a macroBenjamin Poulain2010-08-052-16/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the code of the SSE prologue by a macro to avoid copying the prologue everywhere. Reviewed-by: Andreas Kling
| | * | | | Pending surface might not get destroyed if no flush() happensJani Hautakangas2010-08-092-15/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in between graphics system change. This patch ensures that all old surfaces are destroyed before new graphics system is activated. Reviewed-by: Jason Barron
| | * | | | Use ARGB32 premultiplied backing store format in Symbian^3Jani Hautakangas2010-08-061-4/+8
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raster paint engine for translucent windows. Task-number: QTBUG-12710 Reviewed-by: Jason Barron
| | * | | Remove the memory tracking attempt from the runtime graphics system.Jason Barron2010-08-052-87/+3
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been decided that this logic will not be used by anyone at the moment so let's remove it. This removes an exported (although private) virtual function so breaks binary compatiblity for plugins built with previous versions. Reviewed-by: Jani Hautakangas
| | * | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-08-043-1/+36
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fixed crash in concentric circles example QDeclarativeDebug: use QueuedConnection in the packet protocol Implement comp_Source with SSE2 when there is a const alpha
| | | * | Fixed crash in concentric circles exampleGunnar Sletta2010-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that the qt_arcs... function will return point_count = 0 when the input rectangle is empty which it is in this case. Because we previously passed 13 there, were passing random memory to downwards in the pipeline, which caused problems. Task: http://bugreports.qt.nokia.com/browse/QTBUG-12516 Reviewed-by: mariusso
| | | * | Implement comp_Source with SSE2 when there is a const alphaBenjamin Poulain2010-08-042-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Atom, comp_Source is 280% faster with the SSE2 implementation. Reviewed-by: Andreas Kling
| | * | | Add support for -runtimegraphicssystem configure optionJason Barron2010-08-041-3/+6
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been requested that we provide a configuration option to specify the default "inner" graphics system that should be used when the runtime graphics system is in use. The argument specified to the option is written to the qconfig.h as QT_DEFAULT_RUNTIME_SYSTEM and this is used to instantiate the default graphics system that will be used by the runtime graphics system. Reviewed-by: Gunnar Sletta
| | * | Fix the rendering of lines with the X11 paint engineBenjamin Poulain2010-07-291-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the X11 paint engine, when rendering lines with float coordinates, the lines were one pixel off if the decimal was > 0.5. This fixes the WebKit bug https://bugs.webkit.org/show_bug.cgi?id=42248 Autotest by Yoann Lopes. Reviewed-by: Simon Hausmann Reviewed-by: Yoann Lopes Reviewed-by: Andreas Kling
* | | | fix breakages in qpainter autotests.Gunnar Sletta2010-08-171-5/+0
| |_|/ |/| |
* | | Fix how subpixel positions are intepreted in an aliased grid.Gunnar Sletta2010-08-164-62/+31
|/ / | | | | | | | | | | | | | | | | | | With this change we break with the traditional X11 and GDI way of rasterzing aliased polygons, but we become consistent across integer and sub-pixel positions. The new model uses the same rules as the antialised rasterizer which means that a primitive edge on 0.4 becomes 0.0, 0.5 becomes 1 and 0.9 becomes one, which is also in line with how one normally thinks of rounding rules.
* | Added QPainter::clipBoundingRect() which is significantly fasterGunnar Sletta2010-08-092-0/+57
| | | | | | | | | | | | | | than QPainter::clipRegion().boundingRect(). Task: http://bugreports.qt.nokia.com/browse/QTBUG-12618 Reviewed-by: Kim
* | Remove the use of deprecated qVariant*Olivier Goffart2010-08-061-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test directory untouched. This just apply those regexp: git grep -O"sed -i 's/qVariantValue</qvariant_cast</'" qVariantValue git grep -O"sed -i 's/qVariantSetValue(\([^&*\(),]*\), */\\1.setValue(/'" qVariantSetValue git grep -O"sed -i 's/qVariantSetValue *<\([^>]*\)> *(\([^&*\(),]*\), */\\2.setValue<\\1>(/'" qVariantSetValue git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*([^&*\(),]*)\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert git grep -O"sed -i 's/qVariantFromValue\( *[(<]\)/QVariant::fromValue\\1/'" qVariantFromValue git checkout src/corelib/kernal/qvariant* Rev-by: dev mailing list
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-07-2810-91/+323
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qapplication.cpp tests/auto/qfileinfo/tst_qfileinfo.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt.qdocconf
| * Remove an useless assert from comp_func_SourceOver_sse2()Benjamin Poulain2010-07-271-1/+0
| | | | | | | | | | | | | | The assert can never be true since const_alpha is unsigned. That line was triggering a warning on GCC. Reviewed-by: Olivier Goffart
| * Implement the composition mode "Plus" with SSE2Benjamin Poulain2010-07-273-5/+74
| | | | | | | | | | | | | | | | | | | | | | Implement the composition function for CompositionMode_Plus with SSE2. The macro MIX() can be replaced by a single instruction add-saturate, which increase the speed a lot (13 times faster on the blend benchmark). Reviewed-by: Olivier Goffart Reviewed-by: Andreas Kling
| * Clean the CompositionFunction tables of drawhelperBenjamin Poulain2010-07-277-77/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some instructions sets were defining partial table of composition functions. To work around that, qInitDrawhelperAsm() was resetting the composition function of QPainter::CompositionMode_Destination and anything above QPainter::CompositionMode_Xor. This was a problem because it makes it impossible to implement fast path for those composition mode. This patch export prototypes for the generic functions of each composition mode. The specialized implementations now define a complete table. Reviewed-by: Andreas Kling
| * Use aligned load for the blending of RGB32 over RGB32Benjamin Poulain2010-07-211-2/+12
| | | | | | | | | | | | | | | | Aligned load are faster than unaligned load. This patch add a prologue to the blending function in order to align the destination on 16 bytes before using SSE2. Reviewed-by: Kent Hansen
| * Remove the masking when computing qAlpha()Benjamin Poulain2010-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | After a bit shift of 24, only the alpha value should remain, so it is not necessary to mask the result. The documentation state QRgb works on a ARGB quadruplet, so the upper bits can be assumed to be zero in the cases when QRgb is 64 bits. This saves some time because qAlpha() is used for each pixel in the generic blend functions. Reviewed-by: Andreas Kling Reviewed-by: Kim
| * Corrected BLEND_SOURCE_OVER_ARGB32_WITH_CONST_ALPHA_SSE2Andreas Kling2010-07-181-4/+4
| | | | | | | | | | The unaligned prologue was processed without using the const alpha. Regressed with 9427b4c8f3b5.
| * Used aligned load and store when possible for the blending of ARGB32Benjamin Poulain2010-07-171-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | Unaligned load and store can be costly. This patch mitigate the problem by aligning the destination before using SSE2. The destination is aligned because it is used by load and store, while the source is only use by load. On Atom, the blending test is 7% faster for ARGB32. Re-pushing that patch, thanks to awesome policies... Reviewed-by: Andreas Kling
* | Fix the CGContext on Mac OS X. Sometimes we gotFabien Freling2010-07-221-12/+4
| | | | | | | | | | | | | | | | a bad context, resulting in wrong paintings. It also unify the raster engine behavior among platforms. Reviewed-by: Jason Barron
* | Merge remote branch 'origin/master' into qt-master-from-4.7Thiago Macieira2010-07-152-15/+61
|\ \ | | | | | | | | | | | | Conflicts: src/opengl/qgl_p.h
| * | Support glyphs that are wider than default width in texture glyph cacheEskil Abrahamsen Blomfeldt2010-07-151-2/+6
| | | | | | | | | | | | | | | | | | We need to reserve space for the widest possible glyph in the font Reviewed-by: Kim
| * | Support text decoration in QPainter::drawGlyphs()Eskil Abrahamsen Blomfeldt2010-07-141-13/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to support text decorations (overline, underline and strikeout) in QPainter::drawGlyphs(), we need to call drawTextItemDecoration() from this function. To support this, it has been generalized to no longer require a QTextItemInt. We also need to propagate the decoration attributes of the font from QTextLayout to QGlyphs, since this is not part of the QFontEngine. Task-number: QTBUG-12122 Reviewed-by: Kim
* | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-07-1517-363/+702
|\ \ \ | |/ / |/| / | |/ | | Conflicts: src/gui/kernel/qapplication.h
| * SSE2 implementation of convert_ARGB_to_ARGB_PM_inplace for QImageJohn Brooks2010-07-072-10/+8
| | | | | | | | | | Merge-request: 725 Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
| * Moved primitive SSE2 painting utilities to qdrawingprimitive_sse2_p.hJohn Brooks2010-07-073-157/+218
| | | | | | | | | | Merge-request: 725 Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
| * Move logic for building SIMD extensions to gui.proJohn Brooks2010-07-071-145/+7
| | | | | | | | | | | | | | | | Enables SIMD files to be built outside of painting.pri by appending files to SSE_SOURCES etc. Merge-request: 725 Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
| * Warn when drawPixmapFragments is called with an invalid source rectAndy Shaw2010-07-051-0/+9
| | | | | | | | | | | | | | | | | | | | When drawPixmapFragments() is called with fragments that has invalid source rects in it, then usually it causes the pixmap drawn on screen to appear corrupted. However it has been reported that a crash can occur (not reproducable locally) so by adding a warning in debug mode only means that this can hopefully be caught at development time. Reviewed-by: Trond
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-07-031-8/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Consolidate zlib configuration redundancy Fixed whitespace formatting Fix incomplete support for built-in jpeg, mng, tiff and gif handlers Split image handler plugin project files No explicit link to zlib/jpeg for system mng/tiff Removed stray line continuations Long live else! qdoc: Added a solution for creating tables of contents for manuals. Doc: Fixed markup. Fixed size hint for combo box on windows
| | * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-07-021-8/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Consolidate zlib configuration redundancy Fixed whitespace formatting Fix incomplete support for built-in jpeg, mng, tiff and gif handlers Split image handler plugin project files No explicit link to zlib/jpeg for system mng/tiff Removed stray line continuations Long live else! qdoc: Added a solution for creating tables of contents for manuals. Doc: Fixed markup. Fixed size hint for combo box on windows
| | | * Consolidate zlib configuration redundancyMark Brand2010-07-021-8/+1
| | | | | | | | | | | | | | | | | | | | Merge-request: 715 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
| * | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-07-031-2/+2
| |\ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Hide some more files from git-status. Fixed Qt symbian/linux-armcc mkspec when configured with -qtlibinfix. Fixed symbian/linux-armcc mkspec when configured with -qtlibinfix. Fixed deployment locations for various profiles. Added a top-level runonphone target for Qt and QtWebKit. QS60Style: Simplify QMenu drawing QS60Style: Remove gap from QProgressDialog ColorDialog is incorrectly positioned Support for "deploy" make target in Symbian qtguiu.def merge conflict fix Fix for include "private/qt_s60_p.h" in non-symbian builds Making orbit input methods work with Qt apps with -no-s60 Using the remaining valid data to construct the QTime object when msec parsing failed. QProgressDialog text is too close to dialog border fix for broken input method loading Avkon Removal DEF file updates Stub version of QS60Style Avkon removal configured with -no-s60 QFileDialog broken in landscape in N8
| | * | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7mread2010-07-0215-127/+543
| | |\ \ | | | |/ | | | | | | | | | | | | | | | | Conflicts fixed: src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def
| | * | Avkon removal configured with -no-s60mread2010-07-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avkon dependencies can be configured out with the -no-s60 configure flag, conversely Qt on Symbian will use Avkon if -s60 is configured. These changes are intended to keep or introduce binary compatibility between the s60 and no-s60 configurations. To do this, it has been necessary to introduce stub equivalents of the CAknAppUi related classes into the no-s60 configuration, and override all Avkon framework virtual functions in the QS60Main... classes. Other than that, these changes are mostly just correcting the use of the Q_WS_S60 flag so that it only refers to Avkon dependencies. Reviewed-by: Sami Merila
| * | | Don't do alpha/opaque check which might cause a conversion and later pointer ↵Michael Dominic K2010-07-021-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | not-matching. Merge-request: 724 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * | Fixed bug in drawTiledPixmap when width of pixmap matches target rect.Samuel Rødal2010-07-011-1/+2
| | | | | | | | | | | | | | | | | | | | | qt_memconvert's duff's device implementation assumes that count is > 0, if count is 0 it will still blit eight pixels. Reviewed-by: Trond