64void QSGNodeUpdater::enterTransformNode(QSGTransformNode *t)
66#ifdef QSG_UPDATER_DEBUG
67 qDebug() <<
"enter transform:" << t <<
"force=" << m_force_update;
70 if (!t->matrix().isIdentity()) {
71 if (!m_combined_matrix_stack.isEmpty()) {
72 t->setCombinedMatrix(*m_combined_matrix_stack.last() * t->matrix());
74 t->setCombinedMatrix(t->matrix());
76 m_combined_matrix_stack.add(&t->combinedMatrix());
78 if (!m_combined_matrix_stack.isEmpty()) {
79 t->setCombinedMatrix(*m_combined_matrix_stack.last());
81 t->setCombinedMatrix(QMatrix4x4());
142void QSGNodeUpdater::enterRenderNode(QSGRenderNode *r)
144#ifdef QSG_UPDATER_DEBUG
145 qDebug() <<
"enter render:" << r;
148 QSGRenderNodePrivate *rd = QSGRenderNodePrivate::get(r);
149 rd->m_matrix = m_combined_matrix_stack.isEmpty() ? 0 : m_combined_matrix_stack.last();
150 rd->m_clip_list = m_current_clip;
151 rd->m_opacity = m_opacity_stack.last();
191void QSGNodeUpdater::visitNode(QSGNode *n)
193#ifdef QSG_UPDATER_DEBUG
194 qDebug() <<
"enter:" << n;
199 if (n->isSubtreeBlocked())
203 case QSGNode::TransformNodeType: {
204 QSGTransformNode *t =
static_cast<QSGTransformNode *>(n);
205 enterTransformNode(t);
207 leaveTransformNode(t);
209 case QSGNode::GeometryNodeType: {
210 QSGGeometryNode *g =
static_cast<QSGGeometryNode *>(n);
211 enterGeometryNode(g);
213 leaveGeometryNode(g);
215 case QSGNode::RenderNodeType: {
216 QSGRenderNode *r =
static_cast<QSGRenderNode *>(n);
221 case QSGNode::ClipNodeType: {
222 QSGClipNode *c =
static_cast<QSGClipNode *>(n);
227 case QSGNode::OpacityNodeType: {
228 QSGOpacityNode *o =
static_cast<QSGOpacityNode *>(n);