}
-IndexGeometryNodePair::IndexGeometryNodePair(int i, QSGGeometryNode *node)
+QSGDefaultRenderer::IndexGeometryNodePair::IndexGeometryNodePair(int i, QSGGeometryNode *node)
: QPair<int, QSGGeometryNode *>(i, node)
{
}
-bool IndexGeometryNodePair::operator < (const IndexGeometryNodePair &other) const
+bool QSGDefaultRenderer::IndexGeometryNodePair::operator < (const QSGDefaultRenderer::IndexGeometryNodePair &other) const
{
return nodeLessThan(second, other.second);
}
-IndexGeometryNodePairHeap::IndexGeometryNodePairHeap()
+QSGDefaultRenderer::IndexGeometryNodePairHeap::IndexGeometryNodePairHeap()
: v(64)
{
}
-void IndexGeometryNodePairHeap::insert(const IndexGeometryNodePair &x)
+void QSGDefaultRenderer::IndexGeometryNodePairHeap::insert(const QSGDefaultRenderer::IndexGeometryNodePair &x)
{
int i = v.size();
v.add(x);
}
}
-IndexGeometryNodePair IndexGeometryNodePairHeap::pop()
+QSGDefaultRenderer::IndexGeometryNodePair QSGDefaultRenderer::IndexGeometryNodePairHeap::pop()
{
IndexGeometryNodePair x = top();
if (v.size() > 1)
QT_MODULE(Declarative)
-class IndexGeometryNodePair : public QPair<int, QSGGeometryNode *>
-{
-public:
- IndexGeometryNodePair(int i, QSGGeometryNode *n);
- bool operator < (const IndexGeometryNodePair &other) const;
-};
-
-
-// Minimum heap.
-class IndexGeometryNodePairHeap
-{
-public:
- IndexGeometryNodePairHeap();
- void insert(const IndexGeometryNodePair &x);
- const IndexGeometryNodePair &top() const { return v.first(); }
- IndexGeometryNodePair pop();
- bool isEmpty() const { return v.isEmpty(); }
-private:
- static int parent(int i) { return (i - 1) >> 1; }
- static int left(int i) { return (i << 1) | 1; }
- static int right(int i) { return (i + 1) << 1; }
- QDataBuffer<IndexGeometryNodePair> v;
-};
class QSGDefaultRenderer : public QSGRenderer
{
Q_OBJECT
public:
+ class IndexGeometryNodePair : public QPair<int, QSGGeometryNode *>
+ {
+ public:
+ IndexGeometryNodePair(int i, QSGGeometryNode *n);
+ bool operator < (const IndexGeometryNodePair &other) const;
+ };
+
+
+ // Minimum heap.
+ class IndexGeometryNodePairHeap
+ {
+ public:
+ IndexGeometryNodePairHeap();
+ void insert(const IndexGeometryNodePair &x);
+ const IndexGeometryNodePair &top() const { return v.first(); }
+ IndexGeometryNodePair pop();
+ bool isEmpty() const { return v.isEmpty(); }
+ private:
+ static int parent(int i) { return (i - 1) >> 1; }
+ static int left(int i) { return (i << 1) | 1; }
+ static int right(int i) { return (i + 1) << 1; }
+ QDataBuffer<IndexGeometryNodePair> v;
+ };
+
QSGDefaultRenderer(QSGContext *context);
void render();