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
21QT_BEGIN_NAMESPACE
22
23class QSGNode;
24class QSGTransformNode;
25class QSGClipNode;
26class QSGOpacityNode;
27class QSGGeometryNode;
28class QMatrix4x4;
29class QSGRenderNode;
30
31class Q_QUICK_PRIVATE_EXPORT QSGNodeUpdater
32{
33public:
34 QSGNodeUpdater();
35 virtual ~QSGNodeUpdater();
36
37 virtual void updateStates(QSGNode *n);
38 virtual bool isNodeBlocked(QSGNode *n, QSGNode *root) const;
39
40protected:
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
63QT_END_NAMESPACE
64
65#endif
66

source code of qtdeclarative/src/quick/scenegraph/coreapi/qsgnodeupdater_p.h