From c97c5ea5cf3ccc9e4379924d1ac7b9a1735efb6f Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 14 Aug 2014 12:41:26 +0200 Subject: Ported the threaded render loop from qtdeclarative Change-Id: I3408c1df03ac6a8c547e7db17c835c25a4c5fce9 Reviewed-by: Lars Knoll --- softwarecontext/context.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'softwarecontext/context.h') diff --git a/softwarecontext/context.h b/softwarecontext/context.h index c2aba27db4..0a64ca0a06 100644 --- a/softwarecontext/context.h +++ b/softwarecontext/context.h @@ -41,8 +41,10 @@ public: void nodeChanged(QSGNode *node, QSGNode::DirtyState state); + QBackingStore *backingStore() const { return m_backingStore.data(); } + private: - QScopedPointer backingStore; + QScopedPointer m_backingStore; QRect m_dirtyRect; }; @@ -63,6 +65,7 @@ class RenderContext : public QSGRenderContext public: RenderContext(QSGContext *ctx); void initialize(QOpenGLContext *context); + void initializeIfNeeded(); void invalidate(); void renderNextFrame(QSGRenderer *renderer, GLuint fbo); QSGTexture *createTexture(const QImage &image) const; @@ -70,6 +73,7 @@ public: QSGRenderer *createRenderer(); QWindow *currentWindow; + bool m_initialized; }; class Context : public QSGContext -- cgit v1.2.3