QSGTexture *QQuickWindow::createTextureFromImage(const QImage &image, CreateTextureOptions options) const
{
Q_D(const QQuickWindow);
- if (d->context && d->context->openglContext()) {
+ if (d->context) {
if (options & TextureCanUseAtlas)
return d->context->createTexture(image);
else
{
if (!m_controller)
return;
- Q_ASSERT(m_controller->m_window->openglContext()->thread() == QThread::currentThread());
+ Q_ASSERT(!m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread());
m_value = m_from + (m_to - m_from) * m_easing.valueForProgress(time / (qreal) m_duration);
m_helper->dx = m_value;
{
if (!m_controller)
return;
- Q_ASSERT(m_controller->m_window->openglContext()->thread() == QThread::currentThread());
+ Q_ASSERT(!m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread());
m_value = m_from + (m_to - m_from) * m_easing.valueForProgress(time / (qreal) m_duration);
m_helper->dy = m_value;
{
if (!m_controller || !m_opacityNode)
return;
- Q_ASSERT(m_controller->m_window->openglContext()->thread() == QThread::currentThread());
+ Q_ASSERT(!m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread());
m_value = m_from + (m_to - m_from) * m_easing.valueForProgress(time / (qreal) m_duration);
m_opacityNode->setOpacity(m_value);
{
if (!m_controller)
return;
- Q_ASSERT(m_controller->m_window->openglContext()->thread() == QThread::currentThread());
+ Q_ASSERT(!m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread());
m_value = m_from + (m_to - m_from) * m_easing.valueForProgress(time / (qreal) m_duration);
m_helper->scale = m_value;
{
if (!m_controller)
return;
- Q_ASSERT(m_controller->m_window->openglContext()->thread() == QThread::currentThread());
+ Q_ASSERT(!m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread());
float t = m_easing.valueForProgress(time / (qreal) m_duration);
switch (m_direction) {
{
if (!m_controller)
return;
- Q_ASSERT(m_controller->m_window->openglContext()->thread() == QThread::currentThread());
+ Q_ASSERT(!m_controller->m_window->openglContext() || m_controller->m_window->openglContext()->thread() == QThread::currentThread());
if (!m_node || m_uniformIndex == -1 || m_uniformType == -1)
return;