aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2020-04-14 14:38:13 +0200
committerLars Knoll <lars.knoll@qt.io>2020-04-22 10:21:44 +0200
commit0293ea29918ecf1ddd69709e5dad629af59d7aa8 (patch)
tree97deb6994fb94d0ba931bccc493ef152c3991687 /src/quick/scenegraph
parentd4edf441257b7e5782a6c25802d821647ffcba45 (diff)
Update dependencies.yaml and adapt to API changes in qtbase
The evaluation callback does not have to perform the comparison anymore and the shared pointer of the private is not used in the API anymore. Also, the versionFunctions() has been moved out of QOpenGLContext and renamed QOpenGLVersionFunctionsFactory::get(). QHash doesn't keep iterators stable under erase(), so clean up the code relying on it, and avoid an intermediate QList at the same time. Task-number: QTBUG-74409 Change-Id: I90176be1067d88c8f2b1ea07198a06d432f5be9c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp5
-rw-r--r--src/quick/scenegraph/qsgopengldistancefieldglyphcache.cpp3
2 files changed, 5 insertions, 3 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index bc05e8d4f3..81b9d96560 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -54,6 +54,7 @@
#include <QOpenGLVertexArrayObject>
#include <QOpenGLFunctions_1_0>
#include <QOpenGLFunctions_3_2_Core>
+#include <QOpenGLVersionFunctionsFactory>
#include <private/qnumeric_p.h>
#include <private/qquickprofiler_p.h>
@@ -2970,9 +2971,9 @@ void Renderer::updateLineWidth(QSGGeometry *g) // legacy (GL-only)
QOpenGLFunctions_1_0 *gl1funcs = nullptr;
QOpenGLFunctions_3_2_Core *gl3funcs = nullptr;
if (ctx->format().profile() == QSurfaceFormat::CoreProfile)
- gl3funcs = ctx->versionFunctions<QOpenGLFunctions_3_2_Core>();
+ gl3funcs = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_3_2_Core>(ctx);
else
- gl1funcs = ctx->versionFunctions<QOpenGLFunctions_1_0>();
+ gl1funcs = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_1_0>(ctx);
Q_ASSERT(gl1funcs || gl3funcs);
if (gl1funcs)
gl1funcs->glPointSize(g->lineWidth());
diff --git a/src/quick/scenegraph/qsgopengldistancefieldglyphcache.cpp b/src/quick/scenegraph/qsgopengldistancefieldglyphcache.cpp
index d757cdd048..04dd6d64ad 100644
--- a/src/quick/scenegraph/qsgopengldistancefieldglyphcache.cpp
+++ b/src/quick/scenegraph/qsgopengldistancefieldglyphcache.cpp
@@ -48,6 +48,7 @@
#include <private/qopenglcontext_p.h>
#include <QtQml/private/qqmlglobal_p.h>
#include <qopenglfunctions.h>
+#include <qopenglversionfunctionsfactory.h>
#include <qopenglframebufferobject.h>
#include <qmath.h>
#include "qsgcontext_p.h"
@@ -343,7 +344,7 @@ void QSGOpenGLDistanceFieldGlyphCache::resizeTexture(TextureInfo *texInfo, int w
// to efficiently copy the contents of the old texture to the new texture
// TODO: Use ARB_copy_image if available of if we have >=4.3 context
if (!m_coreFuncs) {
- m_coreFuncs = ctx->versionFunctions<QOpenGLFunctions_3_2_Core>();
+ m_coreFuncs = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_3_2_Core>(ctx);
Q_ASSERT(m_coreFuncs);
m_coreFuncs->initializeOpenGLFunctions();
}