diff options
Diffstat (limited to 'src/quick/items/qquickrendercontrol.cpp')
-rw-r--r-- | src/quick/items/qquickrendercontrol.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/quick/items/qquickrendercontrol.cpp b/src/quick/items/qquickrendercontrol.cpp index a666bb59c9..656678a035 100644 --- a/src/quick/items/qquickrendercontrol.cpp +++ b/src/quick/items/qquickrendercontrol.cpp @@ -36,7 +36,7 @@ #include <QtCore/QCoreApplication> #include <QtCore/QTime> -#include <QtCore/private/qabstractanimation_p.h> +#include <QtQuick/private/qquickanimatorcontroller_p.h> #include <QtGui/QOpenGLContext> #include <QtGui/private/qguiapplication_p.h> @@ -170,6 +170,20 @@ void QQuickRenderControlPrivate::windowDestroyed() } /*! + Prepares rendering the Qt Quick scene outside the gui thread. + + \a targetThread specifies the thread on which synchronization and + rendering will happen. There is no need to call this function in a + single threaded scenario. + */ +void QQuickRenderControl::prepareThread(QThread *targetThread) +{ + Q_D(QQuickRenderControl); + d->rc->moveToThread(targetThread); + QQuickWindowPrivate::get(d->window)->animationController->moveToThread(targetThread); +} + +/*! Initializes the scene graph resources. The context \a gl has to be the current context. |