summaryrefslogtreecommitdiffstats
path: root/src/webenginequick
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2021-08-30 20:54:00 +0200
committerMichal Klocek <michal.klocek@qt.io>2021-09-04 07:15:06 +0200
commit8548008f53bbcebf65580304c89ea9d2a265bd85 (patch)
tree005398b2e18bcec7205d6c70f74c67dd352ba142 /src/webenginequick
parent1bdc7956e7065bf73413109182c215bcefe2d817 (diff)
Enable no opengl builds
By mistake opengl was marked as required library, but should be just optional. Fix compilation issues. This should enable build on yet another coin node. Pick-to: 6.2 Change-Id: Id87404928e6b042d902fcfe0a7fed99a6806456f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/webenginequick')
-rw-r--r--src/webenginequick/render_widget_host_view_qt_delegate_quick.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/webenginequick/render_widget_host_view_qt_delegate_quick.cpp b/src/webenginequick/render_widget_host_view_qt_delegate_quick.cpp
index 6e4168cda..cdc0cf426 100644
--- a/src/webenginequick/render_widget_host_view_qt_delegate_quick.cpp
+++ b/src/webenginequick/render_widget_host_view_qt_delegate_quick.cpp
@@ -341,11 +341,15 @@ QSGNode *RenderWidgetHostViewQtDelegateQuick::updatePaintNode(QSGNode *oldNode,
node->setTexture(win->createTextureFromImage(image));
} else if (comp->type() == Compositor::Type::OpenGL) {
QQuickWindow::CreateTextureOptions texOpts;
+#if QT_CONFIG(opengl)
if (comp->hasAlphaChannel())
texOpts.setFlag(QQuickWindow::TextureHasAlphaChannel);
int texId = comp->textureId();
node->setTexture(QNativeInterface::QSGOpenGLTexture::fromNative(texId, win, texSize, texOpts));
node->setTextureCoordinatesTransform(QSGImageNode::MirrorVertically);
+#else
+ Q_UNREACHABLE();
+#endif
} else {
Q_UNREACHABLE();
}