aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextnode_p.h
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@viroteck.net>2015-06-01 19:03:04 +0300
committerRobin Burchell <robin.burchell@viroteck.net>2015-06-06 11:33:31 +0000
commit8555cdecd66444b07ab09b1644cb42fcb572dd76 (patch)
tree61a6b724974416b133db8a503a4d75c3381ec8b9 /src/quick/items/qquicktextnode_p.h
parent180ad9f05e873551d28e25b4840bf1c02b1ef7ee (diff)
QQuickText: Don't store node engine per node.
Since these are only used during one particular phase of dealing with text, it is extremely wasteful to heap allocate them and keep them around for the entire lifetime of the node (~3kb of total allocation _each_ according to OS X). Removing these cuts around 100mb of transient allocations off the qmlbench text creation benchmark (and takes the total allocations during a test run from ~496 MB to ~389 MB). It also improves the approximate throughput for creation of text items by ~5%. Change-Id: I45c8a50879ed545da1fb13ab3c2c5d857b112cf7 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/quick/items/qquicktextnode_p.h')
-rw-r--r--src/quick/items/qquicktextnode_p.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/quick/items/qquicktextnode_p.h b/src/quick/items/qquicktextnode_p.h
index c7b9804ea6..31cc23bf2a 100644
--- a/src/quick/items/qquicktextnode_p.h
+++ b/src/quick/items/qquicktextnode_p.h
@@ -101,14 +101,10 @@ public:
void setUseNativeRenderer(bool on) { m_useNativeRenderer = on; }
private:
- void initEngine(const QColor &textColor, const QColor &selectedTextColor, const QColor &selectionColor, const QColor& anchorColor = QColor()
- , const QPointF &position = QPointF());
-
QSGRectangleNode *m_cursorNode;
QList<QSGTexture *> m_textures;
QQuickItem *m_ownerElement;
bool m_useNativeRenderer;
- QScopedPointer<QQuickTextNodeEngine> m_engine;
friend class QQuickTextEdit;
friend class QQuickTextEditPrivate;