diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-11-24 13:48:19 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-24 13:03:03 +0100 |
commit | 47a5c708bf4e555cb8febef583f32c99f7d8ea1e (patch) | |
tree | 722842be890fe711a353759b100ac50bef9c2648 /src/quick/items/qquicktextnode.cpp | |
parent | 635d0a7cf6601b2e46e0eed21a648934bc471c6d (diff) |
Add support for shared glyph cache
Use a shared graphics cache to back the distance fields if
it is available.
Change-Id: Id5e6e7a28e38e349d787e66016b2d0faebc791d7
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Diffstat (limited to 'src/quick/items/qquicktextnode.cpp')
-rw-r--r-- | src/quick/items/qquicktextnode.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/quick/items/qquicktextnode.cpp b/src/quick/items/qquicktextnode.cpp index 8811bb3d77..2f72b0c8fe 100644 --- a/src/quick/items/qquicktextnode.cpp +++ b/src/quick/items/qquicktextnode.cpp @@ -69,8 +69,8 @@ QT_BEGIN_NAMESPACE /*! Creates an empty QQuickTextNode */ -QQuickTextNode::QQuickTextNode(QSGContext *context) - : m_context(context), m_cursorNode(0) +QQuickTextNode::QQuickTextNode(QSGContext *context, QQuickItem *ownerElement) + : m_context(context), m_cursorNode(0), m_ownerElement(ownerElement) { #if defined(QML_RUNTIME_TESTING) description = QLatin1String("text"); @@ -131,6 +131,7 @@ QSGGlyphNode *QQuickTextNode::addGlyphs(const QPointF &position, const QGlyphRun QSGNode *parentNode) { QSGGlyphNode *node = m_context->createGlyphNode(); + node->setOwnerElement(m_ownerElement); node->setGlyphs(position + QPointF(0, glyphs.rawFont().ascent()), glyphs); node->setStyle(style); node->setStyleColor(styleColor); |