diff options
Diffstat (limited to 'src/plugins/scenegraph/d3d12/qsgd3d12renderloop_p.h')
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12renderloop_p.h | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/src/plugins/scenegraph/d3d12/qsgd3d12renderloop_p.h b/src/plugins/scenegraph/d3d12/qsgd3d12renderloop_p.h index 732f8dd5d2..c0333ffad0 100644 --- a/src/plugins/scenegraph/d3d12/qsgd3d12renderloop_p.h +++ b/src/plugins/scenegraph/d3d12/qsgd3d12renderloop_p.h @@ -58,7 +58,6 @@ QT_BEGIN_NAMESPACE class QSGD3D12Engine; class QSGD3D12Context; class QSGD3D12RenderContext; -class QSGD3D12RenderThread; class QSGD3D12RenderLoop : public QSGRenderLoop { @@ -80,7 +79,6 @@ public: void update(QQuickWindow *window) override; void maybeUpdate(QQuickWindow *window) override; - void handleUpdateRequest(QQuickWindow *window) override; QAnimationDriver *animationDriver() const override; @@ -94,34 +92,37 @@ public: bool interleaveIncubation() const override; int flags() const override; - bool event(QEvent *e) override; + bool event(QEvent *event) override; public Q_SLOTS: void onAnimationStarted(); void onAnimationStopped(); private: + void exposeWindow(QQuickWindow *window); + void obscureWindow(QQuickWindow *window); + void renderWindow(QQuickWindow *window); + void render(); + void maybePostUpdateTimer(); + bool somethingVisible() const; + + QSGD3D12Context *sg; + QAnimationDriver *m_anims; + int m_vsyncDelta; + int m_updateTimer = 0; + int m_animationTimer = 0; + struct WindowData { - QQuickWindow *window; - QSGD3D12RenderThread *thread; - uint updateDuringSync : 1; - uint forceRenderPass : 1; + QSGD3D12RenderContext *rc = nullptr; + QSGD3D12Engine *engine = nullptr; + bool updatePending = false; + bool grabOnly = false; + bool exposed = false; }; - void startOrStopAnimationTimer(); - void handleExposure(QQuickWindow *window); - void handleObscurity(WindowData *w); - void scheduleUpdate(WindowData *w); - void handleResourceRelease(WindowData *w, bool destroying); - void polishAndSync(WindowData *w, bool inExpose); - - QSGD3D12Context *sg; - QAnimationDriver *anim; - int animationTimer = 0; - bool lockedForSync = false; - QVector<WindowData> windows; + QHash<QQuickWindow *, WindowData> m_windows; - friend class QSGD3D12RenderThread; + QImage m_grabContent; }; QT_END_NAMESPACE |