diff options
Diffstat (limited to 'src/quick/scenegraph/qsgcontext_p.h')
-rw-r--r-- | src/quick/scenegraph/qsgcontext_p.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/quick/scenegraph/qsgcontext_p.h b/src/quick/scenegraph/qsgcontext_p.h index 282ce828af..c731baeb74 100644 --- a/src/quick/scenegraph/qsgcontext_p.h +++ b/src/quick/scenegraph/qsgcontext_p.h @@ -89,6 +89,10 @@ class QSGImageNode; class QSGNinePatchNode; class QSGSpriteNode; class QSGRenderContext; +class QRhi; +class QRhiRenderTarget; +class QRhiRenderPassDescriptor; +class QRhiCommandBuffer; Q_DECLARE_LOGGING_CATEGORY(QSG_LOG_TIME_RENDERLOOP) Q_DECLARE_LOGGING_CATEGORY(QSG_LOG_TIME_COMPILATION) @@ -119,7 +123,7 @@ public: QSGInternalRectangleNode *createInternalRectangleNode(const QRectF &rect, const QColor &c); virtual QSGInternalRectangleNode *createInternalRectangleNode() = 0; - virtual QSGInternalImageNode *createInternalImageNode() = 0; + virtual QSGInternalImageNode *createInternalImageNode(QSGRenderContext *renderContext) = 0; virtual QSGPainterNode *createPainterNode(QQuickPaintedItem *item) = 0; virtual QSGGlyphNode *createGlyphNode(QSGRenderContext *rc, bool preferNativeGlyphNode) = 0; virtual QSGLayer *createLayer(QSGRenderContext *renderContext) = 0; @@ -164,9 +168,18 @@ public: QSGContext *sceneGraphContext() const { return m_sg; } virtual bool isValid() const { return true; } - virtual void initialize(void *context); + struct InitParams { }; + virtual void initialize(const InitParams *params); virtual void invalidate(); - virtual void renderNextFrame(QSGRenderer *renderer, uint fboId) = 0; + virtual void renderNextFrame(QSGRenderer *renderer, uint fboId) = 0; // legacy, GL-only + using RenderPassCallback = void (*)(void *); + virtual void beginRhiFrame(QSGRenderer *renderer, QRhiRenderTarget *rt, QRhiRenderPassDescriptor *rp, + QRhiCommandBuffer *cb, + RenderPassCallback mainPassRecordingStart, + RenderPassCallback mainPassRecordingEnd, + void *callbackUserData); // RHI only + virtual void renderNextRhiFrame(QSGRenderer *renderer); + virtual void endRhiFrame(QSGRenderer *renderer); // RHI only virtual void endSync(); virtual QSGDistanceFieldGlyphCache *distanceFieldGlyphCache(const QRawFont &font); @@ -182,6 +195,8 @@ public: void registerFontengineForCleanup(QFontEngine *engine); + virtual QRhi *rhi() const; + Q_SIGNALS: void initialized(); void invalidated(); |