diff options
author | Andy Nichols <andy.nichols@qt.io> | 2016-11-11 12:09:43 +0100 |
---|---|---|
committer | Andy Nichols <andy.nichols@qt.io> | 2016-11-11 14:10:42 +0000 |
commit | 6cb21a9296b34d66d7b50d6b38c09294634202e0 (patch) | |
tree | 1990f54fcc9aa99990163757c0538718846c7b91 /src | |
parent | 2b8a9fc66309038dac21624293cf3b91d87165c3 (diff) |
Fix building with -no-opengl
Asserts were added to qquickanimatorjob.cpp that check for a current
opengl context and which thread they are current on. This is not
relevant for non-opengl builds.
Change-Id: I9714c99cb6a0374fbb983a037c4fc24a99c8a645
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/qquickwindow.h | 1 | ||||
-rw-r--r-- | src/quick/util/qquickanimatorjob.cpp | 13 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/quick/items/qquickwindow.h b/src/quick/items/qquickwindow.h index cfadadec2d..7e1e45f345 100644 --- a/src/quick/items/qquickwindow.h +++ b/src/quick/items/qquickwindow.h @@ -56,6 +56,7 @@ class QSGTexture; class QInputMethodEvent; class QQuickWindowPrivate; class QQuickWindowAttached; +class QOpenGLContext; class QOpenGLFramebufferObject; class QQmlIncubationController; class QInputMethodEvent; diff --git a/src/quick/util/qquickanimatorjob.cpp b/src/quick/util/qquickanimatorjob.cpp index fa13e8519e..5dd16407b8 100644 --- a/src/quick/util/qquickanimatorjob.cpp +++ b/src/quick/util/qquickanimatorjob.cpp @@ -434,7 +434,9 @@ void QQuickXAnimatorJob::writeBack() void QQuickXAnimatorJob::updateCurrentTime(int time) { +#if QT_CONFIG(opengl) Q_ASSERT(!m_controller || !m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread()); +#endif if (!m_helper) return; @@ -451,8 +453,9 @@ void QQuickYAnimatorJob::writeBack() void QQuickYAnimatorJob::updateCurrentTime(int time) { +#if QT_CONFIG(opengl) Q_ASSERT(!m_controller || !m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread()); - +#endif if (!m_helper) return; @@ -469,8 +472,9 @@ void QQuickScaleAnimatorJob::writeBack() void QQuickScaleAnimatorJob::updateCurrentTime(int time) { +#if QT_CONFIG(opengl) Q_ASSERT(!m_controller || !m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread()); - +#endif if (!m_helper) return; @@ -491,8 +495,9 @@ extern QVariant _q_interpolateCounterclockwiseRotation(qreal &f, qreal &t, qreal void QQuickRotationAnimatorJob::updateCurrentTime(int time) { +#if QT_CONFIG(opengl) Q_ASSERT(!m_controller || !m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread()); - +#endif if (!m_helper) return; @@ -597,7 +602,9 @@ void QQuickOpacityAnimatorJob::writeBack() void QQuickOpacityAnimatorJob::updateCurrentTime(int time) { +#if QT_CONFIG(opengl) Q_ASSERT(!m_controller || !m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread()); +#endif if (!m_opacityNode) return; |