diff options
author | Paul Olav Tvete <paul.tvete@qt.io> | 2020-06-16 17:03:47 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2020-06-17 17:42:01 +0200 |
commit | 83fb4f6743860bfb746e6243aad00513d498db4f (patch) | |
tree | 816bf1a1d509124c6bfb4fc34cce2a4ed885f40e /src/quick/items/qquickpainteditem.cpp | |
parent | 48e919e9647fd07351be37e1ad7efdda9c550be9 (diff) |
Clean up QT_CONFIG(opengl)
Accelerated graphics is now possible without OpenGL support. With
this change, a Qt build with -no-opengl can still run Qt Quick with
a Vulkan, Metal, or Direct3D backend.
Fixes: QTBUG-84027
Change-Id: Ib63c733d28cfdf7de16b138df136fa7628e1747b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/quick/items/qquickpainteditem.cpp')
-rw-r--r-- | src/quick/items/qquickpainteditem.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/quick/items/qquickpainteditem.cpp b/src/quick/items/qquickpainteditem.cpp index 6490f4dcdd..6a9599badf 100644 --- a/src/quick/items/qquickpainteditem.cpp +++ b/src/quick/items/qquickpainteditem.cpp @@ -640,13 +640,11 @@ QSGTextureProvider *QQuickPaintedItem::textureProvider() const return QQuickItem::textureProvider(); Q_D(const QQuickPaintedItem); -#if QT_CONFIG(opengl) QQuickWindow *w = window(); - if (!w || !w->isSceneGraphInitialized() || QThread::currentThread() != QQuickWindowPrivate::get(w)->context->thread()) { + if (!w || !w->isSceneGraphInitialized() || QThread::currentThread() != d->sceneGraphContext()->thread()) { qWarning("QQuickPaintedItem::textureProvider: can only be queried on the rendering thread of an exposed window"); return nullptr; } -#endif if (!d->textureProvider) d->textureProvider = new QQuickPaintedItemTextureProvider(); d->textureProvider->node = d->node; |