From 15ce5d915b6bda4bf1d3c85cbdc79b2e11690bca Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 4 Jul 2014 23:50:50 +0200 Subject: Introducing QQuickWindow::scheduleRenderJob() [ChangeLog][QtQuick][QQuickWindow] Added QQuickWindow::scheduleRenderJob(), a convenience alternative to the equivalent signals for one-shot tasks. Change-Id: I5e4f0d67d5223f7fd77bca394e2a85810fadd335 Reviewed-by: Laszlo Agocs --- src/quick/items/qquickwindow.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/quick/items/qquickwindow.h') diff --git a/src/quick/items/qquickwindow.h b/src/quick/items/qquickwindow.h index 4ed663ee6e..6353f6a30c 100644 --- a/src/quick/items/qquickwindow.h +++ b/src/quick/items/qquickwindow.h @@ -50,6 +50,7 @@ QT_BEGIN_NAMESPACE +class QRunnable; class QQuickItem; class QSGTexture; class QInputMethodEvent; @@ -79,6 +80,14 @@ public: TextureCanUseAtlas = 0x0008 }; + enum RenderStage { + BeforeSynchronizingStage, + AfterSynchronizingStage, + BeforeRenderingStage, + AfterRenderingStage, + AfterSwapStage + }; + Q_DECLARE_FLAGS(CreateTextureOptions, CreateTextureOption) enum SceneGraphError { @@ -145,6 +154,8 @@ public: QString glslVersion() const; bool glslIsCoreProfile() const; + void scheduleRenderJob(QRunnable *job, RenderStage schedule); + Q_SIGNALS: void frameSwapped(); Q_REVISION(2) void openglContextCreated(QOpenGLContext *context); @@ -196,6 +207,7 @@ private Q_SLOTS: void cleanupSceneGraph(); void forcePolish(); void setTransientParent_helper(QQuickWindow *window); + void runJobsAfterSwap(); private: friend class QQuickItem; -- cgit v1.2.3