7#include <QtGui/QGuiApplication>
9#include <QtQuick/private/qsgbatchrenderer_p.h>
10#include <QtQuick/private/qsgrenderer_p.h>
11#include <QtQuick/private/qsgrhiatlastexture_p.h>
12#include <QtQuick/private/qsgrhidistancefieldglyphcache_p.h>
13#include <QtQuick/private/qsgmaterialshader_p.h>
15#include <QtQuick/private/qsgcompressedtexture_p.h>
17#include <QtQuick/qsgrendererinterface.h>
18#include <QtQuick/qquickgraphicsconfiguration.h>
27 , m_currentFrameCommandBuffer(
nullptr)
28 , m_currentFrameRenderPass(
nullptr)
29 , m_useDepthBufferFor2D(true)
30 , m_glyphCacheResourceUpdates(
nullptr)
45 qFatal(
"QSGDefaultRenderContext: Invalid parameters passed to initialize()");
66 if (!(*it)->isActive()) {
81 if (
it.value() == 0) {
82 it.key()->clearGlyphCache(
this);
83 if (!
it.key()->ref.deref())
132 it.key()->clearGlyphCache(
this);
133 if (!
it.key()->ref.deref())
170 void *callbackUserData)
172 renderer->setRenderTarget(renderTarget);
173 renderer->setRenderPassRecordingCallbacks(mainPassRecordingStart, mainPassRecordingEnd, callbackUserData);
210 texture->setHasAlphaChannel(
false);
238 it.value()->processPendingGlyphs();
239 it.value()->update();
247 if (atlas ==
nullptr) {
301#include "moc_qsgdefaultrendercontext_p.cpp"
iterator begin()
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
const_iterator constEnd() const noexcept
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the ...
const_iterator constBegin() const noexcept
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
iterator erase(const_iterator it)
T value(const Key &key) const noexcept
iterator end() noexcept
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last ...
void clear() noexcept(std::is_nothrow_destructible< Node >::value)
Removes all items from the hash and frees up all memory used by it.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
void deleteLater()
\threadsafe
QQuickGraphicsConfiguration controls lower level graphics settings for the QQuickWindow.
The QRawFont class provides access to a single physical instance of a font.
int resourceLimit(ResourceLimit limit) const
QRhiResourceUpdateBatch * nextResourceUpdateBatch()
The QSGContext holds the scene graph entry points for one QML engine.
virtual void renderContextInitialized(QSGRenderContext *renderContext)
virtual void renderContextInvalidated(QSGRenderContext *renderContext)
void deferredReleaseGlyphCacheTexture(QRhiTexture *texture)
QRhiResourceUpdateBatch * maybeGlyphCacheResourceUpdates()
void prepareSync(qreal devicePixelRatio, QRhiCommandBuffer *cb, const QQuickGraphicsConfiguration &config) override
void beginNextFrame(QSGRenderer *renderer, const QSGRenderTarget &renderTarget, RenderPassCallback mainPassRecordingStart, RenderPassCallback mainPassRecordingEnd, void *callbackUserData) override
virtual void initializeRhiShader(QSGMaterialShader *shader, QShader::Variant shaderVariant)
void initialize(const QSGRenderContext::InitParams *params) override
Initializes the scene graph render context with the GL context context.
qreal m_currentDevicePixelRatio
QSGRenderer * createRenderer(QSGRendererInterface::RenderMode renderMode=QSGRendererInterface::RenderMode2D) override
void invalidateGlyphCaches() override
QSGTexture * compressedTextureForFactory(const QSGCompressedTextureFactory *factory) const override
Return the texture corresponding to a texture factory.
QSGTexture * createTexture(const QImage &image, uint flags) const override
QSGDefaultRenderContext(QSGContext *context)
QRhiResourceUpdateBatch * m_glyphCacheResourceUpdates
QSGDistanceFieldGlyphCache * distanceFieldGlyphCache(const QRawFont &font, int renderTypeQuality) override
Factory function for scene graph backends of the distance-field glyph cache.
QSet< QRhiTexture * > m_pendingGlyphCacheTextures
QRhiRenderPassDescriptor * m_currentFrameRenderPass
void preprocess() override
Do necessary preprocessing before the frame.
QSGCurveGlyphAtlas * curveGlyphAtlas(const QRawFont &font) override
Factory function for curve atlases that can be used to provide geometry for the curve renderer for a ...
void invalidate() override
bool m_useDepthBufferFor2D
QSGRhiAtlasTexture::Manager * m_rhiAtlasManager
void endNextFrame(QSGRenderer *renderer) override
static const int INIT_PARAMS_MAGIC
void resetGlyphCacheResources()
void renderNextFrame(QSGRenderer *renderer) override
QHash< FontKey, QSGCurveGlyphAtlas * > m_curveGlyphAtlases
QRhiResourceUpdateBatch * glyphCacheResourceUpdates()
QRhiCommandBuffer * m_currentFrameCommandBuffer
static QSGMaterialShaderPrivate * get(QSGMaterialShader *s)
The QSGMaterialShader class represents a graphics API independent shader program.
void setImage(const QImage &image)
QHash< QObject *, QSGTexture * > m_textures
QHash< QFontEngine *, int > m_fontEnginesToClean
QPointer< QSGContext > m_sg
void(*)(void *) RenderPassCallback
QHash< FontKey, QSGDistanceFieldGlyphCache * > m_glyphCaches
QSet< QSGTexture * > m_texturesToDelete
QRhiRenderPassDescriptor * rpDesc
RenderMode
\value RenderMode2D Normal 2D rendering \value RenderMode2DNoDepthBuffer Normal 2D rendering with dep...
The renderer class is the abstract baseclass used for rendering the QML scene graph.
QSGTexture * create(const QImage &image, bool hasAlphaChannel)
iterator insert(const T &value)
Variant
Describes what kind of shader code an entry contains.
static QThread * currentThread()
qDeleteAll(list.begin(), list.end())
QCache< int, Employee > cache
[0]
QSet< QString >::iterator it
Combined button and popup list for selecting options.
GLfloat GLfloat GLfloat alpha
SSL_CTX int(* cb)(SSL *ssl, unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen, void *arg)
QItemEditorFactory * factory
QSvgRenderer * renderer
[0]
QSize initialSurfacePixelSize