aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickrendercontrol.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2014-11-25 11:38:46 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2014-12-12 12:19:14 +0100
commit6179550a0ca761bfabd4f6c67103f5397a306df0 (patch)
treeeaf4a12431769a77ff3fed7945d1d0bf37144fcd /src/quick/items/qquickrendercontrol.h
parent2a6f6eee104ef66e4e236fa82fe71bb77f151ee8 (diff)
Support threading with QQuickRenderControl
Reorganize the rendercontrol example to demonstrate both the single and multi threaded approaches. A small helper function is introduced to the QQuickRenderControl API: The QSGRenderContext has to live on the render thread. Previously there was no way for applications to move it to the desired thread. This is now possible. Pass --threaded to the rendercontrol example to use a separate render thread. [ChangeLog][QtQuick] QQuickRenderControl can now be used to render the Qt Quick scene on a dedicated render thread, similarly to how the built-in threaded render loop operates. Task-number: QTBUG-42813 Change-Id: I01c3b2ffca8a174d9d2c267a51f2e484ed7b34b3 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'src/quick/items/qquickrendercontrol.h')
-rw-r--r--src/quick/items/qquickrendercontrol.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/items/qquickrendercontrol.h b/src/quick/items/qquickrendercontrol.h
index e6903653c2..99d1b8ac2d 100644
--- a/src/quick/items/qquickrendercontrol.h
+++ b/src/quick/items/qquickrendercontrol.h
@@ -42,6 +42,7 @@ QT_BEGIN_NAMESPACE
class QQuickWindow;
class QOpenGLContext;
class QQuickRenderControlPrivate;
+class QThread;
class Q_QUICK_EXPORT QQuickRenderControl : public QObject
{
@@ -51,6 +52,7 @@ public:
QQuickRenderControl(QObject *parent = 0);
~QQuickRenderControl();
+ void prepareThread(QThread *targetThread);
void initialize(QOpenGLContext *gl);
void invalidate();