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 QSGDEFAULTGLYPHNODE_P_H |
5 | #define QSGDEFAULTGLYPHNODE_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/qsgadaptationlayer_p.h> |
19 | #include <private/qsgbasicglyphnode_p.h> |
20 | |
21 | QT_BEGIN_NAMESPACE |
22 | |
23 | class QSGDefaultGlyphNode : public QSGBasicGlyphNode |
24 | { |
25 | public: |
26 | QSGDefaultGlyphNode(QSGRenderContext *context); |
27 | ~QSGDefaultGlyphNode(); |
28 | void setMaterialColor(const QColor &color) override; |
29 | void setGlyphs(const QPointF &position, const QGlyphRun &glyphs) override; |
30 | void update() override; |
31 | void preprocess() override; |
32 | void setPreferredAntialiasingMode(AntialiasingMode) override; |
33 | void updateGeometry(); |
34 | |
35 | private: |
36 | enum DefaultGlyphNodeType { |
37 | RootGlyphNode, |
38 | SubGlyphNode |
39 | }; |
40 | |
41 | void setGlyphNodeType(DefaultGlyphNodeType type) { m_glyphNodeType = type; } |
42 | |
43 | QSGRenderContext *m_context; |
44 | DefaultGlyphNodeType m_glyphNodeType; |
45 | QVector<QSGNode *> m_nodesToDelete; |
46 | |
47 | struct GlyphInfo { |
48 | QVector<quint32> indexes; |
49 | QVector<QPointF> positions; |
50 | }; |
51 | |
52 | uint m_dirtyGeometry: 1; |
53 | |
54 | AntialiasingMode m_preferredAntialiasingMode; |
55 | }; |
56 | |
57 | QT_END_NAMESPACE |
58 | |
59 | #endif |
60 | |