From 29efb937806ac61f4d87df0a67b8695306541f0c Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 8 Jun 2020 10:28:54 +0200 Subject: Do not depend on removed openglContext getter ...and remove Angle special case. Task-number: QTBUG-84623 Change-Id: Icf3eb4ef4508519aa2144b667220d33155569b7f Reviewed-by: Paul Olav Tvete --- src/quick/scenegraph/qsgcontext.cpp | 2 +- src/quick/scenegraph/qsgdefaultcontext.cpp | 18 ++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-) (limited to 'src/quick/scenegraph') diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp index 9baf530889..a6b1e47cb8 100644 --- a/src/quick/scenegraph/qsgcontext.cpp +++ b/src/quick/scenegraph/qsgcontext.cpp @@ -233,7 +233,7 @@ public: \brief The QSGContext holds the scene graph entry points for one QML engine. - The context is not ready for use until it has a QOpenGLContext. Once that happens, + The context is not ready for use until it has a QRhi. Once that happens, the scene graph population can start. \internal diff --git a/src/quick/scenegraph/qsgdefaultcontext.cpp b/src/quick/scenegraph/qsgdefaultcontext.cpp index bb998df912..83baecc276 100644 --- a/src/quick/scenegraph/qsgdefaultcontext.cpp +++ b/src/quick/scenegraph/qsgdefaultcontext.cpp @@ -135,23 +135,17 @@ void QSGDefaultContext::renderContextInitialized(QSGRenderContext *renderContext m_antialiasingMethod = rc->msaaSampleCount() > 1 ? MsaaAntialiasing : VertexAntialiasing; } - // With OpenGL ES, except for Angle on Windows, use GrayAntialiasing, unless + // With OpenGL ES, use GrayAntialiasing, unless // some value had been requested explicitly. This could not be decided // before without a context. Now the context is ready. if (!m_distanceFieldAntialiasingDecided) { m_distanceFieldAntialiasingDecided = true; -#ifndef Q_OS_WIN32 - if (rc->rhi()) { - if (rc->rhi()->backend() == QRhi::OpenGLES2 - && static_cast(rc->rhi()->nativeHandles())->context->isOpenGLES()) - { - m_distanceFieldAntialiasing = QSGGlyphNode::GrayAntialiasing; - } - } else { - if (rc->openglContext()->isOpenGLES()) - m_distanceFieldAntialiasing = QSGGlyphNode::GrayAntialiasing; + Q_ASSERT(rc->rhi()); + if (rc->rhi()->backend() == QRhi::OpenGLES2 + && static_cast(rc->rhi()->nativeHandles())->context->isOpenGLES()) + { + m_distanceFieldAntialiasing = QSGGlyphNode::GrayAntialiasing; } -#endif } m_mutex.unlock(); -- cgit v1.2.3