Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsgdefaultcontext_p.h
Go to the documentation of this file.
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// Qt-Security score:significant reason:default
4
5#ifndef QSGDEFAULTCONTEXT_H
6#define QSGDEFAULTCONTEXT_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtQuick/private/qsgcontext_p.h>
20#include <QtQuick/private/qsgdistancefieldglyphnode_p.h>
21#include <qsgrendererinterface.h>
22
23QT_BEGIN_NAMESPACE
24
25class Q_QUICK_EXPORT QSGDefaultContext : public QSGContext, public QSGRendererInterface
26{
27public:
28 QSGDefaultContext(QObject *parent = nullptr);
29 ~QSGDefaultContext();
30
31 void renderContextInitialized(QSGRenderContext *renderContext) override;
32 void renderContextInvalidated(QSGRenderContext *) override;
33 QSGRenderContext *createRenderContext() override;
34 QSGInternalRectangleNode *createInternalRectangleNode() override;
35 QSGInternalImageNode *createInternalImageNode(QSGRenderContext *renderContext) override;
36 QSGPainterNode *createPainterNode(QQuickPaintedItem *item) override;
37 QSGGlyphNode *createGlyphNode(QSGRenderContext *rc, QSGTextNode::RenderType renderType, int renderTypeQuality) override;
38 QSGInternalTextNode *createInternalTextNode(QSGRenderContext *renderContext) override;
39 QSGLayer *createLayer(QSGRenderContext *renderContext) override;
40 QSurfaceFormat defaultSurfaceFormat() const override;
41 QSGRendererInterface *rendererInterface(QSGRenderContext *renderContext) override;
42 QSGRectangleNode *createRectangleNode() override;
43 QSGImageNode *createImageNode() override;
44 QSGNinePatchNode *createNinePatchNode() override;
45#if QT_CONFIG(quick_sprite)
46 QSGSpriteNode *createSpriteNode() override;
47#endif
48 QSGGuiThreadShaderEffectManager *createGuiThreadShaderEffectManager() override;
49 QSGShaderEffectNode *createShaderEffectNode(QSGRenderContext *renderContext) override;
50
51 void setDistanceFieldEnabled(bool enabled);
52 bool isDistanceFieldEnabled() const;
53
54 GraphicsApi graphicsApi() const override;
55 void *getResource(QQuickWindow *window, Resource resource) const override;
56 ShaderType shaderType() const override;
57 ShaderCompilationTypes shaderCompilationType() const override;
58 ShaderSourceTypes shaderSourceType() const override;
59
60private:
61 QMutex m_mutex;
62 QSGContext::AntialiasingMethod m_antialiasingMethod;
63 bool m_distanceFieldDisabled;
64 QSGDistanceFieldGlyphNode::AntialiasingMode m_distanceFieldAntialiasing;
65 bool m_distanceFieldAntialiasingDecided;
66};
67
68QT_END_NAMESPACE
69
70#endif // QSGDEFAULTCONTEXT_H
ImageNode(QSGDefaultRenderContext *rc)
Combined button and popup list for selecting options.