aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@viroteck.net>2015-06-05 01:45:31 +0300
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2016-01-05 10:21:06 +0000
commiteea8fa64ab27854b71f46ef143e35b6c9acbba14 (patch)
treee39498b84df53d61e5b74f9142818454144e229a /src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
parentfa0e902b4b1c938f59c7fdf9bdfbd464f55e766f (diff)
QSBatchRenderer: Replace Node::children QList with a singly linked list.
This reduces transient allocations by 10mb on the Rectangle creation benchmark, at the cost of an additional two pointers per shadow node (and just that pointer -- no additional allocation ala QList is required, so this will actually end up around the same size if not better.) Change-Id: I6c25c93fe31ed892e3c42ed66d6c6656e5d7b38a Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h')
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
index 8cd9e7e3ff..4a819a5fa5 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer_p.h
@@ -1,6 +1,8 @@
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2014 Jolla Ltd, author: <gunnar.sletta@jollamobile.com>
+** Copyright (C) 2015 Robin Burchell <robin.burchell@viroteck.net>
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtQuick module of the Qt Toolkit.
@@ -438,6 +440,9 @@ struct Node
: sgNode(0)
, parent(0)
, data(0)
+ , firstChild(0)
+ , nextSibling(0)
+ , lastChild(0)
, dirtyState(0)
, isOpaque(false)
, isBatchRoot(false)
@@ -447,7 +452,9 @@ struct Node
QSGNode *sgNode;
Node *parent;
void *data;
- QList<Node *> children;
+ Node *firstChild;
+ Node *nextSibling;
+ Node *lastChild;
QSGNode::DirtyState dirtyState;