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 QSGGEOMETRY_P_H
5#define QSGGEOMETRY_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 "qsggeometry.h"
19#include "private/qglobal_p.h"
20
21QT_BEGIN_NAMESPACE
22
23class QSGGeometryData
24{
25public:
26 virtual ~QSGGeometryData() {}
27
28 static inline QSGGeometryData *data(const QSGGeometry *g) {
29 return g->m_server_data;
30 }
31
32 static inline void install(const QSGGeometry *g, QSGGeometryData *data) {
33 Q_ASSERT(!g->m_server_data);
34 const_cast<QSGGeometry *>(g)->m_server_data = data;
35 }
36
37 static bool inline hasDirtyVertexData(const QSGGeometry *g) { return g->m_dirty_vertex_data; }
38 static void inline clearDirtyVertexData(const QSGGeometry *g) { const_cast<QSGGeometry *>(g)->m_dirty_vertex_data = false; }
39
40 static bool inline hasDirtyIndexData(const QSGGeometry *g) { return g->m_dirty_vertex_data; }
41 static void inline clearDirtyIndexData(const QSGGeometry *g) { const_cast<QSGGeometry *>(g)->m_dirty_index_data = false; }
42
43};
44
45QT_END_NAMESPACE
46
47#endif // QSGGEOMETRY_P_H
48

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