aboutsummaryrefslogtreecommitdiffstats
path: root/softwarecontext/context.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-08-14 12:41:26 +0200
committerLars Knoll <lars.knoll@digia.com>2014-08-14 14:24:45 +0300
commitc97c5ea5cf3ccc9e4379924d1ac7b9a1735efb6f (patch)
treeb1bb6d8eabbee213a7cae14505acb3cd2c022125 /softwarecontext/context.h
parente32867f1c2918b452781055affc7c4563f25121c (diff)
Ported the threaded render loop from qtdeclarative
Change-Id: I3408c1df03ac6a8c547e7db17c835c25a4c5fce9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'softwarecontext/context.h')
-rw-r--r--softwarecontext/context.h6
1 files changed, 5 insertions, 1 deletions
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<QBackingStore> backingStore;
+ QScopedPointer<QBackingStore> 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