summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
Commit message (Collapse)AuthorAgeFilesLines
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-24179-3029/+3029
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Doc: Fixed qdoc warnings.David Boddie2011-05-232-10/+9
|
* Remove warning from QColor::setNamedColor().Samuel Rødal2011-05-191-2/+1
| | | | | | | | | | | This warning is pointless as the user can anyway check if the color is valid after making the call by calling isValid(). Using isValidColor() could be used but it has a big performance overhead as validation then needs to be done twice. Task-number: QTBUG-19098 Reviewed-by: Erik Verbruggen (cherry picked from commit a423ff5474b89028eeca95b254f5184311c8223b)
* Fixed compile of qdrawhelper_neon.cpp.Samuel Rødal2011-05-191-1/+1
| | | | | | | | We need to use the quad-word intrinsic and reinterpret the cast to a signed int vector. Reviewed-by: Kim Motoyoshi Kalland <kim.kalland@nokia.com> (cherry picked from commit d2d7aef223a3bad368c6b7c7f7f4617f4acf323c)
* Fall back to using paths for large fonts in drawStaticText()Eskil Abrahamsen Blomfeldt2011-05-183-3/+46
| | | | | | | | | | | | | | QStaticText had an implicit risk which meant you had to make sure the text size did not grow unreasonably large. This was intended to avoid hiding the performance impact of using QStaticText for such a purpose, but it's too inconvenient. Thus, the same fall back as in drawTextItem() has been introduced. This will also fix a bug recently introduced when we started using the FT cache to draw static text in the raster engine, since this will fail for large fonts. Task-number: QTBUG-19084, QTBUG-19370 Reviewed-by: Jiang Jiang (cherry picked from commit 0aa9b30432cec3b7f366983f451fc9a7f8f83243)
* fix compilation with namespacesLars Knoll2011-05-121-8/+8
| | | | | Reviewed-by: Bjørn Erik Nilsen (cherry picked from commit 7a1c29f101b95c9cc2cb53f8b80d231b5a994a9a)
* Fix compilation with namespaces enabledLars Knoll2011-05-122-0/+14
| | | | | Reviewed-by: Samuel Rødal (cherry picked from commit bff68fc7094a50af57f7da23ecf9b25cab00f188)
* New algorithm for drawing thin linesLars Knoll2011-05-126-1449/+1137
| | | | | | | | | | | | | | | | | | Added a new QCosmeticStroker class for drawing thin lines. The class can handle both aliased and antialiased lines. The code replaces all the midpoint line drawing algorithms in the raster paintengine and gives correct subpixel positioning for lines. It gives around 30% to 50% speedup against the midpoint algorithm. If we missed that fast path, the speedup is around between a factor of 6 to 8 for lines and aliased paths and 100 and 400 for antialiased paths. Reviewed-by: Kim (cherry picked from commit 37c329a3e35fabc88fbcad824a69f37c671d2132)
* Fixed bug in QPdfEngine::addImage causing mono images to be made 32 bitMatthew Cattell2011-05-101-1/+4
| | | | | | | | Regression from 4.5 causing performance and size degradation. Task-number: QTBUG-18997 Reviewed-by: Samuel (cherry picked from commit 18122b473ecbd85ba953f70743b1756358bf7c0c)
* Fixed off-by-one in radial gradient color table index computation.Samuel Rødal2011-05-101-4/+2
| | | | | | | | Clamp to GRADIENT_COLOR_TABLE-1, not GRADIENT_COLOR_TABLE-2. Fixes visible error in gradients.qps Reviewed-by: Kim Motoyoshi Kalland <kim.kalland@nokia.com> (cherry picked from commit af9d20680c91f587f4791aa68f3a8b03d3a42be0)
* Fixes warnings about unused variablesOlivier Goffart2011-05-105-17/+2
| | | | | Reviewed-by: Samuel (cherry picked from commit ddd253e14318af45e5c56df736028b88257068c4)
* Another attempt at fixing the MSVC2005 build.Samuel Rødal2011-05-101-1/+6
| | | | | | | | Apparently direct casting is illegal there too, even though they don't have the cast operators. Reviewed-by: Kim (cherry picked from commit 45c60ceac3d5a401543d7d56a44d1f9227464431)
* Compile fix in qdrawhelper_sse2.cpp for MSVC 2005.Samuel Rødal2011-05-101-0/+5
| | | | (cherry picked from commit 7f921ea08c296e7451a44a1dae15350ae183ea20)
* Compile fix in qdrawhelper_sse2.cpp.Samuel Rødal2011-05-101-1/+1
| | | | (cherry picked from commit 7cc4ffce36c24596630ca83cd6418869d6383670)
* Added support for six-parameter radial gradients.Samuel Rødal2011-05-1011-73/+343
| | | | | | | | | The extended radial gradients conform to the radial gradient specification in HTML 5 canvas. Task-number: QTBUG-14075 Reviewed-by: Andreas Kling (cherry picked from commit da55c1ea92474e989e5582b02815936bbf584405)
* Improved gradient table generation performance for two-stop gradients.Samuel Rødal2011-05-105-72/+222
| | | | | | | | | Two stops is a fairly common case so we gain quite a bit by special casing it. Improves performance by 10 % in parcycle benchmark, and by 90 % in a synthetic benchmark. Reviewed-by: Andreas Kling (cherry picked from commit 5b74a70ac630073582be56f8a0539624a1080185)
* Optimized radial gradient fetch using SSE 2.Samuel Rødal2011-05-103-0/+98
| | | | | | | | On an i7 this improves performance by 22 % in parcycle, 107 % in default svgviewer example, and 283 % in a synthetic radial gradient benchmark. Reviewed-by: Andreas Kling (cherry picked from commit 26bd3dccdee8c6a8f1cf9d254a2a6be7d403aa8d)
* Improved qt_gradient_clamp for reflect spreads.Samuel Rødal2011-05-101-5/+2
| | | | | | | | Using GRADIENT_STOPTABLE_SIZE * 2 as the modulo gives more correct behaviour, and also improves performance slightly. Reviewed-by: Benjamin Poulain (cherry picked from commit 44dd7ef86a3970694a4f8fd9516575c0533a336e)
* Prepared for SIMD implementation of radial gradients.Samuel Rødal2011-05-102-177/+174
| | | | | | | | Made the radial gradient fetch func into a template to be able to optimize the inner loop using SIMD instructions. Reviewed-by: Benjamin Poulain (cherry picked from commit f16c261348193b4c03f796db4e1e3a5db09267a2)
* Rename QGlyphs -> QGlyphRunEskil Abrahamsen Blomfeldt2011-05-103-14/+14
| | | | | | | | | | | API clean-up for QGlyphRun: 1. QGlyphs -> QGlyphRun 2. QGlyphRun's font()/setFont() -> rawFont()/setRawFont() 3. QPainter::drawGlyphs() -> drawGlyphRun() 4. QTextLayout and QTextFragment's glyphs() -> glyphRuns() Reviewed-by: Jiang Jiang (cherry picked from commit 84ef364302728b68d2d29ea9c4ccbec32c7bb115)
* Add internal documentation for QUnifiedToolbarSurface.Fabien Freling2011-05-101-0/+33
| | | | | | | | | This document is aimed for developers. This is why it is directly written in the header file. This is not part of the public API. Reviewed-by: Richard Moe Gustavsen (cherry picked from commit 891b6ac7236d21b69bdb54b00051422cee004059)
* Set the default graphics system to raster.Fabien Freling2011-05-101-1/+1
| | | | | | | This change is specific to Mac OS X/Cocoa. Reviewed-by: Lars Knoll (cherry picked from commit 2c2026df66f237b7313397dd74f6bc3212b94596)
* Revert "Switch the default graphics system to raster on Mac."Fabien Freling2011-05-101-1/+1
| | | | | | | | This reverts commit a5d40fd3814ab7c8e865912c03a918bfd5994998. We have to fix the regressions due to the raster engine before putting it by default. (cherry picked from commit 3197fe2af911673c6291db0102e90a0d7f6ae926)
* Fix a race condition when the main window is being destructed.Fabien Freling2011-05-101-1/+2
| | | | | | | | | | During the destructor of QWidget, we delete the layout. If the layout is not set to 0 afterwards, a check on the layout might turn true, but any access will end with a segfault. Reviewed-by: João Abecasis (cherry picked from commit abc5a632942c23496d75c49b3b0b4a674cdafdf8)
* Switch the default graphics system to raster on Mac.Fabien Freling2011-05-101-1/+1
| | | | | Reviewed-by: Lars Knoll (cherry picked from commit a5d40fd3814ab7c8e865912c03a918bfd5994998)
* Fix QPainter::drawGlyphs() with non-affine transformationEskil Abrahamsen Blomfeldt2011-05-061-1/+8
| | | | | | | | | | | | | When the matrix has an non-affine transformation, the text will have to be rendered using the default path-renderer. This means going through the drawTextItem() path (since drawStaticText() has no support for those transformations) and it also means not pre-transforming the coordinates, since the default implementation of drawTextItem() supports transformations. Task-number: QTBUG-18214 Reviewed-by: Jiang Jiang (cherry picked from commit 55446d104db77fc7994ab12352b1c08bb7b63346)
* Support gamma correction of text on GLEskil Abrahamsen Blomfeldt2011-05-031-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | If the SRGB framebuffer extension in GL is available, we can support gamma correction of text with a gamma of 2.1. On Mac this is sufficient for gamma correcting subpixel antialiased text. Gray antialiasing should not be gamma corrected on Mac. On Windows, the user can potentially set the gamma value to anything between 1.0 and 2.2 (or something like that). We support anything that resembles 1.0 closely enough by pushing the text out without any correction (like before). We also support anything that resembles 2.1 (the gamma hardcoded in GL's SRGB extension) by turning on the extension before blending the text. In between the two, we'll use gray antialiasing to avoid differing too much from the raster engine (which is our reference in this.) For gray antialiasing on Windows, we use a constant gamma of 2.3 which has been determined by experimentation. Since this is close enough to 2.1 we do gamma correction with SRGB extension. The distance limit of 0.2 is determined by some experimentation. Reviewed-by: Samuel (cherry picked from commit 79ba7cceca5e4029876ace2121edd25b08ae14ce)
* Don't transform glyph positions for Core Graphics paint engineJiang Jiang2011-04-291-2/+3
| | | | | | | | Since it already transformed text positions based on transform matrix on QPainter. Reviewed-by: Eskil (cherry picked from commit b86c9120710bf1481df5f6541618169a82fd65b8)
* Fix crash in raster on X11 when text contains unsupported charactersEskil Abrahamsen Blomfeldt2011-04-291-1/+1
| | | | | | | | | We would assume the font engine was a FT engine and do a static cast here, which would cause a crash if the box engine was in use instead. Task-number: QTBUG-17443 Reviewed-by: Samuel (cherry picked from commit c9c54682bcd23598ac7a8db3b10e9f18c978e268)
* Initial import from qtquick2.Qt by Nokia2011-04-271-1/+3
| | | | | Branched from the monolithic repo, Qt qtquick2 branch, at commit a4a585d2ee907746682846ae6e8a48e19deef469
* Initial import from the monolithic Qt.Qt by Nokia2011-04-27182-0/+117113
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12