diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-07-11 14:51:40 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-07-11 17:24:39 +0200 |
commit | 13374ceb165c44658aa97890c37b206859c9a31c (patch) | |
tree | 562362b196a459ee3449a5a1e60e5216a9dd6984 /src/quick/scenegraph/qsgdefaultglyphnode.cpp | |
parent | ae47deba4c943c496412530a8d2a5a688ae12038 (diff) | |
parent | b5d18be5a03406d0aac83856dd41e1525fd14a28 (diff) |
Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I2963c1209316fb6755f572969f368970450d7991
Diffstat (limited to 'src/quick/scenegraph/qsgdefaultglyphnode.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgdefaultglyphnode.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/quick/scenegraph/qsgdefaultglyphnode.cpp b/src/quick/scenegraph/qsgdefaultglyphnode.cpp index 0d42102f36..ba286b8a36 100644 --- a/src/quick/scenegraph/qsgdefaultglyphnode.cpp +++ b/src/quick/scenegraph/qsgdefaultglyphnode.cpp @@ -42,8 +42,9 @@ QT_BEGIN_NAMESPACE -QSGDefaultGlyphNode::QSGDefaultGlyphNode() - : m_glyphNodeType(RootGlyphNode) +QSGDefaultGlyphNode::QSGDefaultGlyphNode(QSGRenderContext *context) + : m_context(context) + , m_glyphNodeType(RootGlyphNode) , m_dirtyGeometry(false) { setFlag(UsePreprocess); @@ -75,14 +76,14 @@ void QSGDefaultGlyphNode::update() QMargins margins(0, 0, 0, 0); if (m_style == QQuickText::Normal) { - m_material = new QSGTextMaskMaterial(font); + m_material = new QSGTextMaskMaterial(m_context, font); } else if (m_style == QQuickText::Outline) { - QSGOutlinedTextMaterial *material = new QSGOutlinedTextMaterial(font); + QSGOutlinedTextMaterial *material = new QSGOutlinedTextMaterial(m_context, font); material->setStyleColor(m_styleColor); m_material = material; margins = QMargins(1, 1, 1, 1); } else { - QSGStyledTextMaterial *material = new QSGStyledTextMaterial(font); + QSGStyledTextMaterial *material = new QSGStyledTextMaterial(m_context, font); if (m_style == QQuickText::Sunken) { material->setStyleShift(QVector2D(0, -1)); margins.setTop(1); @@ -158,7 +159,7 @@ void QSGDefaultGlyphNode::updateGeometry() subNodeGlyphRun.setGlyphIndexes(glyphInfo.indexes); subNodeGlyphRun.setPositions(glyphInfo.positions); - QSGDefaultGlyphNode *subNode = new QSGDefaultGlyphNode(); + QSGDefaultGlyphNode *subNode = new QSGDefaultGlyphNode(m_context); subNode->setGlyphNodeType(SubGlyphNode); subNode->setColor(m_color); subNode->setStyle(m_style); |