6#include <QtQuick/private/qsgdefaultinternalrectanglenode_p.h>
7#include <QtQuick/private/qsgdefaultinternalimagenode_p.h>
8#include <QtQuick/private/qsgdefaultpainternode_p.h>
9#include <QtQuick/private/qsgdefaultglyphnode_p.h>
10#include <QtQuick/private/qsgcurveglyphnode_p.h>
11#include <QtQuick/private/qsgdistancefieldglyphnode_p.h>
12#include <QtQuick/private/qsgdistancefieldglyphnode_p_p.h>
13#include <QtQuick/private/qsgrhisupport_p.h>
14#include <QtQuick/private/qsgrhilayer_p.h>
15#include <QtQuick/private/qsgdefaultrendercontext_p.h>
16#include <QtQuick/private/qsgdefaultrectanglenode_p.h>
17#include <QtQuick/private/qsgdefaultimagenode_p.h>
18#include <QtQuick/private/qsgdefaultninepatchnode_p.h>
19#if QT_CONFIG(quick_sprite)
20#include <QtQuick/private/qsgdefaultspritenode_p.h>
22#include <QtQuick/private/qsgrhishadereffectnode_p.h>
23#include <QtQuick/private/qsginternaltextnode_p.h>
24#include <QtQuick/private/qsgrhiinternaltextnode_p.h>
26#include <QOpenGLContext>
28#include <QtQuick/private/qquickwindow_p.h>
29#include <QtQuick/private/qquickitem_p.h>
31#include <private/qqmlglobal_p.h>
56 , m_antialiasingMethod(
QSGContext::UndecidedAntialiasing)
57 , m_distanceFieldDisabled(qmlDisableDistanceField())
58 , m_distanceFieldAntialiasing(
QSGGlyphNode::HighQualitySubPixelAntialiasing)
59 , m_distanceFieldAntialiasingDecided(
false)
63 m_distanceFieldAntialiasingDecided =
true;
64 if (
mode ==
"subpixel")
66 else if (
mode ==
"subpixel-lowq")
68 else if (
mode ==
"gray")
97 else if (aaType ==
"vertex")
108 if (!m_distanceFieldAntialiasingDecided) {
109 m_distanceFieldAntialiasingDecided =
true;
157 int renderTypeQuality)
185 if (useDepth &&
format.depthBufferSize() == -1)
186 format.setDepthBufferSize(24);
188 format.setDepthBufferSize(0);
189 if (useStencil &&
format.stencilBufferSize() == -1)
190 format.setStencilBufferSize(8);
191 else if (!useStencil)
192 format.setStencilBufferSize(0);
195 if (QQuickWindow::hasDefaultAlphaBuffer())
196 format.setAlphaBufferSize(8);
199 format.setSwapInterval(0);
205 m_distanceFieldDisabled = !
enabled;
210 return !m_distanceFieldDisabled;
234#if QT_CONFIG(quick_sprite)
235QSGSpriteNode *QSGDefaultContext::createSpriteNode()
273 return window->vulkanInstance();
void unlock() noexcept
Unlocks the mutex.
void lock() noexcept
Locks the mutex.
The QQuickPaintedItem class provides a way to use the QPainter API in the QML Scene Graph.
static QQuickWindowPrivate * get(QQuickWindow *c)
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
\variable QRhiGles2InitParams::format
The QSGContext holds the scene graph entry points for one QML engine.
QSGRectangleNode * createRectangleNode() override
QSGGlyphNode * createGlyphNode(QSGRenderContext *rc, QSGTextNode::RenderType renderType, int renderTypeQuality) override
QSGInternalRectangleNode * createInternalRectangleNode() override
ShaderCompilationTypes shaderCompilationType() const override
bool isDistanceFieldEnabled() const
QSGImageNode * createImageNode() override
QSGInternalTextNode * createInternalTextNode(QSGRenderContext *renderContext) override
QSGRendererInterface * rendererInterface(QSGRenderContext *renderContext) override
Returns a pointer to the (presumably) global renderer interface.
QSGRenderContext * createRenderContext() override
ShaderSourceTypes shaderSourceType() const override
QSGShaderEffectNode * createShaderEffectNode(QSGRenderContext *renderContext) override
Creates a new shader effect node.
void renderContextInitialized(QSGRenderContext *renderContext) override
QSGGuiThreadShaderEffectManager * createGuiThreadShaderEffectManager() override
Creates a new shader effect helper instance.
QSGNinePatchNode * createNinePatchNode() override
ShaderType shaderType() const override
QSGPainterNode * createPainterNode(QQuickPaintedItem *item) override
QSurfaceFormat defaultSurfaceFormat() const override
void setDistanceFieldEnabled(bool enabled)
QSGInternalImageNode * createInternalImageNode(QSGRenderContext *renderContext) override
QSGLayer * createLayer(QSGRenderContext *renderContext) override
void renderContextInvalidated(QSGRenderContext *) override
GraphicsApi graphicsApi() const override
Returns the graphics API that is in use by the Qt Quick scenegraph.
void * getResource(QQuickWindow *window, Resource resource) const override
Queries a graphics resource in window.
void setRenderTypeQuality(int renderTypeQuality) override
void setPreferredAntialiasingMode(AntialiasingMode mode) override
@ HighQualitySubPixelAntialiasing
@ LowQualitySubPixelAntialiasing
The QSGImageNode class is provided for convenience to easily draw textured content using the QML scen...
ImageNode(QSGDefaultRenderContext *rc)
void setAntialiasing(bool) override
void setAntialiasing(bool) override
The QSGRectangleNode class is a convenience class for drawing solid filled rectangles using scenegrap...
An interface providing access to some of the graphics API specific internals of the scenegraph.
Resource
\value DeviceResource The resource is a pointer to the graphics device, when applicable.
GraphicsApi
\value Unknown An unknown graphics API is in use \value Software The Qt Quick 2D Renderer is in use \...
ShaderType
\value UnknownShadingLanguage Not yet known due to no window and scenegraph associated \value GLSL GL...
const void * rifResource(QSGRendererInterface::Resource res, const QSGDefaultRenderContext *rc, const QQuickWindow *w)
static QSGRhiSupport * instance()
RenderType
This enum type describes type of glyph node used for rendering the text.
Combined button and popup list for selecting options.
Q_CONSTRUCTOR_FUNCTION(qt_apple_check_os_version)
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLint GLsizei GLsizei GLenum format
#define DEFINE_BOOL_CONFIG_OPTION(name, var)
static QT_END_NAMESPACE void initResources()
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
Q_CORE_EXPORT bool qEnvironmentVariableIsEmpty(const char *varName) noexcept
Q_CORE_EXPORT bool qEnvironmentVariableIsSet(const char *varName) noexcept
#define Q_INIT_RESOURCE(name)