diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-11-06 12:21:43 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-11-06 17:53:44 +0100 |
commit | 1d06b89652a78682fc0446c74b8522c2c5d7d3d9 (patch) | |
tree | fe040db1dbcad0757747dbb448a33173a858d5ac /src | |
parent | dbb0314a596a71ea61765574f3d2820108207f15 (diff) |
Do not assert with OpenGL in qquickcanvasitem test
This is due to not fixing the graphicsApi() check: OpenGL and OpenGLRhi
are now the same. The condition should have been removed anyway since it
makes no sense in Qt 6.
Fixes: QTBUG-88208
Change-Id: I60db54121a0a74bfa3ca1650f90244f36fc7010f
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/context2d/qquickcontext2d.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp index cbc4105ea4..36f91ae15f 100644 --- a/src/quick/items/context2d/qquickcontext2d.cpp +++ b/src/quick/items/context2d/qquickcontext2d.cpp @@ -4248,15 +4248,12 @@ void QQuickContext2D::init(QQuickCanvasItem *canvasItem, const QVariantMap &args m_renderTarget = QQuickCanvasItem::Image; } - // Disable Framebuffer Object based rendering when not running with OpenGL. - // Same goes for the RHI based code path (regardless of the backend in use). - if (m_renderTarget == QQuickCanvasItem::FramebufferObject) { - QSGRendererInterface *rif = canvasItem->window()->rendererInterface(); - if (rif && rif->graphicsApi() != QSGRendererInterface::OpenGL) - m_renderTarget = QQuickCanvasItem::Image; - } + // Disable framebuffer object based rendering always in Qt 6. It + // is not implemented in the new RHI-based graphics stack, but the + // enum value is still present. Switch to Image instead. + if (m_renderTarget == QQuickCanvasItem::FramebufferObject) + m_renderTarget = QQuickCanvasItem::Image; - Q_ASSERT(m_renderTarget == QQuickCanvasItem::Image); m_texture = new QQuickContext2DImageTexture; m_texture->setItem(canvasItem); |