aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/coreapi/qsgabstractrenderer_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-05-22 14:14:13 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-06-02 15:44:43 +0200
commit13caceba0e4cba30567058641a9999948858b182 (patch)
tree2c8d749d2dc2deaf0e4ffccdd01d0031999e4e5f /src/quick/scenegraph/coreapi/qsgabstractrenderer_p.h
parentbfa9e94600d4decdf0dfe8e522a5bf468a4a512e (diff)
Enable invoking the scenegraph rendering without a full render pass
Split the monolithic render() and renderBatches() into four steps (prepare, begin-pass, render, end-pass), of which two are optional. The behavior of the batch renderer's render() (the entry point when rendering a Qt Quick scene normally) remains unchanged: it just calls prepare, beginPass, render, endPass which together should boil down to exactly what the monolithic implementation was doing before. However, we can now also support recording rendering of the 2D scene as part of a render pass that is started by something else (e.g. the 3D scene). To enable this, the renderer interface gets prepareInline() and renderInline() virtuals that are only implemented by the batch renderer (and are no-ops by default). These are complemented by prepareSceneLine() and renderSceneInline() which are public (as in the class, not API-wise), like renderScene(). The former does preprocess() and triggers the internal prepareInline(), whereas renderSceneLine() is where renderInline() is called from. The rendercontext has no corresponding wrappers since one can just directly call these on the QSGRenderer. Change-Id: Iddfcec6970bad2bc73e6e8af19fe95d16c6ac9e5 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/quick/scenegraph/coreapi/qsgabstractrenderer_p.h')
-rw-r--r--src/quick/scenegraph/coreapi/qsgabstractrenderer_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgabstractrenderer_p.h b/src/quick/scenegraph/coreapi/qsgabstractrenderer_p.h
index 83084cbd0f..139edda884 100644
--- a/src/quick/scenegraph/coreapi/qsgabstractrenderer_p.h
+++ b/src/quick/scenegraph/coreapi/qsgabstractrenderer_p.h
@@ -109,6 +109,9 @@ public:
virtual void renderScene() = 0;
+ virtual void prepareSceneInline();
+ virtual void renderSceneInline();
+
Q_SIGNALS:
void sceneGraphChanged();