Commit 26659b48 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

Timeline: Drop TimelineItemsGeometry::allocatedVertices



Change-Id: Ibb4757cb159856c81c0c7f5f6a8138a61899b06f
Reviewed-by: Joerg Bornemann's avatarJoerg Bornemann <joerg.bornemann@qt.io>
parent 9e66ce48
......@@ -61,18 +61,15 @@ struct TimelineItemsGeometry {
// Alternating nodes with with 7 and 4 vertices; and vertex indices are 16bit
static const int maxEventsPerNode = 0xffff * 2 / (7 + 4);
TimelineItemsGeometry() : allocatedVertices(0), usedVertices(0), node(0) {
TimelineItemsGeometry() : usedVertices(0), node(0)
{
prevNode.set(0, TimelineModel::defaultRowHeight(), 0, 0, 0, 0, 0, 0);
}
uint allocatedVertices;
uint usedVertices;
OpaqueColoredPoint2DWithSize prevNode;
QSGGeometryNode *node;
void allocate(QSGMaterial *material);
void addVertices(float itemTop);
void addEvent(float itemLeft, float itemTop, float itemWidth, float selectionId, uchar red,
......@@ -167,7 +164,6 @@ void TimelineItemsGeometry::allocate(QSGMaterial *material)
node->setGeometry(geometry);
node->setFlag(QSGNode::OwnsGeometry, true);
node->setMaterial(material);
allocatedVertices = usedVertices;
usedVertices = 0;
prevNode.set(0, TimelineModel::defaultRowHeight(), 0, 0, 0, 0, 0, 0);
}
......@@ -211,8 +207,7 @@ static void updateNodes(int from, int to, const TimelineModel *model,
for (int i = 0; i < model->expandedRowCount(); ++i) {
TimelineItemsGeometry &row = expandedPerRow[i];
if (row.usedVertices > 0) {
row.allocate(&static_cast<TimelineExpandedRowNode *>(
state->expandedRow(i))->material);
row.allocate(&static_cast<TimelineExpandedRowNode *>(state->expandedRow(i))->material);
state->expandedRow(i)->appendChildNode(row.node);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment