summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Continued work on the QML documentation.David Boddie2010-09-141-8/+7
|
* Allow Windows x64 to use SSE2 to speed up blendingliang jian2010-09-064-105/+229
| | | | | | | | | | | Windows 64 does not support MMX with MSVC. This is a problem with the way SSE is currently used because it rely on previous vector instructions being available. This patches fixes that by using the intended functions for SSE2 on Windows. Merge-request: 792 Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
* qdrawhelper: micro optimisation in fetchTransformBilinearOlivier Goffart2010-09-031-7/+7
| | | | | | move the -1 out of the loop Reviewed-by: Benjamin Poulain
* qdrawhelper: Remove blend_transformed_bilinear_argbOlivier Goffart2010-09-021-179/+4
| | | | | | | With the recent optimisation in fetchTransformedBilinear, the generic path is faster than the 'optimized' path Reviewed-by: Samuel
* Fix a crash when passing a null pixmap to QPainter::drawPixmapFragments().Trond Kjernåsen2010-09-011-1/+1
| | | | | Task-number: QTBUG-13331 Reviewed-by: Samuel
* Use NEON and preloading for 16 bit small / medium sized image blits.Samuel Rødal2010-09-014-4/+108
| | | | | | | | | | | | | | This gives a nice speedup for blitting of small and medium sized images by using preloading and avoiding function call overhead to memcpy for each scanline. For larger image widths memcpy becomes more efficient. Speedups of up to 40 % for 64 pixel wide images were measured. For image widths between 2 and 16 the speedup ranges between 12 % and 28 %. Task-number: QT-3401 Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
* Undefined SSE symbols when crosscompiling Qt on PPC.Benjamin Poulain2010-08-314-11/+2
| | | | | | | | | | Qt does not build on PowerPC when compiling for both x86 and PPC on Mac. The compiler is invoked only once for both architecture so the defines are there in order to get the optimized path for x86. Those defines needs to be removed from the compilation environment when the target is set to PPC by GCC. Reviewed-by: Kent Hansen
* Fix QStaticText with OpenGL1 engineEskil Abrahamsen Blomfeldt2010-08-301-1/+2
| | | | | | | | | Like OpenGL2 and OpenVG, the OpenGL1 paint engine also transforms text coordinates itself and does not require QStaticText to use device coordinates. Task-number: QTBUG-13228 Reviewed-by: Samuel
* qdrawhelper: backport the optimisations in fetchTransformBilinear from ↵Olivier Goffart2010-08-301-138/+257
| | | | | | | | | | | | | | | master to 4.7 This backport the following commits: e55b6a3 qdrawhelper: remove code duplication 0d7e683 qdrawhelper: optimize fetchTransformedBilinear 29ef46e Fix compilation with RVCT 6601458 qdrawhelper: Use SSE2 in fetchTransformedBilinear (when scalling up) 398ef0ca Fix nasty copy-paste bug in fetchTransformedBilinear() d585ece qdrawhelper: fix assert in fetchTransformedBilinear Reviewed-by: Benjamin Poulain
* Apparently QPen::brush() can't return a NoBrush for a NoPen.Trond Kjernåsen2010-08-272-6/+4
| | | | | | | | There are explicit tests in qdatastream for this. IMO it's wrong, wrong, wrong, but it's currently abused in the SVG module so we can't change it. Reviewed-by: Gunnar
* Calling QPen::brush() on a Qt::NoPen pen, should return QBrush::NoBrush.Trond Kjernåsen2010-08-261-0/+2
| | | | | | | | | This could cause some strange things to happen in our fallback code used for e.g. printing, since the brush might be valid and e.g. contain alpha values etc. Task-number: QTBUG-12263 Reviewed-by: Gunnar
* Revert "Refactor blend_transformed_bilinear to simplify the blend type checking"Olivier Goffart2010-08-261-67/+66
| | | | | | | | | This reverts commit d2089600ea247b5d6354e8eee4becf40802c4693. Reverting in order to avoid conflict in the master branch. We are going to consider backporting the changes to Qt 4.7.1 Reviewed-by: Benjamin Poulain
* Refactor blend_transformed_bilinear to simplify the blend type checkingBenjamin Poulain2010-08-251-66/+67
| | | | | | | | | | | The function blend_transformed_bilinear_argb() was checking the blend type at runtime for each pixel in order to clamp the coordinates. This code was duplicated in both branch of the function. This patch factorize the code by doing the clamping in a template function. Reviewed-by: Samuel Rødal
* Implement qt_memfill32 with Neon.Benjamin Poulain2010-08-253-0/+40
| | | | | | | | | | | This patch introduce a implementation of qt_memfill32 with the Neon instructions set from ARMv7. The loop is unrolled 1 time to get better performance. This implementation of memfill is 330% faster on the N900. Reviewed-by: Samuel Rødal
* Implement the composition mode Plus with Neon.Benjamin Poulain2010-08-255-22/+83
| | | | | | | | | On the benchmark tst_QPainter::compositionModes(), this patches gives the following improvements: -300x300:opaque: 390% -300x300:!opaque: 1085% Reviewed-by: Samuel Rødal
* Fix mispositioned text with QStaticText and OpenVG graphics systemEskil Abrahamsen Blomfeldt2010-08-241-2/+5
| | | | | | | | | | | The OpenVG paint engine, like the OpenGL2 paint engine, supports caching the untransformed glyphs and transforming them as they are drawn. Since we would pretransform the positions of the glyphs, the transformation would be applied twice, thus making the glyphs appear in the wrong location when the painter had a transform set. Task-number: QTBUG-13049 Reviewed-by: Gunnar
* Crash in QX11PaintEngine::drawPixmapCarlos Manuel Duclos Vergara2010-08-181-0/+2
| | | | | | | | | | We receive a pixmap as a const reference and then we convert it to an X11 pixmap. This conversion could fail for many reasons, however we were not looking at the result of this conversion. This patch was contributed by Christoph Feck from KDE. Task-number: QTBUG-12826 Reviewed-by: Samuel
* Revert "Fix the rendering of lines with the X11 paint engine"Samuel Rødal2010-08-181-10/+12
| | | | | | | | | | | | | | | | This reverts commit ebbab30af417dfbf3df47dec15c0e2f8d6a30fa6, which broke fill / outline consistency, and when trying to fix that by rounding the fill the same way that broke rendering in Creator. Unfortunately the X11 paint engine is too sensitive to changes, there have already been tons of patches to make it as consistent as possible. It's simply not possible to get the same rounding for both fill and outlines and at the same time have consistency between fill and outline (no holes or fill outside the outline), while using the integer based Xlib rendering API. Hopefully in 4.8 we'll switch to raster and the X11 paint engine will be a legacy. Reviewed-by: Trond
* Revert "Outline / fill inconsistency in X11 paint engine."Samuel Rødal2010-08-181-4/+4
| | | | | | This reverts commit ff405f5623d7ed18c881c097368e3e9afd2e9443. Reviewed-by: Trond
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-08-182-39/+13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Cocoa: revert parts of cc6dc0aeefde881a95f5fea2b26f2f3d7bdc6e15 Cocoa, Autotest: disable autotest that was added a bit premature make error messages consistent Add tests/benchmarks/README qgrayraster: Remove unnecessary indirection in QT_FT_Outline_Decompose Cocoa: add autotest to be more safe regarding child window stacking Fix compilation: QT_NO_TEXTSTREAM exclude QtXmlPatterns from the completeness assessment fix QMAKE_SUBSTITUTES with shadow builds Outline / fill inconsistency in X11 paint engine. Cocoa: parent windows shows on screen when they should be hidden Prevented Xorg crash in qtdemo when running corkboards example.
| * qgrayraster: Remove unnecessary indirection in QT_FT_Outline_DecomposeAndreas Kling2010-08-171-35/+9
| | | | | | | | | | | | | | | | | | Since this function is only used inside qgrayraster.c, we can call the gray_* functions directly instead of going through function pointers. This allows inlining trivial methods like gray_line_to() et al. Reviewed-by: Samuel Rødal
| * Outline / fill inconsistency in X11 paint engine.Samuel Rødal2010-08-171-4/+4
| | | | | | | | | | | | | | | | | | | | Change ebbab30af417dfbf3df47dec15c0e2f8d6a30fa6 broke outline / fill consistency in the X11 engine. Since the positioning of lines is more important we'll round the fill coordinates the same way. The bug was visible in the filltest.qps arthur test. Reviewed-by: Gunnar Sletta
* | Fix the blending of ARGB_PM image when using palignr to load the dataBenjamin Poulain2010-08-171-15/+5
| | | | | | | | | | | | | | | | | | | | The data loaded for the first were incorrect because the offset was incorrect. The correct offset should be up to the alignment point. Instead of trying to load a temporary array, we just move one vector further since we know reading there is always safe. Reviewed-by: Andreas Kling
* | Adjusted define stylingDonald Carr2010-08-171-3/+1
| | | | | | | | | | Adjusted multi-line define to single conjugated define in order to conform to the rest of the modified file.
* | Fixes QWS window decoration offset issuesUwe Rathmann2010-08-172-2/+13
| | | | | | | | | | | | | | | | | | | | When using OpenGL ES in conjunction with Qt/Embedded, Q_BACKINGSTORE_SUBSURFACES is defined and the subsequent code path shared between this define and QWS defines results in window decoration offset errors. Merge-request: 714 Reviewed-by: Donald Carr <donald.carr@nokia.com>
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-08-163-0/+275
|\ \ | |/ |/| | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Keyboard navigation regression in QTreeView Implement the general blending of ARGB32_pm with SSSE3 QtDeclarative debugging: Add an option not to stream the properties of an object.
| * Implement the general blending of ARGB32_pm with SSSE3Benjamin Poulain2010-08-163-0/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SSSE3 provides two tools to improve the blending speed over SSE2: -palignr -byte permutation The alignement is enforced on src and dst with palignr to always make aligned access. The extraction of the alpha mask is done with a byte permutation in order to save two instructions per cycle. On Atom, this patch gives between 0% (aligned src) to 10% of improvement (unaligned 4 and 12 bytes). On Core 2, this patch gives consistently 8% to 10% of improvement for every miss-alignment. Reviewed-by: Samuel Rødal
* | qgrayraster: Speed up rendering of small cubic splines.Andreas Kling2010-08-161-20/+16
|/ | | | | | | | | Based on these upstream freetype2 commits: 7fb3ef64a24489189113f693696eaf935f500c3f e419f48b40a746465a6c8e1d446b407b8677bfed Reviewed-by: Samuel Rødal
* 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
* 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.