summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qglyphrun.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QtGui: add member-swap to shared classesMarc Mutz2012-07-031-0/+8
| | | | | | | Implemented as in other shared classes (e.g. QPen). Change-Id: I5b96d4a4795870d6252aa53de6fbaedde7c0095a Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Get started with patching up the Qt GUI docsGunnar Sletta2012-06-281-0/+1
| | | | | | | | Primary goal, make the front page of the Qt GUI module a bit more clarifying and avoid downstream references inside the Qt GUI docs. Change-Id: Icbcfbb64b93963add889bf83711daa9575885c02 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.Robin Burchell2012-04-111-2/+2
| | | | | | | | | | | | | | | | | | Just like qMalloc/qRealloc/qFree, there is absolutely no reason to wrap these functions just to avoid an include, except to pay for it with worse runtime performance. On OS X, on byte sizes from 50 up to 1000, calling memset directly is 28-15% faster(!) than adding an additional call to qMemSet. The advantage on sizes above that is unmeasurable. For qMemCopy, the benefits are a little more modest: 16-7%. Change-Id: I98aa92bb765aea0448e3f20af42a039b369af0b3 Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix a warning in QGlyphRun compilationJiang Jiang2011-11-051-0/+1
| | | | | Change-Id: Ic072240193fc8eb5e7fdcd0dada79383398b224b Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Replace implicit QAtomic* casts with explicit load()/store()Bradley T. Hughes2011-10-271-1/+1
| | | | | Change-Id: Ia7ef1a8e01001f203e409c710c977d6f4686342e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QGlyphRun::SplitLigature flagEskil Abrahamsen Blomfeldt2011-10-141-0/+8
| | | | | | | | | | | | | If the glyph run is generated based on characters which split a ligature glyph, it needs to include the ligature glyph in the run, and when painting, we need to clip the painter to the reported bounding rect of the run in order to avoid painting too much of the ligature. To make it possible to reduce clipping to a minimum, we need a flag to inform of whether the glyph run contains a split ligature or not. Change-Id: Id787e0bec6d6e8e06cc818700ae0fca22cf81e98 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Register whether a glyph run goes from RTL or LTREskil Abrahamsen Blomfeldt2011-09-281-28/+94
| | | | | | | | | | | | | | This is needed by scene graph when embedding text objects in RTL text. Since the number of flags required for QGlyphRun is increasing, I've also refactored the underline/overline/strikethrough settings to use a common QFlags interface. Task-number: QTBUG-20917 Change-Id: I070649c014f4a51cfd66a9579d2d221a8f22302f Reviewed-on: http://codereview.qt-project.org/5739 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* optimize QGlyphRun's operator == a bitKonstantin Ritt2011-09-021-7/+11
| | | | | | | | | | Merge-request: 2652 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> (cherry picked from commit 56ef015b1c2384e0590f19e938d349bcffdb6961) Change-Id: Icc5fd9e8a04518d476e96d5983a95740f454f62a Reviewed-on: http://codereview.qt.nokia.com/4140 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* QGlyphRun: make operator != inlinedKonstantin Ritt2011-09-021-4/+2
| | | | | | | | | | Merge-request: 2652 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> (cherry picked from commit 145de5acb68f320125b7566a7d726a5a7786a5f8) Change-Id: I9d868d2258b222890c29eb26e8cd79d9fa3c7f71 Reviewed-on: http://codereview.qt.nokia.com/4139 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* QGlyphRun: don't detach if the decoration wasn't actually changedKonstantin Ritt2011-09-021-0/+9
| | | | | | | | | | Merge-request: 2652 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> (cherry picked from commit f550d219378e5669601de416254b3585fe3f5708) Change-Id: Ib74ae82fbeaf2b0f5eabad9568cfa9fcea09053b Reviewed-on: http://codereview.qt.nokia.com/4138 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Enablers for using QGlyphRun in SceneGraphEskil Abrahamsen Blomfeldt2011-08-191-1/+44
| | | | | | | | | | | | | | | | | Several required fixes and changes to fix problems that arose when porting SceneGraph's QSGTextInput and QSGTextEdit to use QSGTextNode, especially related to having selections on the text. Also fixes crashes with the threaded renderer on Mac OS X when using the TextEdit or TextInput elements. Task-number: QTBUG-18019, QTBUG-20017 Change-Id: I67f24465352daa1d2cb12b6d2f378feb676c9804 Reviewed-on: http://codereview.qt.nokia.com/2864 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Doc: Fixed qdoc warnings.David Boddie2011-07-011-1/+2
| | | | | | | Change-Id: I7b4e9ef513b82a82d2365c9256d09520a44ad10d Reviewed-on: http://codereview.qt.nokia.com/324 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Add function QGlyphRun::setRawData()Eskil Abrahamsen Blomfeldt2011-06-071-43/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | To provide an optimized way of constructing QGlyphRun objects with no copying or allocation, we add function setRawData() (naming inspired by QByteArray::setRawData()). Data retrieved from QRawFont can be passed directly into this. The logic is now that the data pointers in QGlyphRunPrivate should always point to the current valid data and is what will be used in comparisons and drawing calls. The vectors are optimizations to avoid unnecessary copying if the user wants to use the QVector based API (which makes it easier to manage the memory.) This reflected in the functions that return QVectors, which will return the stored vector if and only if it is identical to the current pointer. Otherwise we will have to copy the memory. The internal addition operators in QGlyphRun have been removed since they really provide no real optimization and have an unclear definition if the two glyph runs are based on different fonts. Reviewed-by: Jiang Jiang (cherry picked from commit 86d88c5b719fd3d50336d9d8e7127b8045ee82ae) Change-Id: Id5bb55ee3d93afb32ffca850f53382e856df7b3e Reviewed-on: http://codereview.qt.nokia.com/342 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Enablers for TextInputEskil Abrahamsen Blomfeldt2011-05-231-0/+29
| | | | | | | In order to use the scene graph text node in TextInput, we need enablers. Most of this is to enable selections, which in turn means we need to be able to extract a certain set of glyphs from a QTextLine.
* Rename QGlyphs -> QGlyphRunEskil Abrahamsen Blomfeldt2011-05-101-0/+324
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)