aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@nokia.com>2012-03-20 14:09:13 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-20 16:44:18 +0100
commitfd8028514550da7594736a10f1d20bab1576bcfd (patch)
treef8d3a80401ae49d96df7b03e7c90452137a7707c /src/quick/scenegraph/qsgdistancefieldglyphnode_p.h
parentdfdea38c843d1ee915e10ee72e6371ced7cd9bd0 (diff)
Don't register sub distance field glyph nodes with the glyph cache.
The original distance field glyph node takes care of the glyphs reference counting. The potential sub glyph nodes created when the glyphs are in another texture are note registered anymore with the cache and don't reference count their glyphs. Also got rid of unnecessary data members. Change-Id: I1544792d5d896c6de26e0838e4f80397759ea012 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgdistancefieldglyphnode_p.h')
-rw-r--r--src/quick/scenegraph/qsgdistancefieldglyphnode_p.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h
index f8c8267e4f..146267c45d 100644
--- a/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h
+++ b/src/quick/scenegraph/qsgdistancefieldglyphnode_p.h
@@ -77,8 +77,15 @@ public:
void updateGeometry();
private:
+ enum DistanceFieldGlyphNodeType {
+ RootGlyphNode,
+ SubGlyphNode
+ };
+
+ void setGlyphNodeType(DistanceFieldGlyphNodeType type) { m_glyphNodeType = type; }
void updateMaterial();
+ DistanceFieldGlyphNodeType m_glyphNodeType;
QColor m_color;
QPointF m_baseLine;
QSGContext *m_context;
@@ -93,8 +100,7 @@ private:
AntialiasingMode m_antialiasingMode;
QRectF m_boundingRect;
const QSGDistanceFieldGlyphCache::Texture *m_texture;
- QHash<const QSGDistanceFieldGlyphCache::Texture *, QSGDistanceFieldGlyphNode *> m_subNodes;
- QList<QSGDistanceFieldGlyphNode *> m_nodesToDelete;
+ QLinkedList<QSGNode *> m_nodesToDelete;
struct GlyphInfo {
QVector<quint32> indexes;