summaryrefslogtreecommitdiffstats
path: root/examples/painting/imagecomposition
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-05-10 15:08:29 +0200
committerQt Continuous Integration System <qt-info@nokia.com>2011-06-07 10:30:57 +0200
commitae3b5b3ab4b9c268db8230cc2ac5edac3680a2d8 (patch)
treeb0f9c8b0287c2c35c33e6cbff95606c6b41e3a02 /examples/painting/imagecomposition
parenteabaf61256d8c1966f8f6d49d0cb2d9b2ba9f71b (diff)
Add function QGlyphRun::setRawData()
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>
Diffstat (limited to 'examples/painting/imagecomposition')
0 files changed, 0 insertions, 0 deletions