| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QSGNODEUPDATER_P_H |
| 5 | #define QSGNODEUPDATER_P_H |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists purely as an |
| 12 | // implementation detail. This header file may change from version to |
| 13 | // version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | // |
| 17 | |
| 18 | #include <private/qtquickglobal_p.h> |
| 19 | #include <QtGui/private/qdatabuffer_p.h> |
| 20 | |
| 21 | QT_BEGIN_NAMESPACE |
| 22 | |
| 23 | class QSGNode; |
| 24 | class QSGTransformNode; |
| 25 | class QSGClipNode; |
| 26 | class QSGOpacityNode; |
| 27 | class QSGGeometryNode; |
| 28 | class QMatrix4x4; |
| 29 | class QSGRenderNode; |
| 30 | |
| 31 | class Q_QUICK_EXPORT QSGNodeUpdater |
| 32 | { |
| 33 | public: |
| 34 | QSGNodeUpdater(); |
| 35 | virtual ~QSGNodeUpdater(); |
| 36 | |
| 37 | virtual void updateStates(QSGNode *n); |
| 38 | virtual bool isNodeBlocked(QSGNode *n, QSGNode *root) const; |
| 39 | |
| 40 | protected: |
| 41 | virtual void enterTransformNode(QSGTransformNode *); |
| 42 | virtual void leaveTransformNode(QSGTransformNode *); |
| 43 | void enterClipNode(QSGClipNode *c); |
| 44 | void leaveClipNode(QSGClipNode *c); |
| 45 | void enterOpacityNode(QSGOpacityNode *o); |
| 46 | void leaveOpacityNode(QSGOpacityNode *o); |
| 47 | void enterGeometryNode(QSGGeometryNode *); |
| 48 | void leaveGeometryNode(QSGGeometryNode *); |
| 49 | void enterRenderNode(QSGRenderNode *); |
| 50 | void leaveRenderNode(QSGRenderNode *); |
| 51 | |
| 52 | void visitNode(QSGNode *n); |
| 53 | void visitChildren(QSGNode *n); |
| 54 | |
| 55 | |
| 56 | QDataBuffer<const QMatrix4x4 *> m_combined_matrix_stack; |
| 57 | QDataBuffer<qreal> m_opacity_stack; |
| 58 | const QSGClipNode *m_current_clip; |
| 59 | |
| 60 | int m_force_update; |
| 61 | }; |
| 62 | |
| 63 | QT_END_NAMESPACE |
| 64 | |
| 65 | #endif |
| 66 | |