diff options
Diffstat (limited to 'src/quick/scenegraph/qsgdefaultrendercontext_p.h')
-rw-r--r-- | src/quick/scenegraph/qsgdefaultrendercontext_p.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgdefaultrendercontext_p.h b/src/quick/scenegraph/qsgdefaultrendercontext_p.h index c3352aa89f..be3d1c1312 100644 --- a/src/quick/scenegraph/qsgdefaultrendercontext_p.h +++ b/src/quick/scenegraph/qsgdefaultrendercontext_p.h @@ -25,13 +25,25 @@ class QRhiCommandBuffer; class QRhiRenderPassDescriptor; class QRhiResourceUpdateBatch; class QRhiTexture; +class QRhiRenderBuffer; class QSGMaterialShader; class QSurface; +class QSGDefaultRenderContext; namespace QSGRhiAtlasTexture { class Manager; } +class QSGDepthStencilBuffer +{ +public: + QSGDepthStencilBuffer() { } + QSGDepthStencilBuffer(QRhiRenderBuffer *ds) : ds(ds) { } + ~QSGDepthStencilBuffer(); + QRhiRenderBuffer *ds = nullptr; + QSGDefaultRenderContext *rc = nullptr; +}; + class Q_QUICK_EXPORT QSGDefaultRenderContext : public QSGRenderContext { Q_OBJECT @@ -107,6 +119,9 @@ public: void deferredReleaseGlyphCacheTexture(QRhiTexture *texture); void resetGlyphCacheResources(); + QSharedPointer<QSGDepthStencilBuffer> getDepthStencilBuffer(const QSize &size, int sampleCount); + void addDepthStencilBuffer(const QSharedPointer<QSGDepthStencilBuffer> &ds); + protected: InitParams m_initParams; QRhi *m_rhi; @@ -119,6 +134,9 @@ protected: QRhiResourceUpdateBatch *m_glyphCacheResourceUpdates; QSet<QRhiTexture *> m_pendingGlyphCacheTextures; QHash<FontKey, QSGCurveGlyphAtlas *> m_curveGlyphAtlases; + QHash<std::pair<QSize, int>, QWeakPointer<QSGDepthStencilBuffer>> m_depthStencilBuffers; + + friend class QSGDepthStencilBuffer; }; QT_END_NAMESPACE |